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 

Public Commands

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
SkiZm
Voice


Joined: 24 Nov 2005
Posts: 4

PostPosted: Sat Dec 24, 2005 1:57 am    Post subject: Public Commands Reply with quote

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
View user's profile Send private message
dusk
Halfop


Joined: 06 Mar 2005
Posts: 91
Location: Belgium

PostPosted: Sat Dec 24, 2005 2:18 am    Post subject: Reply with quote

Did you even try a search on this forum?
Back to top
View user's profile Send private message MSN Messenger
SkiZm
Voice


Joined: 24 Nov 2005
Posts: 4

PostPosted: Sat Dec 24, 2005 2:47 am    Post subject: Reply with quote

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
View user's profile Send private message
dusk
Halfop


Joined: 06 Mar 2005
Posts: 91
Location: Belgium

PostPosted: Sat Dec 24, 2005 8:29 am    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
SkiZm
Voice


Joined: 24 Nov 2005
Posts: 4

PostPosted: Sat Dec 24, 2005 1:26 pm    Post subject: Reply with quote

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


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat Dec 24, 2005 6:16 pm    Post subject: Reply with quote

Code:
pub_help * * * #channel *

_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
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 -> Scripting Help 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