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 

+v with nick changes

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
piggy
Voice


Joined: 21 Aug 2005
Posts: 14
Location: London

PostPosted: Sat Oct 01, 2005 6:17 pm    Post subject: +v with nick changes Reply with quote

Hi Guys

Dont know if anyone can help me out with this. What im looking for is:

If i have a user set with the +v flag on the bot and the bot autovoices them on entry, what im wanting is for the bot to devoice (-v) them if they change their nick to say nick|away or nick^away or anything apart from their original nick and then to revoice them (v) when returning to their original nick.

Is this possible?

Any help would be most appreciated.

Thanks
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat Oct 01, 2005 7:24 pm    Post subject: Reply with quote

Code:
bind nick - * bla

proc bla {nick uhost hand chan nn} {
 global wasvoice
 if {[isvoice $nick $chan]} {
  pushmode $chan -v $nn
  set wasvoice([string tolower $nick:$chan]) 1
 } {
  if {[info exists wasvoice([set nc [string tolower $nn:$chan]])]} {
   pushmode $chan +v $nn
   unset wasvoice($nc)
  }
 }
}

_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
piggy
Voice


Joined: 21 Aug 2005
Posts: 14
Location: London

PostPosted: Sat Oct 01, 2005 8:02 pm    Post subject: +v with nick changes Reply with quote

Thanks for the quick response Sir_Fz most appreciated.

However it doesnt seem to be effecting the user when they change their nick to anything else.

I have added the nick for example joesoap to the bot and given it +v flag, the channel is also set with +autovoice

The autovoice part is all working fine when the user joins the bot sets +v automatically, but when that person changes nickname they remain +v

Any suggestions ?

Thanks
Back to top
View user's profile Send private message
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Sun Oct 02, 2005 4:32 am    Post subject: Reply with quote

though I cant find a syntax error, Ill ask anyway: any TCL errors? (read help us to help you)
_________________
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
Back to top
View user's profile Send private message MSN Messenger
piggy
Voice


Joined: 21 Aug 2005
Posts: 14
Location: London

PostPosted: Sun Oct 02, 2005 5:10 am    Post subject: +v with nick changes Reply with quote

Hey De Kus

I did the things that are stated in the "help us to help you" post

However im not recieving any tcl errors at all

Is there anything else i can possibly post here that might help ?

Thanks
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sun Oct 02, 2005 9:53 am    Post subject: Reply with quote

Try replacing
Code:
if {[isvoice $nick $chan]} {

with
Code:
if {[isvoice $nn $chan]} {

_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
piggy
Voice


Joined: 21 Aug 2005
Posts: 14
Location: London

PostPosted: Sun Oct 02, 2005 11:04 am    Post subject: +v with nick changes Reply with quote

Works like a charm Sir_Fz thanks alot for the help Smile
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive 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