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 

voice only with specific flag

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
ultralord
Master


Joined: 06 Nov 2006
Posts: 255

PostPosted: Wed Oct 17, 2007 9:52 am    Post subject: voice only with specific flag Reply with quote

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


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Wed Oct 17, 2007 7:00 pm    Post subject: Reply with quote

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


Joined: 06 Nov 2006
Posts: 255

PostPosted: Fri Oct 19, 2007 3:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
TCL_no_TK
Owner


Joined: 25 Aug 2006
Posts: 509
Location: England, Yorkshire

PostPosted: Sat Oct 20, 2007 7:38 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Sat Oct 20, 2007 7:41 am    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help 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