| View previous topic :: View next topic |
| Author |
Message |
Cr4sh Halfop

Joined: 14 Jan 2006 Posts: 63
|
Posted: Fri Jun 02, 2006 8:09 am Post subject: Welcome message delay [solved] |
|
|
I have these line:
| Code: |
proc onjoin {nick host hand chan} {
global botnick
if {$botnick == $nick} {
} else {
if {[validuser $nick] == 1} {
if {[passwdok "$hand" ""] == "1"} {
putlog "$nick ($hand) Does Not Have A Password Set. /msg $nick."
putserv "privmsg $nick :You Don't Have A Password Set On Me. Please One Set One Now By Typing: /msg $botnick pass <PASSWORD>"
}
}
putserv "privmsg $chan : <message>"
}
}
|
I want to delay (about 15 sec.) the welcome message...
Please, how i must to modify for to do this? 
Last edited by Cr4sh on Sun Jun 04, 2006 6:16 pm; edited 1 time in total |
|
| Back to top |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Fri Jun 02, 2006 8:32 am Post subject: |
|
|
this tip is only for adding the delay:
replace
| Code: | | putserv "privmsg $chan : <message>" |
with
| Code: | | utimer 15 putserv "privmsg $chan : <message>" |
(or
| Code: | | utimer 15 { putserv "privmsg $chan : <message>" } |
if you get errors on this part) |
|
| Back to top |
|
 |
Cr4sh Halfop

Joined: 14 Jan 2006 Posts: 63
|
Posted: Fri Jun 02, 2006 9:10 am Post subject: |
|
|
Thx man!
The last thing...
I want that only if the user remain on the channel, the bot give to him the welcome...
Something like this:
if ($1 ison #channel) {utimer 15 putserv "privmsg $chan : <message>"}
...i've tried to modify with utimer 15 putserv "privmsg $chan : <message>"...i read "Tcl error [onjoin]: wrong # args: should be "utimer seconds command""
with...utimer 15 { putserv "privmsg $chan : <message>" }...i read "Tcl error in script for 'timer356':"  |
|
| Back to top |
|
 |
avilon Halfop

Joined: 13 Jul 2004 Posts: 64 Location: Germany
|
Posted: Fri Jun 02, 2006 9:51 am Post subject: |
|
|
| Code: | | utimer 15 [list putserv "PRIVMSG $chan :<message>"] |
|
|
| Back to top |
|
 |
Cr4sh Halfop

Joined: 14 Jan 2006 Posts: 63
|
Posted: Fri Jun 02, 2006 10:00 am Post subject: |
|
|
This works good, thx
Now remain only one problem... |
|
| Back to top |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Fri Jun 02, 2006 10:16 am Post subject: |
|
|
Maybe something like this?
| Code: | | utimer 15 [list if [list [onchan $nick $chan]] [list putserv "PRIVMSG $chan :<message>"]] |
Edit: I corrceted the script _________________ 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...
Last edited by De Kus on Fri Jun 02, 2006 10:27 am; edited 1 time in total |
|
| Back to top |
|
 |
Cr4sh Halfop

Joined: 14 Jan 2006 Posts: 63
|
Posted: Fri Jun 02, 2006 10:41 am Post subject: |
|
|
Probably, but i read...Tcl error [onjoin]: wrong # args: should be "utimer seconds command"...  |
|
| Back to top |
|
 |
Cr4sh Halfop

Joined: 14 Jan 2006 Posts: 63
|
Posted: Sun Jun 04, 2006 1:17 pm Post subject: |
|
|
| Nobody else have an idea? |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sun Jun 04, 2006 5:41 pm Post subject: |
|
|
| Code: | | utimer 15 [list msgchan $nick $chan] |
and add this proc to the script:
| Code: | proc msgchan {nick chan} {
if {[onchan $nick $chan]} {
puthelp "privmsg $chan :<message>"
}
} |
_________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
Cr4sh Halfop

Joined: 14 Jan 2006 Posts: 63
|
Posted: Sun Jun 04, 2006 6:15 pm Post subject: |
|
|
YOU ARE GREAT!!!
Works perfectly, thx.  |
|
| Back to top |
|
 |
|