Code: Select all
newchanban $::badr(chan) [maskhost [lindex [split $arg] 3]] $::botnick $::badr(reason) $::badr(time)
Code: Select all
newchanban $::badr(chan) "*!*@[lindex [split $arg] 3]" $::botnick $::badr(reason) $::badr(time)
Code: Select all
newchanban $::badr(chan) [maskhost [lindex [split $arg] 3]] $::botnick $::badr(reason) $::badr(time)
Code: Select all
newchanban $::badr(chan) "*!*@[lindex [split $arg] 3]" $::botnick $::badr(reason) $::badr(time)
Hello, this script bans normal names but not names with http://www.caesar wrote:My appologies for this problem. Locate in the tcl file this line:and replace it with:Code: Select all
newchanban $::badr(chan) [maskhost [lindex [split $arg] 3]] $::botnick $::badr(reason) $::badr(time)
Code: Select all
newchanban $::badr(chan) "*!*@[lindex [split $arg] 3]" $::botnick $::badr(reason) $::badr(time)
Code: Select all
# What bad realnames should be banned?
set badr(list) {
"foo bar"
"bla bla"
"*moo*"
"???"
"*http://*"
"*www.*"
}
# The realname check should be done only in what channel?
set badr(chan) "#channel"
# For how many minutes whould you like the ban?
set badr(time) 60
# What reason will be used when an person is found using an bad realname?
set badr(reason) "You norteh norteh boy!"
# binds #
bind join - "$badr(chan) *" badrealname:join
bind raw - 311 badrealname:check
# join #
proc badrealname:join {nick host hand chan} {
if {![validuser $hand] || [strlwr $nick] != [strlwr $::botnick]} {
putserv "WHOIS $nick"
}
}
# check #
proc badrealname:check {from key arg} {
set realname [strlwr [ctrl:filter [string range [lindex [split $arg] end] 1 end]]]
foreach bah $::badr(list) {
if {![string match $bah $realname]} {
continue
}
newchanban $::badr(chan) "*!*@[lindex [split $arg] 3]" $::botnick $::badr(reason) $::badr(time)
break
}
}
proc ctrl:filter {str} {
regsub -all -- {\003[0-9]{0,2}(,[0-9]{0,2})?|\017|\037|\002|\026|\006|\007} $str "" str
return $str
}
putlog "badrealname.tcl.. loaded."
Code: Select all
bind join - "$badr(chan) *" badrealname:join
Code: Select all
bind join - * badrealname:join
this change dont workscaesar wrote:replace from:to:Code: Select all
bind join - "$badr(chan) *" badrealname:join
Code: Select all
bind join - * badrealname:join
Code: Select all
set badr(list) {
"*mahoo*"
"*hotblowjobs*"
"*CRANA?IRC*"
"*hot-dot*
"*saskia.kramer*"
}
Code: Select all
set badr(list) {
"*hot?dot*
}
how disconcertingstdragon wrote:Actually, "unmatched open quote" means you have a quote (like ") but no closing quote. If you look at the list, you can see that you have
"*hot-dot*
(note no " on the end)