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 

reply to text in channel

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
R-WaT
Halfop


Joined: 06 Jan 2006
Posts: 79

PostPosted: Sat May 06, 2006 8:36 pm    Post subject: reply to text in channel Reply with quote

can anyone give me a script so when someone types "O RLY?" or "O RLY" the bot says "YA RLY!". just something for fun Smile
Back to top
View user's profile Send private message AIM Address
R-WaT
Halfop


Joined: 06 Jan 2006
Posts: 79

PostPosted: Sat May 06, 2006 8:40 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Sat May 06, 2006 11:18 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
R-WaT
Halfop


Joined: 06 Jan 2006
Posts: 79

PostPosted: Sat May 06, 2006 11:33 pm    Post subject: Reply with quote

Tcl error [checktext]: can't read "text": no such variable

everytime i type something in the channel it says that
Back to top
View user's profile Send private message AIM Address
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Sun May 07, 2006 1:18 am    Post subject: Reply with quote

Edit the proc:
Code:
proc checktext {nick uhost hand chan text}
Back to top
View user's profile Send private message
R-WaT
Halfop


Joined: 06 Jan 2006
Posts: 79

PostPosted: Sun May 07, 2006 1:22 am    Post subject: Reply with quote

thanks
Back to top
View user's profile Send private message AIM Address
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Sun May 07, 2006 11:07 am    Post subject: Reply with quote

Grrrr .. me and my typos. Embarassed
_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests 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