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 

"anti"-flags?

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


Joined: 20 Apr 2008
Posts: 80

PostPosted: Wed May 07, 2008 1:27 pm    Post subject: "anti"-flags? Reply with quote

can i make a bind, which is only triggered by people NOT having a flag?
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Wed May 07, 2008 1:33 pm    Post subject: Reply with quote

I think you should be able to use the - prefix to flags to specify that the binding should only match if the user does not have these flags.
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
Nimos
Halfop


Joined: 20 Apr 2008
Posts: 80

PostPosted: Wed May 07, 2008 4:03 pm    Post subject: Reply with quote

no if i have

Code:
bind join -B * noautovoice {


it triggers if someone with +B flag joins the channel...
Back to top
View user's profile Send private message
Papillon
Owner


Joined: 15 Feb 2002
Posts: 724
Location: *.no

PostPosted: Wed May 07, 2008 4:10 pm    Post subject: Reply with quote

just make it trigger on everyone and add a
Code:
if {![matchattr <handle> <flags>]} { do_the_thing_you_want }
in the proc
_________________
Elen sila lúmenn' omentielvo
Back to top
View user's profile Send private message MSN Messenger
Nimos
Halfop


Joined: 20 Apr 2008
Posts: 80

PostPosted: Wed May 07, 2008 5:00 pm    Post subject: Reply with quote

and if the joining person is not registered in the bot?

wouldnt it be better to use

if not {![matchattr * B]} {action}

is there an "if not" funktion in tcl?
Back to top
View user's profile Send private message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Wed May 07, 2008 5:22 pm    Post subject: Reply with quote

Nimos wrote:
and if the joining person is not registered in the bot?

wouldnt it be better to use

if not {![matchattr * B]} {action}

is there an "if not" funktion in tcl?


sure, your already using it.
Code:
if {[matchattr $hand B]} { #matches do stuff }
if {![matchattr $hand B]} { #no matches do stuff }

This is assuming you use the variable name $hand in association with the handle passed to the proc by the binding.
Code:
proc join:voice-check {nick host hand chan} {
Back to top
View user's profile Send private message
Nimos
Halfop


Joined: 20 Apr 2008
Posts: 80

PostPosted: Wed May 07, 2008 5:43 pm    Post subject: Reply with quote

sure
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