Sir Fz, I'm very happy to see u look at my request, anyone with special flag can use it sir (+f)Sir_Fz wrote:So, anyone can use the !coverme and !uncover commands? or just you? because if it is just you, then we don't need a command to make the bot protect you
Code: Select all
bind pub f|f !coverme cover:nick
bind pub f|f !decover decover:nick
bind pub f|f !terror terrorize
bind mode - "* +b" ban:covered
bind kick - * kick:covered
bind notc - "* cannot mass kick a channel with higher ranking ops *" defused
proc cover:nick {nick uhost hand chan arg} {
if {![matchattr $hand |C $chan]} {
chattr $hand |+C $chan
puthelp "privmsg $chan :Roger that"
}
}
proc decover:nick {nick uhost hand chan arg} {
if {[matchattr $hand |C $chan]} {
chattr $hand |-C $chan
puthelp "privmsg $chan :Roger that"
}
}
proc terrorize {nick uhost hand chan arg} {
global bombplanted
if {![info exists bombplanted]} {
puthelp "privmsg $chan :The bomb has been planted sir and will be blow up on 1minutes"
utimer 55 [list masskick $chan]
set bombplanted 5
}
}
proc masskick c {
global bombplanted mkicking
if {$bombplanted > 0} {
puthelp "privmsg $c :$bombplanted"
incr bombplanted -1
utimer 1 [list masskick $c]
} {
putserv "ChanServ :mkick $c"
set mkicking $c
unset bombplanted
}
}
proc ban:covered {nick uhost hand chan mc targ} {
set found 0
foreach Cn [chanlist $chan C|C] {
if {[string match -nocase $targ $Cn![getchanhost $Cn $chan]]} {
set found 1
break
}
}
if {$found} {
pushmode $chan -b $targ
pushmode $chan +b *!*@[lindex [split $uhost @] 1]
}
}
proc kick:covered {nick uhost hand chan targ arg} {
global mkicking
if {[string tolower $nick] == "chanserv" && [isbotnick $targ]} {
if {[info exists mkicking]} {unset mkicking}
return 0
}
if {[validuser [nick2hand $targ]] && [matchattr [nick2hand $targ] |C $chan]} {
putserv "kick $chan $nick :$targ is covered by me!"
}
}
proc defused {nick uhost hand arg chan} {
global mkicking
if {![isbotnick [lindex [split $chan @] 0]]} {return 0}
if {[info exists mkicking]} {
puthelp "privmsg $mkicking :The bomb has been defuse on $mkicking (higher ranking ops in it than me)"
unset mkicking
}
}
Code: Select all
if {![isbotnick $chan]} {return 0}
Code: Select all
if {![isbotnick [lindex [split $chan @] 0]]} {return 0}