Code: Select all
if { [getchanidle $theNick $chan] > 5 && $theNick != $nick} {
putserv "PRIVMSG $chan :$theNick is Away. Choose another victim!"
return
}
Code: Select all
global db gTimebombTarget botnick bombispassed gTimebombActive gTimebombGavebomb changeofdrop bombstatsstable gAtoombombActive
Code: Select all
set gTimebombTarget "$theNick"
set gTimebombGavebomb "$nick"
Code: Select all
proc doPassbomb {nick uhost hand chan arg} {
Code: Select all
set theNick [lindex $arg 0]
Code: Select all
#if {[string tolower $gTimebombGavebomb] != [string tolower $theNick]} {
# IRCPrivMSG $chan "You can only give the bomb back to $gTimebombGavebomb "
# return 0
#}
Ok i am lost now, ( not hard to lose meQuinie wrote:This works fine. But when using timebomb when your idle this results in the same error. You can't give the bomb to someone who is idle.
Code: Select all
[8:00pm] [ @Quinie] timebomb noname
Code: Select all
[8:00pm] [a] legna: stuffs the bomb into noname's pants. The display reads [47] seconds. [a]
[8:00pm] [@legna] Diffuse the bomb by cutting the correct wire. There is one wire. It is Lavender.
Code: Select all
[8:00pm] [Noname] passbomb Quinie
Code: Select all
set theNick [lindex $arg 0]
if {[getchanidle $theNick $chan] > 1} {
IRCPrivMSG $chan "You can only give the bomb to someone who isn't idle"
return 0
}
Code: Select all
[8:00pm] [@legna] You can only give the bomb to someone who isn't idle
Code: Select all
# set this var as null at top of script.
set gStarter ""
# In proc StartTimeBomb add this, also add global call to proc
set gStarter $theStarter
# code snippet
# if the target matches the starter do whatever you want and return
# else do the getchanidle thing.
if { [string tolower $gTimebombTarget] == [string tolower $gStarter] } {
# do whatever you want here blow them up etc
set gStarter ""
return
} else if { [getchanidle $theNick $chan] > 1 } {
IRCPrivMSG $chan "You can only give the bomb to someone who isn't idle"
return 0
}