/*
	The NEW Universal Mode Stripper, 1994

	This script really isnt very useful becuase the client does
	this job faster and more effectively.  But this script 
	demonstrates the technique.

	Requires ircII-EPIC -- Dont be daunted by the size of the
	alias.  Its really quite efficient.
*/

/* DONT MESS WITH THESE or youll be sorry... */
@ takeargs = [bovk]
@ noargs = [aimnpst]
@ msign = [+-]

alias modes {
        @ nick = [$0]
        @ channel = [$1]
        @ modestring = [$2]
        @ argindex = 3
        fec ($modestring) x
        {
                if (index($msign $x) > -1)
                { 
			@ sign = x 
		}
                {
			if (x == [l]) 
			{
				if (sign == [+]) 
				{
                        		hook MODE $nick $channel +l $($argindex)
                        		@ argindex++
                   		} 
				{ 
                        		hook MODE $nick $channel -l
                   		}
                 	}
                 	{
				if (index($takeargs $x) > -1) 
				{
                         		hook MODE $nick $channel $sign$x $($argindex)
                         		@ argindex++
                 		}
                 		{
					if (index($noargs $x) > -1)
                         		{
						hook MODE $nick $channel $sign$x
					}
				}
			}
		}
       }
}
on #-mode -10 * modes $*

#hop'94
