| View previous topic :: View next topic |
| Author |
Message |
ultralord Master

Joined: 06 Nov 2006 Posts: 255
|
Posted: Wed Oct 17, 2007 9:52 am Post subject: voice only with specific flag |
|
|
Hello i have this script..
| Code: | set g_pickupchan "#channel"
bind mode - "% +v" g_delvoices
proc g_delvoices {nick host handle channel mode victim} {
global g_pickupchan
if { [matchattr $hand H] } {
return 0
}
if {$channel==$g_pickupchan} {
putserv "MODE $g_pickupchan -v $victim"
}
} |
i want this: if someone have flag H .. if give voice to a user then the user will be voiced.. if someone give voice bot devoice the user.. how i can do it..?
thnx |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Wed Oct 17, 2007 7:00 pm Post subject: |
|
|
| Code: | | if {![matchattr $handle H|H $channel]} {return} |
_________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
ultralord Master

Joined: 06 Nov 2006 Posts: 255
|
Posted: Fri Oct 19, 2007 3:07 pm Post subject: |
|
|
i edit the code to:
| Code: |
proc g_delvoices {nick host handle channel mode victim} {
global g_pickupchan
if {![matchattr $handle H|H $channel]} {return}
if {$channel==$g_pickupchan} {
putserv "MODE $g_pickupchan -v $victim"
}
} |
but when i give voice then the bot devoice the specific nick.. but i am authenticated before.. what is wrong?
thanks |
|
| Back to top |
|
 |
TCL_no_TK Owner

Joined: 25 Aug 2006 Posts: 509 Location: England, Yorkshire
|
Posted: Sat Oct 20, 2007 7:38 am Post subject: |
|
|
Check your channel settings, or see if you have superbitch.tcl settings on that channel. look for +bitch on .chaninfo #channel_name And there is also a chance that the user could have been given the devoice flag check the .whois <handle> on the DCC/Chat telnet partyline. _________________ TCL the misunderstood |
|
| Back to top |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Sat Oct 20, 2007 7:41 am Post subject: |
|
|
I wonder why you use 2 if conditions in such a trivial issue. Also using pushmode is considered more spam proof, because it can accumulate mode requests which might arise in a join-flood... these often arise on net rejoins.
| Code: | if {![matchattr $handle H|H $channel] && $channel == $::g_pickupchan} {
pushmode $channel -v $victim
}
return 0 |
These 4 lines of code would be enough within the proc.
Also about the person who grants voice... if the person who has the flag H voices a person, it is fine, in all other (all is in, even permanent owner is not recognized) cases it should devoice the person?! _________________ 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 |
|
 |
|