| View previous topic :: View next topic |
| Author |
Message |
isis123 Voice
Joined: 01 Sep 2005 Posts: 13
|
Posted: Thu Sep 01, 2005 12:09 am Post subject: I just want at timer :( |
|
|
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 |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Thu Sep 01, 2005 12:58 am Post subject: |
|
|
| read tcl-commands.doc, pay attention to [timer] and [putserv] |
|
| Back to top |
|
 |
isis123 Voice
Joined: 01 Sep 2005 Posts: 13
|
Posted: Thu Sep 01, 2005 1:01 am Post subject: |
|
|
ok i made one but it doesnt work. whats wrong?
| Code: |
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
|
|
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Thu Sep 01, 2005 1:34 am Post subject: |
|
|
you need to learn how to post by reading the top sticky post on this forum
try again after removing [lsearch] checks |
|
| Back to top |
|
 |
isis123 Voice
Joined: 01 Sep 2005 Posts: 13
|
Posted: Thu Sep 01, 2005 1:48 am Post subject: |
|
|
| thanks. |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Thu Sep 01, 2005 2:00 am Post subject: |
|
|
| heh, you made me drop my real insult too |
|
| Back to top |
|
 |
isis123 Voice
Joined: 01 Sep 2005 Posts: 13
|
Posted: Thu Sep 01, 2005 2:05 am Post subject: |
|
|
| i missunderstood you, i thought you called me names, sorrsy. |
|
| Back to top |
|
 |
|