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.
Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
ultralord
Master
Posts: 255 Joined: Mon Nov 06, 2006 6:52 pm
Post
by ultralord » Sun Nov 18, 2007 8:39 pm
Hello how i can make one script.. and when 3 users type !vote in query of bot then bot will be rehashed.. if only 1-2 press !vote after 5 minites votes will be delete.. and when votes is 3 then bot rehashed.. can some know how i can make it?
ultralord
Master
Posts: 255 Joined: Mon Nov 06, 2006 6:52 pm
Post
by ultralord » Thu Nov 22, 2007 2:12 pm
anyone can help me with that?
rosc2112
Revered One
Posts: 1454 Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania
Post
by rosc2112 » Thu Nov 22, 2007 10:02 pm
quit bumping..obviously no one wants to bother. It's time you start learning tcl for yourself.
tueb
Halfop
Posts: 76 Joined: Thu Oct 04, 2007 6:09 am
Location: #quiz.de @ irc.gamesurge.net
Contact:
Post
by tueb » Fri Nov 23, 2007 7:34 am
hi,
i haven't tested this:
Code: Select all
bind pub - !rehash bot_rehash
#seconds until voting ends
variable utime 300
variable rehashcount 0
variable rehasher ""
variable rehashchan ""
proc bot_rehash {nick host handle channel text} {
global rehashcount rehasher rehashchan utime
if {[lsearch -exact $rehasher $host] != -1} {
puthelp "NOTICE $nick :You already voted!"
return
} else {
lappend rehasher $host
}
if {$rehashcount==0} {
utimer $utime timer_rehash
}
incr rehashcount
set rehashchan $channel
if {$rehashcount > 2} {
timer_rehash
}
}
proc timer_rehash {} {
global rehashcount rehashchan rehasher botnick
if {$rehashcount > 2} {
puthelp "PRIVMSG $rehashchan :\002$botnick will be rehashed.\002"
rehash
}
set rehashcount 0
set rehasher ""
}
i overread the query-part. if it's important, i'll fix it.
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Fri Nov 23, 2007 11:37 am
Try
Code: Select all
bind msg - !vote vote:rehash
proc vote:rehash {nick uhost hand arg} {
if {[throttled vote 300] == 3} {
putlog "Rehashing after 3 rehash votes..."
set ::throttled(vote) 0
rehash
}
}
# user's throttled procedure with slight modification
proc throttled {id time} {
global throttled
if {[info exists throttled($id)]} {
incr throttled($id)
} {
set throttled($id) 1
utimer $time [list unset throttled($id)]
}
return $throttled($id)
}
ultralord
Master
Posts: 255 Joined: Mon Nov 06, 2006 6:52 pm
Post
by ultralord » Sat Nov 24, 2007 5:09 pm
nice job thnx is working...
halloaizq
Voice
Posts: 24 Joined: Mon Aug 27, 2007 5:01 am
Contact:
Post
by halloaizq » Mon Dec 03, 2007 2:22 am
Hi... can someone help me how to auto rehash my eggdrop every 'x' minutes??example for every 5 minutes .. tq
: halloaizq :
halloaizq
Voice
Posts: 24 Joined: Mon Aug 27, 2007 5:01 am
Contact:
Post
by halloaizq » Mon Dec 03, 2007 2:36 am
Tq bro ..
: halloaizq :
Alchera
Revered One
Posts: 3344 Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:
Post
by Alchera » Mon Dec 03, 2007 6:16 am
halloaizq wrote: Tq bro ..
No problem.
Add [SOLVED] to the thread title if your issue has been.
Search |
FAQ |
RTM
halloaizq
Voice
Posts: 24 Joined: Mon Aug 27, 2007 5:01 am
Contact:
Post
by halloaizq » Thu Dec 06, 2007 4:40 am
ok bro ... my eggy now rehash every x minutes .. the problem now ... sometime my eggy rehash every minutes... so any idea what going on?also .. izit ok to my eggy or shell account??
: halloaizq :
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Thu Dec 06, 2007 3:55 pm
Could be because the time setting changed on your Eggdrop's machine. As to whether it's OK to rehash every x minutes, usually if a rehash is not needed then it's not recommended. Why do you want to rehash every 5 minutes?