Code: Select all
# channels
set ec_lan_chans {
"#chan1"
"#chan2"
}
# kick text if check successful
set ec_lan_kicktext "2channels go away"
# timer in seconds till the bot checks the user after join
set ec_lan_checktimer "10"
bind msg - start ec.lan:start
bind join - * ec.lan:joincheck
proc ec.lan:start {nick host hand chan} {
global ec_lan_chans
if {![regexp -nocase $chan $ec_lan_chans match]} {return 0}
if {(![isop $nick $chan]) || (![isvoice $nick $chan])} {return 0}
putserv "mode $chan +D-c"
putserv "privmsg $nick :\0034 live mode in $chan started"
}
proc ec.lan:joincheck {nick host hand chan args} {
global ec_lan_checktimer
utimer $ec_lan_checktimer "ec.lan:check $nick $host $chan"
}
proc ec.lan:check {nick host chan} {
global ec_lan_chans ec_lan_kicktext
set chancount "0"
foreach channel $ec_lan_chans {
if {([isop $nick $channel]) || ([isvoice $nick $channel])} {return 0}
if {[onchan $nick $channel]} {set chancount [expr $chancount +1]}
}
if {$chancount > 1} {
putquick "mode $chan +b $nick!$host"
putquick "kick $chan $nick $ec_lan_kicktext"
}
}
Code: Select all
utimer $ec_lan_checktimer [ec.lan:check $nick $host $chan]
This is errornous, and causes more issues than it fixes.Papillon wrote:Code: Select all
utimer $ec_lan_checktimer [ec.lan:check $nick $host $chan]
Code: Select all
utimer $ec_lan_checktimer [list ec.lan:check $nick $host $chan]
Code: Select all
proc filt {data} {
regsub -all -- \\\\ $data \\\\\\\\ data
regsub -all -- \\\[ $data \\\\\[ data
regsub -all -- \\\] $data \\\\\] data
regsub -all -- \\\} $data \\\\\} data
regsub -all -- \\\{ $data \\\\\{ data
regsub -all -- \\\" $data \\\\\" data
return $data
}
Code: Select all
set nick [filt $nick]
This is NOT a good solution, as detailed by http://www.peterre.com/characters.htmlpollar wrote:Add this proc to your script...:... and perform filtering $nick before kicking or baning (write it the begin of your binded proc):Code: Select all
proc filt {data} { regsub -all -- \\\\ $data \\\\\\\\ data regsub -all -- \\\[ $data \\\\\[ data regsub -all -- \\\] $data \\\\\] data regsub -all -- \\\} $data \\\\\} data regsub -all -- \\\{ $data \\\\\{ data regsub -all -- \\" $data \\\\" data return $data }
This should workCode: Select all
set nick [filt $nick]
(sorry my english isn't good )
It won't ALWAYS fix the problem. There will be times when you will havepollar wrote:Maybe, but this method works. I use it sometimes and it ALWAYS helps to deal with a problem.
Simply, you are wrong in assuming this.pollar wrote:You are right, there will be extra \'s, but these simbols is not important in nicks or channel names also they are not printed in messages, when they r sent to an IRC server.
No, I hole-heartedly do not agree.pollar wrote: I think the author of this topic should try my suggested method and then say to us who was right. Do you agree with this strikelight?
Papillion and ppslim have already answered his question with PROPER solutions. Your "solution" just adds confusion to the issue for the poor chap.pollar wrote: Also I want to know about other methods to fix this problem. SO, strikelight, if you have any ideas write them, please. I'm realy interested in this .