| View previous topic :: View next topic |
| Author |
Message |
Nimos Halfop
Joined: 20 Apr 2008 Posts: 80
|
Posted: Wed May 07, 2008 1:27 pm Post subject: "anti"-flags? |
|
|
| can i make a bind, which is only triggered by people NOT having a flag? |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Wed May 07, 2008 1:33 pm Post subject: |
|
|
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 |
|
 |
Nimos Halfop
Joined: 20 Apr 2008 Posts: 80
|
Posted: Wed May 07, 2008 4:03 pm Post subject: |
|
|
no if i have
| Code: | | bind join -B * noautovoice { |
it triggers if someone with +B flag joins the channel... |
|
| Back to top |
|
 |
Papillon Owner

Joined: 15 Feb 2002 Posts: 724 Location: *.no
|
Posted: Wed May 07, 2008 4:10 pm Post subject: |
|
|
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 |
|
 |
Nimos Halfop
Joined: 20 Apr 2008 Posts: 80
|
Posted: Wed May 07, 2008 5:00 pm Post subject: |
|
|
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 |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Wed May 07, 2008 5:22 pm Post subject: |
|
|
| 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 |
|
 |
Nimos Halfop
Joined: 20 Apr 2008 Posts: 80
|
Posted: Wed May 07, 2008 5:43 pm Post subject: |
|
|
| sure |
|
| Back to top |
|
 |
|