| View previous topic :: View next topic |
| Author |
Message |
Bondie Voice
Joined: 17 Dec 2006 Posts: 7
|
Posted: Sun Dec 17, 2006 2:06 pm Post subject: help with an automated join script |
|
|
Hello.
I have a a request script that tells the bot (wich can be requested) to join a channel.
The request Script works with a msg (its written in msl) like.... a user requests a bot < !request #channel > my msl Bot goes to check the chan and if all requirements meet the bot joins the channel after i got a msg from the requestbot ( /msg botname join/part #channel). well my problem is that it does not work in TCL language coz i am not that good in TCL scripting and i need some help.
Here is the msl script that the bot (who can be requested) is using
| Code: | on *:TEXT:join *:?:{
if ($nick == requester) {
join $2
}
}
on *:TEXT:part *:?:{
if ($nick == requester) {
part $2
}
} |
and that is the TCL code, wich is not working
| Code: |
bind MSG - "join" join
bind MSG - "part" part
proc join { nickname hostname handle channel arguments } {
if {($nickname == "requester")} {
channel add $arguments
}
}
proc part { nickname hostname handle channel arguments } {
if {($nickname == "requester")} {
channel remove $arguments
}
} |
|
|
| Back to top |
|
 |
metroid Owner
Joined: 16 Jun 2004 Posts: 771
|
Posted: Sun Dec 17, 2006 3:17 pm Post subject: |
|
|
| You are using the wrong arguments for MSG. Read the tcl-commands.doc. |
|
| Back to top |
|
 |
Bondie Voice
Joined: 17 Dec 2006 Posts: 7
|
Posted: Sun Dec 17, 2006 3:37 pm Post subject: |
|
|
| metroid wrote: | | You are using the wrong arguments for MSG. Read the tcl-commands.doc. |
edit: i have tried that.... but still not working. Really need support. Please
| Code: | bind msg - join msg:join
proc msg:join { nickname hostname handle channel arguments } {
channel add $arguments
}
|
|
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sun Dec 17, 2006 6:07 pm Post subject: |
|
|
| Quote: | MSG
bind msg <flags> <command> <proc>
procname <nick> <user@host> <handle> <text>
Description: used for /msg commands. The first word of the user's
msg is the command, and everything else becomes the text argument.
Module: server
|
do you see a 'channel' argument passed to the proc? _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
|