egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Welcome message delay [solved]

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
Cr4sh
Halfop


Joined: 14 Jan 2006
Posts: 63

PostPosted: Fri Jun 02, 2006 8:09 am    Post subject: Welcome message delay [solved] Reply with quote

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? Embarassed


Last edited by Cr4sh on Sun Jun 04, 2006 6:16 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Fri Jun 02, 2006 8:32 am    Post subject: Reply with quote

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
View user's profile Send private message
Cr4sh
Halfop


Joined: 14 Jan 2006
Posts: 63

PostPosted: Fri Jun 02, 2006 9:10 am    Post subject: Reply with quote

Thx man! Wink
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':" Crying or Very sad
Back to top
View user's profile Send private message Visit poster's website
avilon
Halfop


Joined: 13 Jul 2004
Posts: 64
Location: Germany

PostPosted: Fri Jun 02, 2006 9:51 am    Post subject: Reply with quote

Code:
utimer 15 [list putserv "PRIVMSG $chan :<message>"]
Back to top
View user's profile Send private message
Cr4sh
Halfop


Joined: 14 Jan 2006
Posts: 63

PostPosted: Fri Jun 02, 2006 10:00 am    Post subject: Reply with quote

This works good, thx Wink
Now remain only one problem...
Back to top
View user's profile Send private message Visit poster's website
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Fri Jun 02, 2006 10:16 am    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
Cr4sh
Halfop


Joined: 14 Jan 2006
Posts: 63

PostPosted: Fri Jun 02, 2006 10:41 am    Post subject: Reply with quote

Probably, but i read...Tcl error [onjoin]: wrong # args: should be "utimer seconds command"... Sad
Back to top
View user's profile Send private message Visit poster's website
Cr4sh
Halfop


Joined: 14 Jan 2006
Posts: 63

PostPosted: Sun Jun 04, 2006 1:17 pm    Post subject: Reply with quote

Nobody else have an idea?
Back to top
View user's profile Send private message Visit poster's website
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sun Jun 04, 2006 5:41 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Cr4sh
Halfop


Joined: 14 Jan 2006
Posts: 63

PostPosted: Sun Jun 04, 2006 6:15 pm    Post subject: Reply with quote

YOU ARE GREAT!!!
Works perfectly, thx. Wink
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber