BeBot - An Anarchy Online and Age Of Conan chat automaton
Development => Coding and development discussion => Topic started by: Nytridr on April 19, 2007, 06:10:02 am
-
I fully updated to the latest svn on my test bot.. and any time I restart the bot it will go through and spam the org chat with this or that person has logged off and logged on..
I have tried to drop user, online, whois tables and it still does it.. and there are no errors on the cousol or in the logs..
Metanyt
oh and one more thing.. !help dont bring anything but a blank blob with just a few sets of text and under the first one is help.. there are no other commands under it.. not sure if I missed something on that one.. or if it is still being updated
-
Something is fishy there, yeah.
Haven't found the time to check the core/Roster.php, core/User.php and Bot.php yet what's actually happening.
-
The new notify module does not appear to set the "notify" field in the users table automagically to true (1) even for members. I haven't looked at that module at all but I am guessing it's a simple fix.
As for help it should be working for the majority of commands in the svn (as of version 0.3.svn.475) unless it has been inadvertantly broken after that.
Please tell me exactly what is output when you /tell <botname> !help or which commands are reported as having help but not showing anything useful.
Hope that helps.
-
The new notify module does not appear to set the "notify" field in the users table automagically to true (1) even for members. I haven't looked at that module at all but I am guessing it's a simple fix.
Yeah, I'm guessing the same. Just haven't had the time to get all mysql queries logged and do a roster update.
-
Well with the new update from this morning..(for me at least) this is what I got
-- Commands usable in tell --
afk help relay
-- Commands usable in gc --
afk relay
-- Commands usable in pgmsg --
afk relay
maybe I have missed something that was changed, or something..
-
Check your access levels against the set access levels for the commands (If you tell !commands to the bot you will get the interface). The !help only shows help for commands that you've got access to.
Edit: To get your current access level /tell <botname> !security whoami
-
The toon I am checking it on is Owner.. and all my alts are listed as superadmin in the bot.conf.. but I will check to see if it is reading it correctly when I have a chance later tonight..
-
Please also try
!useradd <name> superadmin
If that fixes it we'll need to look into how bot.conf is being added. There has been changes made to the security and security groups in-game and perhaps bot.conf doesn't correctly put users there.
I haven't looked at that code eiter, so I might be mistaking.
If that does not fix it open modules/Bid.php and check that the constructor looks like this:
/*
Constructor:
Hands over a referance to the "Bot" class.
*/
function Bid (&$bot)
{
$this -> bot = &$bot;
$this -> bid = "";
$this -> bot -> accesscontrol -> create('tell', 'bid', 'MEMBER');
$this -> bot -> accesscontrol -> create('gc', 'bid', 'MEMBER');
$this -> bot -> accesscontrol -> create('pgmsg', 'bid', 'MEMBER');
$this -> help['description'] = "Handles auctions using raid points";
$this -> help['command']['bid start <item>'] = "Starts an auction for <item>. <item> can be text or an item ref.";
$this -> help['command']['bid <points>'] = "Bid <points> raid points for the item currently on auction.";
$this -> help['command']['bid info'] = "Shows information about the current auction.";
}
Also check that you aren't using any custom modules (ie got a custom/modules/Bid.php) as they are most likely not updated for the new help system. To make them compatible copy the lines that read $this -> help... from the official module into the constructor of the custom module.
Edit: And finally when you do "svn update" it should (atleast it does in the *nix version) state which version it updates to. Which version is that?
Hope that helps.
-
To [Aoftest]: !adduser metanyt superadmin
[Aoftest]: Added Metanyt to group superadmin.
To [Aoftest]: !help
[Aoftest]: Help
-- Commands usable in tell --
afk help relay
-- Commands usable in gc --
afk relay
-- Commands usable in pgmsg --
afk relay
still the same thing ?? wierd..
nope bid.php didnt look like that.. I recopied it over to my test bot.. and guess what.. IT WORKS.. TYTYTY
Now to see if that also fixs my custom mod that I am making and see if it works now..:)
-
Roster updates should set notify correctly now, was a stupid typo
-
Now to see if that also fixs my custom mod that I am making and see if it works now..:)
The format for help is really simple and an example can be found in modules/_Examplemodule.php
If you're too lazy to look it up here's the good stuff:
function ClassName (&$bot)
{
$this -> bot = &$bot;
$this -> create_tables();
$this -> set_access();
$this -> create_settings();
$this -> create_help();
}
function create_tables()
{
$query = "CREATE TABLE IF NOT EXISTS ".$this -> bot -> db -> define_tablename('example_table'. true);
$query.= "(ID INT NOT NULL AUTO_INCREMENT PRIMARY KEY, ";
$query.= "Field1 VARCHAR(40), ";
$query.= "Field2 VARCHAR(29))";
$this -> bot -> db -> query($query);
}
function set_access()
{
$this -> bot -> access_control -> create ('tell', 'command', 'GUEST');
$this -> bot -> access_control -> create ('gc', 'command', 'ADMIN');
$this -> bot -> access_control -> create ('pgmsg', 'command', 'MEMBER');
}
function create_settings()
{
$this -> bot -> set -> create('module', 'setting', 'default', 'description of setting', 'option1;option2;option3');
}
function create_help()
{
$this -> help['description'] = 'Description of the module';
$this -> help['command']['command1']="What does command1 do without any keywords";
$this -> help['command']['command1 keyword'] = "What does command1 do with keyword";
$this -> help['command']['command2 keyword <param>'] = "What does command2 do with <param>";
$this -> help['notes'] = "Notes for the help goes in here.";
}
Hope that helps.