| View previous topic :: View next topic |
| Author |
Message |
holycrap Op
Joined: 21 Jan 2008 Posts: 152
|
Posted: Mon Jun 08, 2009 9:11 am Post subject: !wb public command [SOLVED] |
|
|
Hi,
I have a simple mIRC code below which does the following:
<holycrap> !wb test
<bot> Welcome back, test!
How do I go about doing this in TCL? I want to add more commands, for exe in the code below I can just copy and paste the entire block and change *wb* to something else and I have another command. Can someone show me how to do this in TCL?
Thank you!
| Code: | on *:text:*wb*:#: {
if $1 == %c $+ wb {
if $2 == $null { msg $chan 13Welcome Back $nick $+ ! | halt }
else { msg $chan 13Welcome Back $2 $+ ! }
}
}
|
Edit: Changed subject to be more relevant. (Sir_Fz)
Last edited by holycrap on Wed Jun 10, 2009 9:57 pm; edited 1 time in total |
|
| Back to top |
|
 |
raider2k Op
Joined: 01 Jan 2008 Posts: 140
|
Posted: Mon Jun 08, 2009 10:40 am Post subject: |
|
|
not sure if i understand all that msl code, but i think you are trying to make people get a response from the bot when they say !wb in channel.
!wb + argument makes the bot respond with welcome back + argument
and
!wb without argument makes the bot respond with welcome back + nick
if thats the case you might try the code below, untested btw:
| Code: |
bind pub - !wb wb_proc
proc wb_proc { nick uhost handle chan text } {
set text [split $text]
if { $text == "" } {
putserv "PRIVMSG $chan :Welcome back $nick!"
} else {
putserv "PRIVMSG $chan :Welcome back [lindex $text 0]!"
}
}
|
|
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Tue Jun 09, 2009 6:00 pm Post subject: Re: mIRC to TCL |
|
|
| holycrap wrote: | Hi,
I have a simple mIRC code below which does the following:
<holycrap> !wb test
<bot> Welcome back, test!
How do I go about doing this in TCL? I want to add more commands, for exe in the code below I can just copy and paste the entire block and change *wb* to something else and I have another command. Can someone show me how to do this in TCL?
Thank you!
| Code: | on *:text:*wb*:#: {
if $1 == %c $+ wb {
if $2 == $null { msg $chan 13Welcome Back $nick $+ ! | halt }
else { msg $chan 13Welcome Back $2 $+ ! }
}
}
|
|
If they all are simply mirc remotes returning message to the channel. Why not just use the Putserv-O-Matic script and alter it's triggers, they are simply wildcard triggers the same as mirc would use. Change the flags in the bind below from it's present -|- of none to your flavor of control. | Code: | | bind pubm -|- "*" mycommands_proc |
_________________ speechles' eggdrop tcl archive |
|
| Back to top |
|
 |
holycrap Op
Joined: 21 Jan 2008 Posts: 152
|
Posted: Tue Jun 09, 2009 7:33 pm Post subject: |
|
|
Thanks guys! And much thanks to you speechles, I never knew "PutServ-O-Matic" existed.
 |
|
| Back to top |
|
 |
|