File: killpath

package info (click to toggle)
ircii 4.4-3
  • links: PTS
  • area: main
  • in suites: hamm, slink
  • size: 4,256 kB
  • ctags: 2,797
  • sloc: ansic: 36,743; sh: 907; makefile: 483; lex: 16
file content (32 lines) | stat: -rw-r--r-- 951 bytes parent folder | download
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
# No Kill Path Script II

# converted to 2.2.1 by phone
# CONVERTED for ircII2.2
# Version for servers 2.7.1* by Nap@irc <pioch@poly.polytechnique.fr>
# Original script from YeggMan
# Simplification by Daemon
# This version works both with old and new 2.7.1e kill formats !

@ kpath.kpath = [<empty>]
alias kpath echo ### Last received KILL Path: $kpath.kpath

alias kpath.ridx @ function_return = RINDEX(! $0) + 1
alias kpath.is_serv @ function_return  = INDEX(. $MID($kpath.ridx($0) 512 $0))
alias kpath.opkill echo ### KILL for $0 $MID($kpath.ridx($1) 9 $1) $2-
alias kpath.svkill echo ### ServerKill for $0

on ^server_notice "% * Notice -- Received KILL*" {
        if ([$9] == [From])
	{
        ^assign kpath.kpath $12-
        if (kpath.is_serv($12) > -1)
		{ kpath.svkill $8 }
		{ kpath.opkill $8 $10 $13- }
	}
	{
        ^assign kpath.kpath $10-
        if (kpath.is_serv($10) > -1)
		{ kpath.svkill $8 }
		{ kpath.opkill $8 $10 $11- }
	}
}