set chantocheck "#bandung"
bind JOIN - * banuser:join
bind raw - 311 banuser:response
proc banuser:join {nick uhost handle channel} {
global chantocheck
set channel [string tolower $channel]
set matchpattern "*$channel*"
if {[string match $matchpattern $chantocheck] == 1} {
putserv "WHOIS $nick"
return 0
} else {
return 0
}
}
proc banuser:response {from key arg} {
global chantocheck
set fnick [lindex [split $arg] 1]
set fusername [lindex [split $arg] 2]
set fhostname [lindex [split $arg] 3]
set frealname [string trimleft [join [lrange [split $arg] 5 end]] :]
if {
[string match *@*diem*emas*@* $frealname]
|| [string match *Love*Forever*=* $frealname]
|| [string match *Rex*Crew* $frealname] ||
[string match *script* $frealname] ||
[string match *edition* $frealname] ||
[string match *UFO*v6* $frealname] } {
putlog "*** $nick maybe a spammer spy based on his realname pattern:
$frealname . Now lets ban *!*$fhostname"
putquick "KICK $chantocheck $fnick :
Visit http://www.dc28.net/forum/irc link site Complaints for details why you were banned!"
putquick "MODE $chantocheck +b *!*@$fhostname"
}
banuser:unbindall
}
proc banuser:unbindall { } {
bind raw - 311 banuser:response
}
putlog "blah.tcl"
its works very well. but then i received this msg on the bot dcc chat. "<b>!!! OVER MAXIMUM SERVER QUEUE</b>
i dont know is it an error or a bug, can someone one tell me what it is and how to handle it.
note: the script is put on a bot which stand on channel that have 1000+ user.
<font size=-1>[ This Message was edited by: Doni on 2001-11-24 09:27 ]</font>
<font size=-1>[ This Message was edited by: Doni on 2001-11-24 16:33 ]</font>
Eggdrop has an internal queing system, and by default this is set to 300 messages per queue. You can increase this by changing the value of max-queue-msg in your conf. However, the fact that this is filling up anyway causes concern. A 300 message server queue takes something like half an hour to empty assuming nothing new is added. People are obviously joining the chan faster than your bot can whois them (btw, using who instead of whois would be better as its less irrelivent text sent back).
but doing /who on 1000+ user chan can make the bot sendQ exceed, i have try to make a script that using who command to scan the real name every 1 hours and its makes the bot disconnected from a server, SendQ exceed.
at the moment you have the bot sending WHOIS $nick to the server every time someone joins the chan. This will throw back at the minimum 4 lines of response (server numerics 311, 312, 317 and 318). However, if you just did a WHO $nick, it will only respond with 1 line (numeric 315), which contains the realname info (assuming of course you ain't running on a broken ircd such as bahamut)