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 

Autojoiner after 5 seconds! [Help]

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


Joined: 04 Aug 2007
Posts: 61

PostPosted: Sat Sep 27, 2008 11:22 pm    Post subject: Autojoiner after 5 seconds! [Help] Reply with quote

I would like my bot to sajoin a user after they connect to the network, but wait 5 seconds before it does it.



Code:

bind pubm - "*CONNECT*" CONNECT

proc CONNECT { nick host hand chan text } {
   set User [lindex [split $text] 3]
   if {$chan == "#4ct1v1ty"} {
      utimer 5 "putquick SAJOIN #main $User"
   } else {
      return
   }
}





Everything is right, except I can't figure out how to make the timer work correctly.
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Sun Sep 28, 2008 9:29 am    Post subject: Reply with quote

putquick only expects one argument, you are currently supplying three...
Try the code below instead, as it uses proper list structures to create the commandline used with utimer...
Code:
bind pubm - "*CONNECT*" CONNECT

proc CONNECT { nick host hand chan text } {
   set User [lindex [split $text] 3]
   if {$chan == "#4ct1v1ty"} {
      utimer 5 [list putquick "SAJOIN #main $User"]
   } else {
      return
   }
}

_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
Branden
Halfop


Joined: 04 Aug 2007
Posts: 61

PostPosted: Sun Sep 28, 2008 10:32 am    Post subject: Reply with quote

Okay, I have a new problem.

The $User is underlined, and I don't know how to remove the underline in the variable. How can I remove it?
Back to top
View user's profile Send private message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Sun Sep 28, 2008 10:58 am    Post subject: Reply with quote

Code:
utimer 5 [list putquick "SAJOIN #main [stripcodes bcruag $User]"]

_________________
speechles' eggdrop tcl archive
Back to top
View user's profile Send private message
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