| View previous topic :: View next topic |
| Author |
Message |
SkiZm Voice
Joined: 24 Nov 2005 Posts: 4
|
Posted: Sat Dec 24, 2005 1:57 am Post subject: Public Commands |
|
|
How would one go about executing a public command via your bot just as a normal user would.
Example: !help from a user will give some information on the channel in the channel.
If I wanted the bot to execute !help, what would the code look like?
I have tried a generic PRIVMSG line, but all I get is !help but no execution, which is prolly correct. |
|
| Back to top |
|
 |
dusk Halfop

Joined: 06 Mar 2005 Posts: 91 Location: Belgium
|
Posted: Sat Dec 24, 2005 2:18 am Post subject: |
|
|
| Did you even try a search on this forum? |
|
| Back to top |
|
 |
SkiZm Voice
Joined: 24 Nov 2005 Posts: 4
|
Posted: Sat Dec 24, 2005 2:47 am Post subject: |
|
|
| dusk wrote: | | Did you even try a search on this forum? |
Of course I did. I would take it from your remark that this question has been asked and answered. Obviously, I must be searching with the wrong terms.
In the time it took you to post a reply, you could of been more productive and provided me a link or at least pointed me to a search that would have yielded better results.
I hate it when an individual spends time looking for answers and finally (reluctantly I may add because of your type of responses) decides to ask the question in a public forum only to receive a non-helpful answer. By non-helpful I mean going out of your way to be obtrusive.
If you can't help me foo, don't reply and don't patronize me. |
|
| Back to top |
|
 |
dusk Halfop

Joined: 06 Mar 2005 Posts: 91 Location: Belgium
|
Posted: Sat Dec 24, 2005 8:29 am Post subject: |
|
|
I never said I wouldn't help you.
If you want a simple bind and proc maybe this can set you on your way :
| Code: |
proc pub_help {nick uhost hand chan arg} {
global botnick
puthelp "PRIVMSG $chan :yourhelpline 1"
puthelp "PRIVMSG $chan :yourhelpline 2"
return 0
}
bind pub - !help pub_help
|
It wasn't my meaning to patronize anyone, but something like this is found in many scripts (let's say mostely funscripts),just a little adaption would bring you this far...
GRTZ
Merry Christmass btw |
|
| Back to top |
|
 |
SkiZm Voice
Joined: 24 Nov 2005 Posts: 4
|
Posted: Sat Dec 24, 2005 1:26 pm Post subject: |
|
|
| dusk wrote: | I never said I wouldn't help you.
If you want a simple bind and proc maybe this can set you on your way :
| Code: |
proc pub_help {nick uhost hand chan arg} {
global botnick
puthelp "PRIVMSG $chan :yourhelpline 1"
puthelp "PRIVMSG $chan :yourhelpline 2"
return 0
}
bind pub - !help pub_help
|
It wasn't my meaning to patronize anyone, but something like this is found in many scripts (let's say mostely funscripts),just a little adaption would bring you this far...
GRTZ
Merry Christmass btw |
Thanks for the response Dusk. I guess I should have been a little more detailed in my question.
I already have a script loaded that will do that for me via a public command. What I need to know how one would make the bot call the same command or proc without the public command being issued via the channel?
The best example I could give is if I wanted a bot to say a message in a channel every 24 hours, and that message was in another loaded module within that bot that could be called via a public command (!text), how would I have the bot either call that command in the channel, or call the proc itself, even though it's in another loaded tcl?
Merry Christmas to you as well. |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
|
| Back to top |
|
 |
|