View previous topic :: View next topic |
Author |
Message |
piggy Voice

Joined: 21 Aug 2005 Posts: 14 Location: London
|
Posted: Sat Oct 01, 2005 6:17 pm Post subject: +v with nick changes |
|
|
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 |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sat Oct 01, 2005 7:24 pm Post subject: |
|
|
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 |
|
 |
piggy Voice

Joined: 21 Aug 2005 Posts: 14 Location: London
|
Posted: Sat Oct 01, 2005 8:02 pm Post subject: +v with nick changes |
|
|
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 |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Sun Oct 02, 2005 4:32 am Post subject: |
|
|
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 |
|
 |
piggy Voice

Joined: 21 Aug 2005 Posts: 14 Location: London
|
Posted: Sun Oct 02, 2005 5:10 am Post subject: +v with nick changes |
|
|
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 |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sun Oct 02, 2005 9:53 am Post subject: |
|
|
Try replacing
Code: | if {[isvoice $nick $chan]} { |
with
Code: | if {[isvoice $nn $chan]} { |
_________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
Back to top |
|
 |
piggy Voice

Joined: 21 Aug 2005 Posts: 14 Location: London
|
Posted: Sun Oct 02, 2005 11:04 am Post subject: +v with nick changes |
|
|
Works like a charm Sir_Fz thanks alot for the help  |
|
Back to top |
|
 |
|