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.
Help for those learning Tcl or writing their own scripts.
Cr4sh
Halfop
Posts: 63 Joined: Sat Jan 14, 2006 5:16 pm
Contact:
Post
by Cr4sh » Fri Jun 02, 2006 8:09 am
I have these line:
Code: Select all
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.
DragnLord
Owner
Posts: 711 Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA
Post
by DragnLord » Fri Jun 02, 2006 8:32 am
this tip is only for adding the delay:
replace
Code: Select all
putserv "privmsg $chan : <message>"
with
Code: Select all
utimer 15 putserv "privmsg $chan : <message>"
(or
Code: Select all
utimer 15 { putserv "privmsg $chan : <message>" }
if you get errors on this part)
Cr4sh
Halfop
Posts: 63 Joined: Sat Jan 14, 2006 5:16 pm
Contact:
Post
by Cr4sh » Fri Jun 02, 2006 9:10 am
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':"
avilon
Halfop
Posts: 64 Joined: Tue Jul 13, 2004 6:58 am
Location: Germany
Post
by avilon » Fri Jun 02, 2006 9:51 am
Code: Select all
utimer 15 [list putserv "PRIVMSG $chan :<message>"]
Cr4sh
Halfop
Posts: 63 Joined: Sat Jan 14, 2006 5:16 pm
Contact:
Post
by Cr4sh » Fri Jun 02, 2006 10:00 am
This works good, thx
Now remain only one problem...
De Kus
Revered One
Posts: 1361 Joined: Sun Dec 15, 2002 11:41 am
Location: Germany
Post
by De Kus » Fri Jun 02, 2006 10:16 am
Maybe something like this?
Code: Select all
utimer 15 [list if [list [onchan $nick $chan]] [list putserv "PRIVMSG $chan :<message>"]]
Edit: I corrceted the script
Last edited by
De Kus on Fri Jun 02, 2006 10:27 am, edited 1 time in total.
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...
Cr4sh
Halfop
Posts: 63 Joined: Sat Jan 14, 2006 5:16 pm
Contact:
Post
by Cr4sh » Fri Jun 02, 2006 10:41 am
Probably, but i read...Tcl error [onjoin]: wrong # args: should be "utimer seconds command"...
Cr4sh
Halfop
Posts: 63 Joined: Sat Jan 14, 2006 5:16 pm
Contact:
Post
by Cr4sh » Sun Jun 04, 2006 1:17 pm
Nobody else have an idea?
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Sun Jun 04, 2006 5:41 pm
Code: Select all
utimer 15 [list msgchan $nick $chan]
and add this proc to the script:
Code: Select all
proc msgchan {nick chan} {
if {[onchan $nick $chan]} {
puthelp "privmsg $chan :<message>"
}
}
Cr4sh
Halfop
Posts: 63 Joined: Sat Jan 14, 2006 5:16 pm
Contact:
Post
by Cr4sh » Sun Jun 04, 2006 6:15 pm
YOU ARE GREAT!!!
Works perfectly, thx.