But WICH channel ? If you want to output on an admin channel, just define your channel in the script. Or hard-code it in your putserv.ComputerTech wrote:to output onto the channel using, e.g putserv
Code: Select all
namespace eval badguy {
variable bad
bind flud - pub flud:ban
proc flud:ban { n u h t c } {
if {(![info exists ::badguy::bad($u)])} { set ::badguy::bad($u) 0 }
incr ::badguy::bad($u)
switch $::badguy::bad($u) {
1 {
putquick "privmsg $n :You Are Flooding/Spamming, Please Stop Or You Will Be Network Banned"
putserv "privmsg #admin :warning, Flood Happening in $c By $n"
}
2 {
putquick "KILL $n Spamming is not allowed on TechNet"
putserv "privmsg #admin :Kill due to flood in $c By $n"
}
3 {
putnow "WHOIS $n"
unset ::badguy::bad($u)
}
}
return 1
}
bind raw - 378 flud:gline
proc flud:gline {from kw text} {
set host [lindex [split $text " "] end]
putnow "gzline *@$host +30m :Network flood"
putserv "privmsg #admin :Gzline, Flood Happening in $c By $n"
}
}
Code: Select all
setudef flag fludctrl
setudef int fludlast
set fluddelay 5 #in days
bind cron - "*/10 * * * *" fludcheck
proc fludcheck {min hour day month wd} {
set delay [expr {$::fluddelay * 86400}]
set now [clock seconds]
foreach chan [channels] {
if {[channel get $chan fludctrl] == 0} { continue }
if {[channel get $chan fludlast]<[expr {$now - $delay}]} {
channel remove $chan
}
}
}
Code: Select all
proc flud:ban { n u h t c } {
channel set $c fludlast [clock seconds]
if {(![info exists ::badguy::bad($u)])} { set ::badguy::bad($u) 0 }
...
Code: Select all
namespace eval badguy {
bind pub !gzline the:gzline
proc the:gzline {nick host hand chan text} {
set bnick [lindex [split $text] 0 ]
putserv "PRIVMSG $chan :GZline'n $bnick"
putnow "WHOIS $bnick"
}
return 1
bind raw - 378 flud:gline
proc flud:gline {from kw text} {
set host [lindex [split $text " "] end]
putnow "gzline *@$host +30m :Breakage of Network Policy"
}
}
Code: Select all
bind pub !gzline the:gzline
I don't understand, how can it be noticed on a particular channel?ComputerTech wrote:Hmm, i guessed that, what of the notice or excessive flood, can it be noticed to a particular channel?
for example
Excessive Flood by guest123
on #test
Guest123 did Excessive transfers Dieppe
that possible?
to catch the notice, and project to a specified channel