can anyone help me change or modify Modreds script to include individual users too. I think it currently bans for notice floods to the channel only. Would really appreciate it as my channel is under attack by these notice nutz.
thanks
set channels "#chan1 #chan2"
bind notc - "*" notice
proc notice {nick host hand text dest} {
global channels botnick
foreach chan $channels {
if {$chan == $dest} {
set x [split $host @]
newchanban $chan *!*@[lindex $x 1] $botnick "Another noticing dickhead bites the dust.." 60
}
}
}
[ This Message was edited by: Mordred on 2002-04-12 03:35 ]
The only logical targets for a notice from the Bot's point of view can be the channel it's monitoring or the bot itself.
If I am not mistaken, you can simply remove the "IF condition" that checks if the notice target is a channel ... thus allowing the code to be processed always. And you should make sure that the $dest is not an empty string.
Description: dest will be a nickname (the bot's nickname,
obviously) or a channel name. mask is matched against the entire
notice and can contain wildcards. It is considered a breach of
protocol to respond to a /notice on IRC, so this is intended for
internal use (logging, etc.) only. Note that server notices do not
trigger the NOTC bind.
New Tcl procs should be declared as
proc notcproc {nick uhost hand text {dest ""}} {
global botnick; if {$dest == ""} {set dest $botnick}
...
}
for compatibility.