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.

+v with nick changes

Old posts that have not been replied to for several years.
Locked
User avatar
piggy
Voice
Posts: 14
Joined: Sun Aug 21, 2005 11:51 am
Location: London

+v with nick changes

Post by piggy »

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

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)
  }
 }
}
User avatar
piggy
Voice
Posts: 14
Joined: Sun Aug 21, 2005 11:51 am
Location: London

+v with nick changes

Post by piggy »

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
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

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...
User avatar
piggy
Voice
Posts: 14
Joined: Sun Aug 21, 2005 11:51 am
Location: London

+v with nick changes

Post by piggy »

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
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Try replacing

Code: Select all

if {[isvoice $nick $chan]} {
with

Code: Select all

if {[isvoice $nn $chan]} {
User avatar
piggy
Voice
Posts: 14
Joined: Sun Aug 21, 2005 11:51 am
Location: London

+v with nick changes

Post by piggy »

Works like a charm Sir_Fz thanks alot for the help :)
Locked