hi, i want to ask help how to modified timebomb scripts so it can't kick ops/owner and say something in room like "sorry, no bomb for op/owner"
This link to Timebomb script
Thanks..
Code: Select all
proc doTimebomb {nick uhost hand chan arg} {
Code: Select all
proc doTimebomb {nick uhost hand chan arg} {
global botnick
set theNick $nick
if { [llength $arg] == 1 } {
set theNick [lindex [split $arg] 0]
}
if { [string tolower $theNick] == [string tolower $botnick] } {
set theNick $nick
IRCKick $theNick $chan "I will not tollerate this!"
return
}
if { [validuser $theNick] == 1 } {
if { [matchattr $theNick "+b"] == 1 } {
set theNick $nick
IRCKick $theNick $chan "I will not tollerate that!"
return
}
}
if {[isop $theNick $chan]} {
putserv "privmsg $chan :Sorry, no bomb for op"
return
}
StartTimeBomb $nick $theNick $chan
}
Code: Select all
proc doTimebomb {nick uhost hand chan arg} {
global botnick
set theNick $nick
if { [llength $arg] == 1 } {
set theNick [lindex [split $arg] 0]
}
if { [string tolower $theNick] == [string tolower $botnick] } {
set theNick $nick
IRCKick $theNick $chan "I will not tollerate this!"
return
}
if { [validuser $theNick] == 1 } {
if { [matchattr $theNick "+b"] == 1 } {
set theNick $nick
IRCKick $theNick $chan "I will not tollerate that!"
return
}
}
StartTimeBomb $nick $theNick $chan
}
Code: Select all
proc doTimebomb {nick uhost hand chan arg} {
global botnick
set arg [split $arg]
set theNick $nick
set self 1
if {[llength $arg] == "1"} {
set theNick [lindex $arg 0]
set self 0
}
if { [string tolower $theNick] == [string tolower $botnick] } {
set theNick $nick
IRCKick $theNick $chan "I will not tollerate this!"
return
}
if {$self=="0"} {
if {![onchan $theNick $chan]} { return }
if {[isop $theNick $chan]}
IRCPrivMSG $chan "You can't timebomb an op!"
StartTimeBomb $nick $nick $chan
return
}
set theHand [nick2hand $theNick $chan]
if {$theHand ne "" && $theHand ne "*"} {
if {[matchattr $theHand b|b $chan]} {
IRCKick $nick $chan "I will not tollerate that!"
return
}
if {[matchattr $theHand no|no $chan]} {
IRCPrivMSG $chan "You can't timebomb an op/owner!"
return
}
}
}
StartTimeBomb $nick $theNick $chan
}