/*
	The NEW Universal Mode Stripper, 1994

	This script is just an intellectual exercise:  It isnt intended
	to be useful.  If you really want to use a mode stripper, just
	/set mode_stripper ON and then watch for /on MODE_STRIPPED.
	see the HELP for /on MODE_STRIPPED for more information.

	I rewrote this script using the new /IF in epic4pre1.
	It doesnt make the script more useful, just shows you how
	nice it is to have block IFs in ircII now...
*/

/* 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 
		} elsif (x == [l]) {
			if (sign == [+]) {
				hook MODE $nick $channel +l $($argindex)
				@ argindex++
			} else { 
				hook MODE $nick $channel -l
			}
		} elsif (index($takeargs $x) > -1) {
			hook MODE $nick $channel $sign$x $($argindex)
			@ argindex++
		} elsif (index($noargs $x) > -1) {
			hook MODE $nick $channel $sign$x
		}
	}
}
on #-mode -10 * modes $*

#hop'94
