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.

I just want at timer :(

Old posts that have not been replied to for several years.
Locked
i
isis123
Voice
Posts: 13
Joined: Thu Sep 01, 2005 12:06 am

I just want at timer :(

Post by isis123 »

Hi, all I want is a simple timer which puts a message in a channel every 2 minutes.
So the channel should be #jonathan
the message should be "hello"
and every 2 minutes.

Can someone help me? thank you
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

read tcl-commands.doc, pay attention to [timer] and [putserv]
i
isis123
Voice
Posts: 13
Joined: Thu Sep 01, 2005 12:06 am

Post by isis123 »

ok i made one but it doesnt work. whats wrong?

Code: Select all

set channel "#omfgnaps #spielersuche"

set time 3
set text {
"hi"
}



if {[string compare [string index $time 0] "!"] == 0} { set timer [string range $time 1 end] } { set timer [expr $time * 60] }
if {[lsearch -glob [utimers] "* go *"] == -1} { utimer $timer go }

proc go {} {
global channel time text timer
foreach chan $channel {
foreach line $text { putserv "PRIVMSG $chan :$line" }
}
if {[lsearch -glob [utimers] "* go *"] == -1} { utimer $timer go }
}

putlog
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

you need to learn how to post by reading the top sticky post on this forum

try again after removing [lsearch] checks
i
isis123
Voice
Posts: 13
Joined: Thu Sep 01, 2005 12:06 am

Post by isis123 »

thanks.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

heh, you made me drop my real insult too
i
isis123
Voice
Posts: 13
Joined: Thu Sep 01, 2005 12:06 am

Post by isis123 »

i missunderstood you, i thought you called me names, sorrsy.
Locked