###
### 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
}
}
he would be grateful very much for its help in this tcl
###
### ColorKick 1.1 - By Lucas Madar (darkrot@dal.net)
### Updated by Arnold_X-P & sedition irc.dal.net (urquizoandrade@gmail.com)
#
# 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 / kick on 3 or more colors
#
# Modify all you like, just remember to give the original author credit.
# (Lucas Madar)
set colornum 0
bind ctcp - ACTION ctcp_nocolors
proc ctcp_nocolors {nick uhost hand chan keyword arg} {
color_check $nick $uhost $hand $chan $arg
}
bind pubm - * color_check
proc color_check {nick userhost hand chan arg} {
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*" $arg] } {
putserv "KICK $chan $nick :Please do not use colors on this channel."
return 0
}
} else {
if {[string match "*$colorchar*$colorchar*$colorchar**$colorchar*$colorchar*$colorchar*" $arg]} {
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
}
}
Last edited by Arnold_X-P on Mon Mar 04, 2019 10:36 pm, edited 2 times in total.
We explore.. and you call us criminals. We seek after knowledge.. and you call us criminals. We exist without skin color, without nationality, without religious bias.. and you call us criminals.