| View previous topic :: View next topic |
| Author |
Message |
Branden Halfop
Joined: 04 Aug 2007 Posts: 61
|
Posted: Sat Sep 27, 2008 11:22 pm Post subject: Autojoiner after 5 seconds! [Help] |
|
|
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 |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Sun Sep 28, 2008 9:29 am Post subject: |
|
|
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 |
|
 |
Branden Halfop
Joined: 04 Aug 2007 Posts: 61
|
Posted: Sun Sep 28, 2008 10:32 am Post subject: |
|
|
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 |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Sun Sep 28, 2008 10:58 am Post subject: |
|
|
| Code: | | utimer 5 [list putquick "SAJOIN #main [stripcodes bcruag $User]"] |
_________________ speechles' eggdrop tcl archive |
|
| Back to top |
|
 |
|