This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Help!!

Old posts that have not been replied to for several years.
t
typefighter

Post by typefighter »

Code: Select all

bind join * check:priority

proc check:priority {nick host hand chan} {
        if {[matchattr $hand -|o]} {
                pushmode $chan +v $nick
                return 0
        }
        return 0
}
I just dont understand why this isn't working. It's meant to voice a user who has a channel flag of "o" on the $chan when they join.

Is it staring me right in the face !? I've tried EVERYTHING i can think of.

- type
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

first of all.. .your bind is wrong... bind type flag trigger proc

Code: Select all

bind join -|o "#chan *" check:priority 

proc check:priority {nick host hand chan} { 
        pushmode $chan +v $nick 
} 
that's all you need really ;) replace #chan with * if you want it to apply to all channels
Elen sila lúmenn' omentielvo
t
typefighter

Post by typefighter »

Hi Papillon,

Yeh, that works. :) Thanks. But what if I needed (in future) to check in the IF ?

I'm assuming it's not

Code: Select all

 if {[matchattr $hand -|o $chan]} { body } 
- type.
t
typefighter

Post by typefighter »

Just another two quick questions, Papillon ...

This is what I have atm (just to test I am getting the hang of it) ...

Code: Select all


bind join - "#.Power *" check:priority

proc check:priority {nick host hand chan} {
        if {[matchchanattr $hand m]} {
                pushmode $chan +v $nick
                puthelp "NOTICE $nick :You are a .Master!"
                return 0
        }
}

What that does is voice a user who has a global "m" flag in #.Power.
What exactly does the "#.Power *" mean ? And ... when you say make the #chan a * for it to apply to any channel does that mean it would be "* *" ? or just "*" ?

- type.
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

If you read tcl-commands.doc, the mas/keyword portion of the join bind, matches two elements.

The channel name, and the nick!user@host of the user joinging. This can allow it retricted to isps, or nicknames.

For all channels, use "*" and not "* *".

Again, see tcl-commands.doc for a list of wildcards that can be used, and there meaning.

* with match any character and whitespace.

Thus, "* *" simply means that the string must have a space in the middle.
t
typefighter

Post by typefighter »

Ok guys,

Everything I have needed is working now - perfectly. Thankyou VERY VERY much. You have all been great and if I see you about, I'll buy you a drink :)

Thanks again all,

- type.

:D
Locked