File: modes

package info (click to toggle)
epic 3.004-17.1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 5,192 kB
  • ctags: 3,197
  • sloc: ansic: 40,843; makefile: 530; sh: 129; perl: 17
file content (59 lines) | stat: -rw-r--r-- 1,395 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*
	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.

	Dont be daunted by the size of the alias.  Its actually
	pretty 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