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.

Timed voice dont work...., the egg voices all user onjoin!

Old posts that have not been replied to for several years.
Locked
H
HecKel
Voice
Posts: 23
Joined: Wed Jan 19, 2005 3:50 pm
Location: Lisbon, Portugal

Timed voice dont work...., the egg voices all user onjoin!

Post by HecKel »

I want the egg voices an user without op after 2 minutes, then I create that..., bug now the eggs voices all users aswell oped users..., and don't wait the 2 minutes..., what is wrong?
bind join - * join:autovoice

proc join:autovoice {nick host hand chan} {
if {$chan == "#lamers"} {
utimer 120 [autovoice $nick $chan]
}
}
proc autovoice {nick chan} {
if {![isop $nick $chan]} {pushmode $chan +v $nick}
}
s
spock
Master
Posts: 319
Joined: Thu Dec 12, 2002 8:40 pm

Post by spock »

utimer 120 [list autovoice $nick $chan]

(can also use "timer 2")
photon?
User avatar
YooHoo
Owner
Posts: 939
Joined: Thu Feb 13, 2003 10:07 pm
Location: Redwood Coast

Re: Timed voice dont work...., the egg voices all user onjoi

Post by YooHoo »

HecKel wrote:I want the egg voices an user without op after 2 minutes, then I create that..., bug now the eggs voices all users aswell oped users..., and don't wait the 2 minutes..., what is wrong?

Code: Select all

aop-delay                autoop or autovoice delaytime
      0:0  no delay
      x:x  x sec delaytime
      x:y  random delay, minimum x sec, maximum y sec
H
HecKel
Voice
Posts: 23
Joined: Wed Jan 19, 2005 3:50 pm
Location: Lisbon, Portugal

Post by HecKel »

yes, i read that, but i want that if an user isn't on eggs db he voice too

tnks HecKel
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

HecKel wrote:yes, i read that, but i want that if an user isn't on eggs db he voice too

tnks HecKel
This code will do the same, I see no flag for the bind, it is empty meaning everyone and anyone will get a voice. A simple autovoice script with a delaying queue.

Code: Select all

bind join - "*" join:autovoice

proc join:autovoice {nick host hand chan} {
 if {![isbotnick $nick] && [string equal -nocase "#lamers" $chan]} {
  utimer 120 [list autovoice $nick $chan]
  }
}


proc autovoice {nick chan} {
if {![isop $nick $chan] && ![isvoice $nick $chan]} {
  pushmode $chan +v $nick
  }
}
NOTE: You can also use:
utimer 120 "pushmode $chan +v $nick"
If you want to make it more simpler. But for this you will not need the second proc "autovoice", and also would not be able to check for if the nick was opped or voiced in the past 120 seconds or so.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

awyeah wrote:and also would not be able to check for if the nick was opped or voiced in the past 120 seconds or so.
half correct, pushmode won't send a +v command line to the server from someone he knows as beeing voiced (checked raw log from 1.6.18+notesfix). Thats one of many advantages from pushmode to putserv ;). however, since +o doesnt implict +v, it will of course voice someone who was opped ;).
if believe spocks first is still the best for what he wants ;). He just made the mistake, that [autovoice ...] will imidiatly call autovoice and forward the return value from autovoice to utimer (in this case it was an empty string) :D.
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...
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Okay then use, putdccraw, putserv, putquick, put[whateveryoufeellike] also maybe puthelp can also work? not sure! :P. I just used pushmode because it already came within the source code.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Locked