| View previous topic :: View next topic |
| Author |
Message |
starpossen Op
Joined: 10 Jan 2006 Posts: 139
|
Posted: Fri Sep 29, 2006 2:38 am Post subject: Respond to specific nick |
|
|
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 |
|
 |
FossilAtrum Voice
Joined: 27 Sep 2006 Posts: 2
|
Posted: Fri Sep 29, 2006 3:55 am Post subject: RE: Respond to specific nick |
|
|
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 |
|
 |
starpossen Op
Joined: 10 Jan 2006 Posts: 139
|
Posted: Fri Sep 29, 2006 4:40 am Post subject: |
|
|
| Thanks for the quick reply, I will use this and try to add some stuff. |
|
| Back to top |
|
 |
|