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 

triggering on +mode exclusively, help! :(

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


Joined: 28 Nov 2007
Posts: 3

PostPosted: Fri Oct 30, 2009 3:30 pm    Post subject: triggering on +mode exclusively, help! :( Reply with quote

Greetings!

I am writing a script that should, whenever a user halfops (changes mode to +h), the bot will output "CHARGIN UR LAZERS" to the channel.
Code:

set m "+h"
bind mode - * userhop
proc userhop {nick uhost hand chan m victim} {
   puthelp "PRIVMSG $chan :CHARGIN UR LAZERS"
}

The issue: if someone -h (de-halfops), the bot runs proc userhop again (says CHARGIN UR LAZERS). I want it to only 'charge lazers' on +h, not -h. I have tried set m +h with and without quotes, with and without the + sign.

Does anyone have any possible fixes or insights as to why this may be happening? Thanks in advance!
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Fri Oct 30, 2009 3:35 pm    Post subject: Reply with quote

Well, you've set your mode-mask to *, basically matching any mode change.
Try something like this instead:
Code:
bind mode - '% +h' userhop
proc userhop {nick host handle channel mode target} {
  puthelp "PRIVMSG $channel :CHARGIN UR LAZERS"
}

This should trigger on any channel, but only for +h modes.
_________________
NML_375, idling at #eggdrop@IrcNET
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