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.
Old posts that have not been replied to for several years.
collett9
Voice
Posts: 11 Joined: Mon Dec 15, 2003 11:38 pm
Post
by collett9 » Wed Aug 18, 2004 11:43 pm
I'm trying to make a script that will repeat a certain text in a specific number of seconds (on a specified command)
set channel "#mychannel"
bind pub - .repeatgo cmd:repeatgo
proc cmd:repeatgo {nick host handle chan text} {
foreach channel $channel {
<here is where I'm lost>
}
}
Thanks in advanced.
Papillon
Owner
Posts: 724 Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no
Post
by Papillon » Thu Aug 19, 2004 3:44 am
Code: Select all
set channel "#mychannel"
bind pub - .repeatgo cmd:repeatgo
proc cmd:repeatgo {nick host handle chan text} {
#you have to make a global call to $channel
global channel
#Why do you do a loop when you only have one channel?
#also.. here you overwrite the previous global channel, change the first var
foreach c $channel {
#output the text you want
puthelp "PRIVMSG $c :....the text you want here..."
}
#and here you just add a utimer
utimer 30 [list cmd:repeatgo $nick $host $handle $chan $text]
}
Elen sila lúmenn' omentielvo
egghead
Master
Posts: 481 Joined: Mon Oct 29, 2001 8:00 pm
Contact:
Post
by egghead » Thu Aug 19, 2004 6:09 am
So what happens if a user types ".repeatgo" 100 times immediately after each other?
Papillon
Owner
Posts: 724 Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no
Post
by Papillon » Thu Aug 19, 2004 8:05 am
alot
Elen sila lúmenn' omentielvo
egghead
Master
Posts: 481 Joined: Mon Oct 29, 2001 8:00 pm
Contact:
Post
by egghead » Thu Aug 19, 2004 9:56 pm
hehe
awyeah
Revered One
Posts: 1580 Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:
Post
by awyeah » Fri Aug 20, 2004 10:20 am
egghead wrote: So what happens if a user types ".repeatgo" 100 times immediately after each other?
Then that user gets "Excess flood", along with the bot... heh.
·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================