Code: Select all
set coloruser {}
bind msgm - "% *" color:kicker
prco color:kicker {nick uh hand chan arg} {
global coloruser
if {[regexp -all -- {[1code]
set coloruser {}
bind msgm - "% *" color:kicker
prco color:kicker {nick uh hand chan arg} {
global coloruser
if {[regexp -all -- {03[0-9]{0,2}(,[0-9]{0,2})?} $arg]} {
if {[set idx [lsearch -exact $coloruser $nick]]} {
set coloruser [lreplace $coloruser $idx $idx]
putserv "NOTICE $nick :Banned for colors"
putserv "MODE $chan +b [maskhost "${nick}!${uh}"]"
putserv "KICK $chan $nick :Banned for colors"
return
}
lappend coloruser $nick
putserv "NOTICE $nick :Stop usign colors"
putserv "KICK $chan $nick :Color user"
}
}
[/code1]03[0-9]{0,2}(,[0-9]{0,2})?} $arg]} {
if {[set idx [lsearch -exact $coloruser $nick]]} {
set coloruser [lreplace $coloruser $idx $idx]
putserv "NOTICE $nick :Banned for colors"
putserv "MODE $chan +b [maskhost "${nick}!${uh}"]"
putserv "KICK $chan $nick :Banned for colors"
return
}
lappend coloruser $nick
putserv "NOTICE $nick :Stop usign colors"
putserv "KICK $chan $nick :Color user"
}
}
There is no need to set anything in the "set coloruser" line, that is there to make the script function corectly.set coloruser {}
bind msgm - "% *" color:kicker
proc color:kicker {nick uh hand chan arg} {
global coloruser
if {[regexp -all -- {03[0-9]{0,2}(,[0-9]{0,2})?} $arg]} {
if {[set idx [lsearch -exact $coloruser $nick]]} {
set coloruser [lreplace $coloruser $idx $idx]
putserv "NOTICE $nick :Banned for colors"
putserv "MODE $chan +b [maskhost "${nick}!${uh}"]"
putserv "KICK $chan $nick :Banned for colors"
return
}
lappend coloruser $nick
putserv "NOTICE $nick :Stop usign colors"
putserv "KICK $chan $nick :Color user"
}
}