This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Bot only responds to owner, even with public commands

General support and discussion of Eggdrop bots.
Post Reply
q
quantum0726
Voice
Posts: 9
Joined: Fri Mar 03, 2006 9:34 pm

Bot only responds to owner, even with public commands

Post by quantum0726 »

Hi, I just set up eggdrop and have been playing with some tcl scripts I found. I then decided to have a friend try to access the bot and discovered that the bot isn't listening/responding to commands from anyone but it's owner. Several of the tcl scripts I have support public commands, but the bot won't respond to any of them unless the command is sent by the owner.

I tried making a simple tcl script with the line:

bind pub -|- !rules rules_pub

and a procedure (rules_pub) that spams out some random text.

This works for the owner but not for anyone else (makes me think this is a conf file issue and not with the individual scripts).

Any ideas what I need to change for this? I want several of the scripts to be available to anyone in the channel (they are trivia and game scripts mostly).

Thanks much!
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Users have to be added to the bot and scripts then check for their respective access via matchattr.

From tcl-commands.doc:
matchattr <handle> <flags> [channel]
Returns: 1 if the specified user has the specified flags; 0 otherwise
Module: core
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
q
quantum0726
Voice
Posts: 9
Joined: Fri Mar 03, 2006 9:34 pm

Post by quantum0726 »

Is there any way then to make a command fully public, so that any user can access it? Or some way to add all users to the bot but only for certain commands?
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

bind pub -|- !rules rules_pub <~ that's public!
Once the game is over, the king and the pawn go back in the same box.
q
quantum0726
Voice
Posts: 9
Joined: Fri Mar 03, 2006 9:34 pm

Post by quantum0726 »

That is the command that I'm using, but only the owner gets a response from that command. Is there something in the conf. file that needs to be set to listen for these public commands?
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Alchera wrote:.. scripts then check for their respective access via matchattr
Nothing to do with bot configuration files. Find an appropriate Tcl script to fit your needs.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
I
Ian-Highlander
Op
Posts: 165
Joined: Mon Sep 24, 2001 8:00 pm
Location: Ely, Cambridgeshire

Post by Ian-Highlander »

The "rules_pub" procedure that bind is calling must have other verification somewhere in the procedure, that bind is set for ANYONE to use it, known or not. Post that procedure up.
"Insanity Takes Its Toll, Please Have Exact Change"
q
quantum0726
Voice
Posts: 9
Joined: Fri Mar 03, 2006 9:34 pm

Post by quantum0726 »

Figured out what the problem was. Turned out not to be a script error or an eggdrop error (as was ruled out earlier). My bot resides on irc.freenode.net, which does not allow private messages unless at least one of the nicks is registered. Since my bot didn't have a registered nick, it could only send a private message to the owner, which did have a registered nick. Using a Guest??? nick or anything else would result in nothing from the bot since it couldn't send a privmsg.

Thanks for all your help and suggestions! Now to put up a post to see if anyone knows of an easy way to have my bot respond to NickServ...and turns out searching the forums solves that problem.
Post Reply