egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

I need help with a script

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
toXiP
Voice


Joined: 01 Jan 2008
Posts: 10

PostPosted: Sat Feb 23, 2008 7:46 am    Post subject: I need help with a script Reply with quote

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
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat Feb 23, 2008 9:13 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
toXiP
Voice


Joined: 01 Jan 2008
Posts: 10

PostPosted: Sat Feb 23, 2008 3:44 pm    Post subject: Reply with quote

Found it! Thanks mate!

Edit: How can I specify the chan this shall work on?
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat Feb 23, 2008 7:09 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber