| View previous topic :: View next topic |
| Author |
Message |
Hardliner Voice
Joined: 23 Nov 2009 Posts: 2
|
Posted: Mon Nov 23, 2009 2:12 pm Post subject: Voice IT (veryvery low script) |
|
|
Hello, at first my english is not really good 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
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
THX alot. |
|
| Back to top |
|
 |
TCL_no_TK Owner

Joined: 25 Aug 2006 Posts: 509 Location: England, Yorkshire
|
Posted: Fri Dec 04, 2009 5:48 pm Post subject: |
|
|
| 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  _________________ TCL the misunderstood |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Fri Dec 04, 2009 11:07 pm Post subject: |
|
|
| 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.
# now talking in eggdrop
<args> let's have sex
<return_1> okay
<speechles> lol _________________ speechles' eggdrop tcl archive |
|
| Back to top |
|
 |
|
|
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
|
|