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 

Respond to specific nick

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


Joined: 10 Jan 2006
Posts: 139

PostPosted: Fri Sep 29, 2006 2:38 am    Post subject: Respond to specific nick Reply with quote

I dont know how to make this, but im sure its possible
what im thinking of is a script where say Jack says
.dinner
The bot will then respond like
Bot gives Jack dinner

But only if Jack types the command

I know this might look or sound silly, but im just trying to learn it.
Back to top
View user's profile Send private message
FossilAtrum
Voice


Joined: 27 Sep 2006
Posts: 2

PostPosted: Fri Sep 29, 2006 3:55 am    Post subject: RE: Respond to specific nick Reply with quote

Your code would probly look something like this :

Code:

bind pub - !dinner pub:dinner

proc pub:dinner {nick uhost hand channel arg} {

   set respondnick "jack"

   if {($nick == $respondnick)} {
         putserv "PRIVMSG $channel :\001ACTION gives $nick\001 dinner"
   }

}


To trigger the proc, one would type --> !dinner in the channel.

Now this is only to get you started, there is nothing fancy here, no checking of case-sensitive, no checking of nicks within lists etc. seeing as you want to learn, and wasn't asking for a full on script. (In that case, look for something like a Bar-script in the tcl-archives...)

Hope this helps

FossilAtrum
Back to top
View user's profile Send private message
starpossen
Op


Joined: 10 Jan 2006
Posts: 139

PostPosted: Fri Sep 29, 2006 4:40 am    Post subject: Reply with quote

Thanks for the quick reply, I will use this and try to add some stuff.
Back to top
View user's profile Send private message
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