| View previous topic :: View next topic |
| Author |
Message |
R-WaT Halfop
Joined: 06 Jan 2006 Posts: 79
|
Posted: Sat May 06, 2006 8:36 pm Post subject: reply to text in channel |
|
|
can anyone give me a script so when someone types "O RLY?" or "O RLY" the bot says "YA RLY!". just something for fun  |
|
| Back to top |
|
 |
R-WaT Halfop
Joined: 06 Jan 2006 Posts: 79
|
Posted: Sat May 06, 2006 8:40 pm Post subject: |
|
|
| Code: |
on *:TEXT:*o rly*:#: {
if (!%var) { msg $chan YA RLY! | set -u15 %var 1 }
}
|
irc version
After being activated, it will wait 15 seconds to try again |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Sat May 06, 2006 11:18 pm Post subject: |
|
|
| Code: |
set orly "*o rly*"
bind pubm - * checktext
proc checktext {nick uhost hand chan text} {
if {[string match $::orly [string tolower $text]]} {
puthelp "PRIVMSG $chan :YA RLY"
}
} |
The above should do what you wish. _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Last edited by Alchera on Sun May 07, 2006 11:08 am; edited 1 time in total |
|
| Back to top |
|
 |
R-WaT Halfop
Joined: 06 Jan 2006 Posts: 79
|
Posted: Sat May 06, 2006 11:33 pm Post subject: |
|
|
Tcl error [checktext]: can't read "text": no such variable
everytime i type something in the channel it says that |
|
| Back to top |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Sun May 07, 2006 1:18 am Post subject: |
|
|
Edit the proc:
| Code: | | proc checktext {nick uhost hand chan text} |
|
|
| Back to top |
|
 |
R-WaT Halfop
Joined: 06 Jan 2006 Posts: 79
|
Posted: Sun May 07, 2006 1:22 am Post subject: |
|
|
| thanks |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Sun May 07, 2006 11:07 am Post subject: |
|
|
Grrrr .. me and my typos.  _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
|