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.

Voice IT (veryvery low script)

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
H
Hardliner
Voice
Posts: 2
Joined: Mon Nov 23, 2009 2:07 pm

Voice IT (veryvery low script)

Post by Hardliner »

Hello, at first my english is not really good :D 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 :D

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

THX alot.
User avatar
TCL_no_TK
Owner
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

Post by TCL_no_TK »

Code: Select all

 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 :)
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

Code: Select all

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.
<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. ;)

# now talking in eggdrop
<args> let's have sex
<return_1> okay
<speechles> lol
Post Reply