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 chan join

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
o
opsb
Halfop
Posts: 41
Joined: Sat Sep 01, 2007 1:41 pm

Help chan join

Post by opsb »

hi

I need script that will check if user is channel op, halfop, or voice, (on join) and if is not one of 3 will greet msg like Hey nick, ask question and wait for answer.

I've tried to search TCL archive for didnt found anything.

Regrads.
o
opsb
Halfop
Posts: 41
Joined: Sat Sep 01, 2007 1:41 pm

Post by opsb »

Anyone pls :)
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Untested, but should work..

Code: Select all

proc greet_nonop {nick host hand chan} {
 puthelp "PRIVMSG $chan :Hey $nick, ask question and wait for answer."
}

bind join -voh& * greet_nonop
NML_375
o
opsb
Halfop
Posts: 41
Joined: Sat Sep 01, 2007 1:41 pm

Post by opsb »

nml375 wrote:Untested, but should work..

Code: Select all

proc greet_nonop {nick host hand chan} {
 puthelp "PRIVMSG $chan :Hey $nick, ask question and wait for answer."
}

bind join -voh& * greet_nonop

Thnx for reply but won't work :(
/me thinks that -voh means that script will trigger only if users with v o h flags join chan.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

opsb wrote:/me thinks that -voh means that script will trigger only if users with v o h flags join chan.
- means NOT voh.
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Actually, it would seem bindings does not honor "negating flags", so we'll have to do it the other way... Also, just remembered that halfop is "l", not "h"..

Code: Select all

proc greet_nonop {nick host hand chan} {
 if {[matchattr $hand "-flo&-flo" $chan]} {
  puthelp "PRIVMSG $chan :Hey $nick, ask question and wait for answer."
 }
}

bind join - * greet_nonop
NML_375
Post Reply