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.

I need help with a script

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
t
toXiP
Voice
Posts: 10
Joined: Tue Jan 01, 2008 11:00 am

I need help with a script

Post by toXiP »

Hi there!

I was wondering if someone could help me with a script here. I wan't to voice users with a special tag, f. ex: TAGGY|<nick>, both on join and on newnick. When changing back from TAGGY|, I wan't to devoice.

Thx.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

This has been requested before and I remember personally implementing it as well. Try searching the forum (use keywords like voice and tag).
t
toXiP
Voice
Posts: 10
Joined: Tue Jan 01, 2008 11:00 am

Post by toXiP »

Found it! Thanks mate!

Edit: How can I specify the chan this shall work on?
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Code: Select all

set tagChans "#chan1 #chan2 #chan3"

bind join - {% TAG|*} voice:user
bind nick - {% TAG|*} voice:user
bind nick - * devoice:user

proc voice:user {nick uhost hand chan {nn ""}} {
 global tagChans
 if {$nn == ""} {set nn $nick}
 if {[lsearch -exact [split [string tolower $tagChans]] [string tolower $chan]] != -1 && ![isvoice $nn $chan]} {
  pushmode $chan +v $nn
 }
}

proc devoice:user {nick uhost hand chan nn} {
 if {[lsearch -exact [split [string tolower $tagChans]] [string tolower $chan]] != -1 && ![string match -nocase tag|* $nn] && [isvoice $nn $chan]} {
  pushmode $chan -v $nn
 }
}
Post Reply