| View previous topic :: View next topic |
| Author |
Message |
krouser Voice
Joined: 08 May 2013 Posts: 4
|
Posted: Wed May 08, 2013 1:45 pm Post subject: Putting a halt! |
|
|
| Code: |
set chan1 "#foo"
set chan2 "#zoo"
bind pub -|- !op op
bind pubm - *!op* repeat_pubm
proc op {nick host hand chan text} {
set ochan [lindex $text 0]
set cause [lrange $text 1 end]
set first_char [string index $rchan 0]
set key [join [lrange [split $text] 1 end]]
if { $chan == #foo } {
if { $first_char != "#"} {
putserv "privmsg $chan1 : Sorry this is not valid. You can ONLY be opped in (#)channels."
} elseif { $key == ""} { putserv "privmsg $::chan1 : You must give the key for op." } else {
putserv "privmsg $::chan2 : Result ---> $nick ($host) is requesting to be opped in $ochan"
putserv "privmsg $::chan2 : Cause ---> : $Cause"
putserv "privmsg $::chan1 Hello $nick : You have been opped successfully.
}}}}
|
Is it possible to somehow not trigger the 'proc op' for 10 seconds if the command !op is used 3 times within 5 seconds? I am not really good with timers.  |
|
| Back to top |
|
 |
willyw Revered One
Joined: 15 Jan 2009 Posts: 1175
|
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Thu May 09, 2013 12:47 am Post subject: |
|
|
It should, but the proc is so sloppy written that I don't see how it works.
For instance, the rchan variable isn't defined anywhere.  _________________ Once the game is over, the king and the pawn go back in the same box. |
|
| Back to top |
|
 |
krouser Voice
Joined: 08 May 2013 Posts: 4
|
Posted: Thu May 09, 2013 1:40 am Post subject: |
|
|
oops my bad i think it should be $ochan.. hehe ..and willyw il see if it works! |
|
| Back to top |
|
 |
|