which is a server notice in unrealircd i want my bot will zline the ip with the command /zline @202.174.137.108 3d :Flooder <-- here 3d stands for 3 days
I will be grateful if i get tcl script for that particur command
I wanna zline everyone (Flooders) when they start connecting to server in a certain time (When they flood )
When someone connects to server bot gets server notice like ...
Hub.CaFeBanGLa.CoM - *** Notice -- Client connecting on port 6667: cL0sEd (~ZaKiR@202.174.137.108) [clients]
So when bot will get this msg it will start zlining like /zline @202.174.137.108 3d :Flooder <-- here 3d stands for 3 days
now the question is when the bot will start doing this... it will start doing this when i type !zline-on in any channel where the bot is.. & it will stop doing this when i will type !zline-off... if someone else type !zline-on or !zline-off bot will not go for it.. only when i (owner) type this bot will work for it
bind raw - NOTICE raw:notice
proc raw:notice {from word text} {
set notice [lrange [split $text] 0 end]
if {[string match -nocase *connecting* $notice]} {
set zline "@[string trimright [lindex [split [lindex $text end-2] @] 1] )]"
putserv "Zline $zline 2d :flooder"
}
}
This code will zline everyone who connects to my server... but i want some additional things... like when i (owner of the bot) will type !zline-on in any channel where this bot is present this code will be activated & when !zline-off this code will be deactivated...
& i want to add some exceptional ips in this code which will never be zlined such as my ip 202.174.137.108
# just add the ip's you want to protect here, seperate with space
set zline(protect) "202.174.137.108"
# we better start it with the auto-zlines turned off
set zline(status) 0
bind pub n !zline-on zline:on
bind pub n !zline-off zline:off
proc zline:on {nick uhost hand chan text} {
global zline
set zline(status) 1
putserv "PRIVMSG $chan :Auto Zline on connect turned ON. "
}
proc zline:off {nick uhost hand chan text} {
global zline
set zline(status) 0
putserv "PRIVMSG $chan :Auto Zline on connect turned OFF. "
}
bind raw - NOTICE raw:notice
proc raw:notice {from word text} {
global zline
set notice [lrange [split $text] 0 end]
# zline on excess flood
if {[string match -nocase *exiting*excess* $notice]} {
set host "@[string trimright [lindex [split [lindex $text end-2] @] 1] )]"
putserv "Zline $host 3d :Flooder"
}
# zline everyone that connects
if {[string match -nocase *connecting* $notice]} {
set host "@[string trimright [lindex [split [lindex $text end-2] @] 1] )]"
if {($zline(status)) && (![string match *$host* $zline(protect)])} {
putserv "Zline $host 2d :flooder"
}
}
}