egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Putting a halt!

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
krouser
Voice


Joined: 08 May 2013
Posts: 4

PostPosted: Wed May 08, 2013 1:45 pm    Post subject: Putting a halt! Reply with quote

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. Sad
Back to top
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Wed May 08, 2013 4:23 pm    Post subject: Reply with quote

Is this useful?


http://forum.egghelp.org/viewtopic.php?t=9009#45537
Back to top
View user's profile Send private message
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Thu May 09, 2013 12:47 am    Post subject: Reply with quote

It should, but the proc is so sloppy written that I don't see how it works. Rolling Eyes

For instance, the rchan variable isn't defined anywhere. Razz
_________________
Once the game is over, the king and the pawn go back in the same box.
Back to top
View user's profile Send private message
krouser
Voice


Joined: 08 May 2013
Posts: 4

PostPosted: Thu May 09, 2013 1:40 am    Post subject: Reply with quote

oops my bad i think it should be $ochan.. hehe Very Happy ..and willyw il see if it works!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber