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 IT (veryvery low script)

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
Hardliner
Voice


Joined: 23 Nov 2009
Posts: 2

PostPosted: Mon Nov 23, 2009 2:12 pm    Post subject: Voice IT (veryvery low script) Reply with quote

Hello, at first my english is not really good Very Happy iam comming form German, but now to the Script

I Search an TCL script for voice, but not autovoice.

Example:

Testuser: .voice
Testbot: +v Testuser (Testuser@host.u.now.me.de]
+Testuser: hey it works Very Happy

but not with names, i will that bot accept the voice only when he is saved at the bot. But not with name, i will it with host or with Auth...

it this posible?

Sry for my bad english Very Happy

THX alot.
Back to top
View user's profile Send private message
TCL_no_TK
Owner


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

PostPosted: Fri Dec 04, 2009 5:48 pm    Post subject: Reply with quote

Code:
 bind pub v|v .voice pub:voice

 proc pub:voice {nick host hand chan text} {
  pushmode $chan +v $nick
  return 1
 }
should do the job, if i am reading your post correctly Smile
_________________
TCL the misunderstood
Back to top
View user's profile Send private message Send e-mail
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Fri Dec 04, 2009 11:07 pm    Post subject: Reply with quote

Code:
bind pub vgmn|vgmn .up pub:voice
bind pub vgmn|vgmn .down pub:voice

proc pub:voice {nick host hand chan text} {
   switch -- $::lastbind {
     ".up" { set voice "+" }
     ".down" { set voice "-" }
   }
   if {[info exists voice]} {
      set target $nick
      if {[matchattr $hand mn|mn $chan]} {
         if {[string length [lindex [split $text] 0]]} {
            set target [lindex [split $text] 0]
         }
      }
      pushmode $chan ${voice}v $target
   }
}

You should allow either +v or +g flags , this allows both the voice mechanisms eggdrop uses. This also expands the idea to allow master/owners (+m/+n) to move users up or down.

Quote:
<nick> .up
* bot sets mode: +v nick
<+nick> it works :)
<@owner> .down nick
* bot sets mode: -v nick
<nick> :(
<nick> .down owner
<nick> won't work for me :(((
<@owner> .up nick
* bot sets mode: +v nick
<@owner> .up
* bot sets mode: +v owner
<+@owner> only for me :P


Also, a final note: Ditch the "return 1" it has no purpose. All it does is cause users to wonder, "Why doesn't my eggdrop log things???!" or the better one, "Why can't I stack pubms to everything said (*)???!!!" .. The answers to both of those is somewhere some script is returning 1 to a bind...

"return 1" is the retarded cousin of "args". I imagine more than likely that, "return 1" and "args" are also inbred incestual cousins...
But being serious now, both of these "special" parameters are barely documented leading to confusion over the cause and cure. Which in turn makes a small problem larger, and hair pulling more frequent. To avoid these headaches (visible bracings and console/log/pubm/msgm problems) proactively limit your use of "return 1" or "args" to exceptional cases that require it, not just for purposelessness. Wink

# now talking in eggdrop
<args> let's have sex
<return_1> okay
<speechles> lol
_________________
speechles' eggdrop tcl archive
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests 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