| View previous topic :: View next topic |
| Author |
Message |
toXiP Voice
Joined: 01 Jan 2008 Posts: 10
|
Posted: Sat Feb 23, 2008 7:46 am Post subject: I need help with a script |
|
|
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. |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sat Feb 23, 2008 9:13 am Post subject: |
|
|
This has been requested before and I remember personally implementing it as well. Try searching the forum (use keywords like voice and tag). _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
toXiP Voice
Joined: 01 Jan 2008 Posts: 10
|
Posted: Sat Feb 23, 2008 3:44 pm Post subject: |
|
|
Found it! Thanks mate!
Edit: How can I specify the chan this shall work on? |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sat Feb 23, 2008 7:09 pm Post subject: |
|
|
| Code: | 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
}
} |
_________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
|