ColorKick By Lucas Madar darkrot dal net This script will do one of th

 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
###
### ColorKick 1.1 - By Lucas Madar (darkrot@dal.net)
###
#
# This script will do one of three things:
# 1) Nothing
# 2) Kick on the use of any mIRC colors in the channel
# 3) Kick on abuse of mIRC colors (3 or more) in the channel
#
# This can be changed by any op.
# It also warns users if the kick is on when they join the channel.
# /msg botnick colorkick 0 = off
# /msg botnick colorkick 1 = kick on
# /msg botnick colorkick 2 = abuse kick on
#
# Modify all you like, just remember to give the original author credit.
# (Lucas Madar)
set colornum 0
bind pubm - * color_check
proc color_check {nick userhost hand chan things} {
global colornum
if {$colornum == 0} {return 0}
if {[matchattr $hand m] || [isop $nick $chan] || [matchattr $hand f]} {return 0}
set colorchar \003
if {$colornum == 1} {
if {[string match "*$colorchar*" $things]} {
putserv "KICK $chan $nick :Please do not use colors on this channel."
return 0
}
} else {
if {[string match "*$colorchar*$colorchar*$colorchar**$colorchar*$colorchar*$colorchar*" $things]} {
putserv "KICK $chan $nick :Please limit the amount of colors you use."
return 0
}
}
}
bind msg - colorkick colorkickset
proc colorkickset {nick uhost hand stuff} {
global colornum botnick
if {!([matchattr $hand o] || [matchattr $hand m])} {return 0}
set cchoice [lindex $stuff 0]
if {$cchoice == 0} {
putserv "NOTICE $nick :Color Kick Set to 0 - off"
set colornum 0
return 0
}
if {$cchoice == 1} {
putserv "NOTICE $nick :Color Kick Set to 1 - Kick on any use of colors"
set colornum 1
return 0
}
if {$cchoice == 2} {
putserv "NOTICE $nick :Color Kick Set to 2 - Kick on abuse of colors (3 or more)"
set colornum 2
return 0
}
putserv "NOTICE $nick :Invalid color kick option - $cchoice"
putserv "NOTICE $nick :Valid options are: /msg $botnick colorkick \[0,1,2\]"
putserv "NOTICE $nick :0 = Off, 1 = Kick on any colors, 2 = kick on 3 or more colors"
}
bind join - * color_warning
proc color_warning {nick uhost hand chan} {
global colornum botnick
if {$nick == $botnick} {return 0}
if {$colornum == 0} {return 0}
if {$colornum == 1} {
putserv "NOTICE $nick :Warning: Color kick is on. The use of colors will result in a kick."
if {[matchattr $hand o] || [matchattr $hand m]} {
putserv "NOTICE $nick :You can change this. /msg $botnick colorkick help (The kick will also not affect you)"
}
return 0
}
if {$colornum == 2} {
putserv "NOTICE $nick :Warning: Color abuse kick is on. The use of 3 or more colors will result in a kick."
if {[matchattr $hand o] || [matchattr $hand m]} {
putserv "NOTICE $nick :You can change this. /msg $botnick colorkick help (The kick will also not affect you)"
}
return 0
}
}