BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Age of Conan Archive => BeBot Hyborian support => Topic started by: Iheaca on September 14, 2008, 10:11:44 pm

Title: Add User issue
Post by: Iheaca on September 14, 2008, 10:11:44 pm
I installed version 5.3 using with Age of Conan.

MySQL 4.1.14 and PHP5

Bot seems to work fine, except addition to the bot_user table. Even manual additions are not stored over time. As a result, the !member and !buddylist are always empty (maybe I am wrong on the dependance).

Any clue on what I could have missed, done wrong with installation to have an issue only with the member addition ? (manual and automatic).

Thanks for help.
Title: Re: Add User issue
Post by: Iheaca on September 15, 2008, 03:31:51 am
MySQL error (# 0) on query:
Scribe [2008-09-15 00:45:27]   [TELL]   [INC]   NAME: !adduser NAME

INSERT INTO scribe_users (char_id, nickname, added_by, added_at, user_level, updated_at)
VALUES (, '', 'NAME', 1221439527, 1, 1221439527)
ON DUPLICATE KEY UPDATE added_by = 'NAME', added_at = 1221439527, user_level=1, updated_at = 1221439527

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' '', 'NAME', 1221439527, 1, 1221439527) ON DUPLICATE KEY UPDATE added_by = 'D' at line 1

-----------------

This is an error I have in the log file, scribe_users has no entries.
Title: Re: Add User issue
Post by: Iheaca on September 16, 2008, 04:59:07 am
Nobody has a clue on what the issue could be ?
Title: Re: Add User issue
Post by: Nytridr on September 16, 2008, 09:24:07 am
verify your php and mysql

php --version
mysql --version

and post them here.
Title: Re: Add User issue
Post by: Temar on September 19, 2008, 02:01:35 pm
the char_id is missing
Title: Re: Add User issue
Post by: Iheaca on September 19, 2008, 06:02:02 pm
Sorry, for delay, was trvalling back from the US to Europe.

MySQL 4.1.14 and PHP 5.2.6

To me it seems the bot maybe does not identify the peoples and can not get infos on them. Would explain why autoadduser does not work, buddylist and members.

Manually set access rights with caracter name work and are correctly attributed.

So was wondering if there are conditions, like minimum level for the bot or I do not what.

Why would "chard_id" be missing ?
Title: Re: Add User issue
Post by: Temar on September 19, 2008, 10:11:37 pm
VALUES (, '', 'NAME', 1221439527, 1, 1221439527)

as you cacn see there is nothing before the 1st ,
this means the variable for the char_id is empty when its trying to add
as to why i dont know im just letting you know exactly what the problem is
Title: Re: Add User issue
Post by: Iheaca on September 20, 2008, 05:31:00 pm
Thanks, but as I do not really know the Bebot code, I have no idea on why he would not be able to have that piece of data.

Server is Stygia, a french european server. Is that one not supported ?
Title: Re: Add User issue
Post by: Iheaca on September 23, 2008, 12:18:28 pm
Does anybody have a clue ?

What piece of information could help to identify the issue ?

Note: Using BeBot v0.5.3 released (development version) downloaded here, not the version found on Google.

Thanks for support.
Title: Re: Add User issue
Post by: Iheaca on September 23, 2008, 06:38:26 pm
My issue seems strangely similar to that one:

http://bebot.link/bebot-0-5-support/add-guild-members/

Please let me know what type of info could help to fix this.

Thanks
Title: Re: Add User issue
Post by: Elesar1 on September 23, 2008, 09:36:33 pm
I too am having this issue with the bot I setup for AoC lastnight.

I checked the mySQL database, and it is not entering any information into the users table. When I add a member, (!adduser Elesar member for example) it is added to the security table, but not to the users table.

This is hindering the functionality of the !online and !members commands to always show 0 players.

PHP version 5.2.6
MySQL version 5.0.51b
Title: Re: Add User issue
Post by: Elesar1 on September 23, 2008, 10:21:12 pm
I have also noticed that the whois table is empty and never gets written to, the information just gets cached, and when it expires or the bot is reset, it is gone until someone calls for that information again, then they have to issue the command twice, since the first command does not return anything while to bot is gathering information.

I think that there may be an issue with the communication between the core and AoC modules, but I know very very little PHP, so I am hard pressed to see it.

I will keep looking and see if I stumble upon something, but I wouldn't hold my breath if I were you :P

EDIT:
I have noticed that trying to add a character to the buddylist always results in a response tell of "/tell BotName !help"
No information is passed to the database that I can see.

The whois table is now being populated, though I didn't change anything :\
Title: Re: Add User issue
Post by: Elesar1 on September 24, 2008, 04:32:53 pm
Changed to 0.5.2 Hyborian instead of 0.5.3 and it is working perfectly as far as I can tell.
Title: Re: Add User issue
Post by: Alreadythere on September 24, 2008, 09:02:52 pm
Finally found time to track this down. Should be fixed in most current version of Security (http://svn.shadow-realm.org/index.py/BeBot/trunk/main/03_Security.php?revision=HEAD).

The main supported command to add users is !guest add or !member add though ;)
Title: Re: Add User issue
Post by: Iheaca on September 24, 2008, 09:11:33 pm
Thanks trying asap
Title: Re: Add User issue
Post by: Iheaca on September 25, 2008, 01:14:02 pm
Elesar1 - does this work for you ?

I updated and reboot the bot, but did not have time to fully test the new config.

I just checked my database and there are no entries yet. So either autoadduser does not work or nobody logged in the guilde, which is unlikely.

Checking in the evening.
Title: Re: Add User issue
Post by: Elesar1 on September 25, 2008, 04:26:30 pm
reconfiging to 0.5.3 atm.

Currently having an issue with the bot looping the load sequence when it reaches the Items module. Once I get that resolved, I will let you know if this works for the user updates.

EDIT:
Well, I may have done something wrong, but as soon as I said something in guild chat, I got notified that I was now banned from my own bot :P

I just configed the bot as normal, then replaced the contents of 03_Security.php with that of the link that was provided.

EDIT2:
Just made a new DB, fresh install of 0.5.3, replaced the security file again, and again, auto-ban upon talking in guild chat.

Edit3:
Ran the bot in Debug mode. The security module is not being loaded, and no security tables are made in the database.
From game:
Code: [Select]
[2008-09-25 15:32:55] [ERROR] [security] Undefined function is_banned(Elesar)!

[botname]: You are banned from Ebot.
[Guild] [botname]: [2008-09-25 15:33:16] [ERROR] [security] Undefined function cache_mgr(del, maincache, 0)!
From console:
Code: [Select]
[GROUP] [MSG] [~Guild] Elesar: test
[CORE] [ERROR] Module 'security' does not exist or is not loaded.
[ERROR] [security] Undefined function is_banned(Elesar)!
[TELL] [OUT] -> Elesar: You are banned from botname.
[GROUP] [MSG] [~Guild] botname: [2008-09-25 15:32:55] [ERROR] [security] Undefined function is_banned(Elesar)!
Title: Re: Add User issue
Post by: Alreadythere on September 25, 2008, 09:53:23 pm
This may take a bit...

I don't know why you get those errors in the security module, but I can't test under AoC as I never got me the game...

I think there was another error in the core/User (http://svn.shadow-realm.org/index.py/BeBot/trunk/core/User.php?view=co) file. Could be that the heavy reliance on the whois cache is breaking some other modules for AoC too.
Title: Re: Add User issue
Post by: IKShadow on September 25, 2008, 10:17:34 pm
This may take a bit...

I don't know why you get those errors in the security module, but I can't test under AoC as I never got me the game...

I think there was another error in the core/User (http://svn.shadow-realm.org/index.py/BeBot/trunk/core/User.php?view=co) file. Could be that the heavy reliance on the whois cache is breaking some other modules for AoC too.

We need to get you one buddy key then :)

p.s. Is bebot hyborian project stopped ?
Title: Re: Add User issue
Post by: Alreadythere on September 25, 2008, 10:22:32 pm
The two original AoC authors seem to be on a break...

But we'll do our best to support the bot still ;)

Btw, next broken module: modules/aoc/Autouseradd (http://svn.shadow-realm.org/index.py/BeBot/trunk/modules/aoc/Autouseradd.php?view=co)
Title: Re: Add User issue
Post by: IKShadow on September 25, 2008, 10:27:32 pm
The two original AoC authors seem to be on a break...

But we'll do our best to support the bot still ;)

Btw, next broken module: modules/aoc/Autouseradd (http://svn.shadow-realm.org/index.py/BeBot/trunk/modules/aoc/Autouseradd.php?view=co)

If you are willing to install the game I will send you buddy key.
Title: Re: Add User issue
Post by: Elesar1 on September 25, 2008, 10:47:00 pm
The issue with most people using the game is that Funcom charges like $2.99 US for just the download to install the game to use the buddy keys.

I would offer to host a download of the install if I had more than a DLS line, and it wasn't so massive :(

I will be able to do testing and error logging in the mornings (US-EST) and provide any help I can, though I don't know jack about PHP (yet).
Title: Re: Add User issue
Post by: Alreadythere on September 25, 2008, 11:02:27 pm
Tbh I'm not really interested in playing AoC. And besides, I got a terrible internet connection and an old laptop, not the best setup for AoC ;)

I'll keep trying to fix that problem without an AoC account.
Title: Re: Add User issue
Post by: Elesar1 on September 26, 2008, 12:11:13 am
Alreadythere:

If its not too much trouble, could please comment changes you make to fix whatever is broken?

I am trying to learn this stuff a bit, and a little explanation behind changes would help allot.

I have a little experience in scripting, programing, and web development, so I should be able to pick it up decently quick, just need something to explain the reasoning behind changes off of.
Title: Re: Add User issue
Post by: Elesar1 on September 26, 2008, 06:26:46 am
Fresh install running the updated Security, User, and Autouseradd. Clean Database.

Still getting auto-ban upon talking in guild after launching the bot. This happens regardless of whether Autouseradd is set to on or off. It just happens faster with Autouseradd set to off.

Attempting to add users to the table from the owner account is not functioning either.

Did not notice any errors on starting the bot. The only ones I get are the same as my last post with them in it.
Title: Re: Add User issue
Post by: Alreadythere on September 26, 2008, 07:57:18 am
I'll see what I can do about comments. Though most of the code should read semi-ok, at least for people with some php knowledge. Variables and functions mostly got speaking names.

I think your problem is the security module not loading or not loading correctly. You get banned before any handling by autouser or similar. Why this happens I don't know though.

Do you use the most current Bot.php (the one in the 0.5.3 file)?
Did you copy the new security module to the correct place main/03_Security.php?
Is the security module really loading correctly?
If you got some basic php knowledge you can add some echo output to the constructor of the Security module, making sure it's running. Or add an echo of the module name in the register_module() function of Bot.php.
Title: Re: Add User issue
Post by: Temar on September 26, 2008, 11:17:50 am
i have aoc account im just need get into an org or somit for testing
Title: Re: Add User issue
Post by: Elesar1 on September 26, 2008, 03:56:34 pm
I can look into the addition of an echo to the security module.

I am running 0.5.3 with the latest security update.
To update the security, I copied all the text, opened my current 03_Security.php, selected all, deleted, and pasted in the new code from the link on the first page of this thread. The I saved as unicode, it asked to replace the file and I said OK.

Temar:
I am an officer of Eldar on Dagoth, so I can send you an invite for testing if you want. I will just need a character name and I can invite whenever I see you online. That is, if you are on the US client. If not, I know there are changes that you could make to be able to connect to the US servers.

UPDATE:
This mornings attempts yielded the following errors:
Code: [Select]
[CORE] [ERROR] Module 'security' does not exist or is not loaded.
[ERROR] [security] Undefined function cache_mgr(del,maincache,0)!
Title: Re: Add User issue
Post by: Alreadythere on September 26, 2008, 06:01:12 pm
All your error messages point to the same: it looks like the security module either doesn't load correctly or doesn't register correctly.

And it sounds like you did all ok when replacing security as long as you got the opening and closing tags <?php ?> too (I think you should with your way).
Title: Re: Add User issue
Post by: Nytridr on September 26, 2008, 11:49:07 pm
just off the top here.. Does AoC still have the Botname.Module.ini  file?  maybe have him shutdown the bot, delete that file and start the bot back up.   
Title: Re: Add User issue
Post by: Elesar1 on September 27, 2008, 01:02:03 am
The Botname.Module.ini file is generated on first start, so off of a clean install, it is not there.

I just checked the 03_Security.php file, and the <?php and ?> tags are in place.

I'm still not to familiar with the way the bot loads up the different modules. Is there a hard-coded place that is supposed to load the security file? If so, I can check that for a typo or syntax error, but that is all I will know to look for, as I am just starting to learn PHP.

Iheaca:
Is this working for you now? Or are you getting pretty much the same issues that I am?
Title: Re: Add User issue
Post by: Iheaca on September 27, 2008, 04:28:16 am

the bot did not ban me, but it does not change the situation versus prior version.

I can still add members by giving twice the !member add name command.

I am looking into the 5.2 Hyborian version to understand what this could be and why 5.2 works and not 5.3

Checked all errors in Logs ---

------------ Error while Booting
BotName [2008-09-17 08:39:09]   [MOD]   [LOAD]   Autouseradd.php
BotName [2008-09-17 08:39:09]   [SETTINGS]   [SAVED]   Set table_version for module Blacklist to 0
MySQL error (# 0) on query: ALTER TABLE BotName_blacklist ADD noteid INT NOT NULL
Duplicate column name 'noteid'
MySQL error (# 0) on query: ALTER TABLE BotName_blacklist ADD expire INT UNSIGNED DEFAULT 0
Duplicate column name 'expire'
BotName [2008-09-17 08:39:09]   [BLACKLIST]   [UPDATE]   Updated blacklist table to version 1.
BotName [2008-09-17 08:39:09]   [SETTINGS]   [SAVED]   table_version for module Blacklist set to 1 as datatype int
MySQL error (# 0) on query: ALTER TABLE BotName_blacklist ADD INDEX expire (expire)
Duplicate key name 'expire'
BotName [2008-09-17 08:39:09]   [BLACKLIST]   [UPDATE]   Updated blacklist table to version 2.
BotName [2008-09-17 08:39:09]   [SETTINGS]   [SAVED]   table_version for module Blacklist set to 2 as datatype int
BotName [2008-09-17 08:39:09]   [SETTINGS]   [SAVED]   table_version for module Blacklist set to 2 as datatype int
BotName [2008-09-17 08:39:09]   [BLACKLIST]   [UPDATE]   Blacklist table update complete.
BotName [2008-09-17 08:39:09]   [MOD]   [LOAD]   Blacklist.php
--------------
BotName [2008-09-24 19:19:22]   [ERROR]   [AOChatWrapper_Core]   No user specified
-------------- When adding a Member
BotName [2008-09-25 22:03:13]   [TELL]   [INC]   AdminName: !member add PlayerName
BotName [2008-09-25 22:03:13]   [BUDDY]   [BUDDY-ADD]   PlayerName
MySQL error (# 0) on query: INSERT INTO BotName_users (char_id, nickname, added_by, added_at, user_level, notify) VALUES('', '', 'AdminName', '1222380193', '2', '1')
Duplicate entry '0' for key 2
BotName [2008-09-25 22:03:13]   [TELL]   [OUT]   -> PlayerName: AdminName has added you to the bot.
BotName [2008-09-25 22:03:13]   [TELL]   [OUT]   -> AdminName: Player PlayerName has been added to the bot as a member
BotName [2008-09-25 22:03:18]   [TELL]   [INC]   AdminName: !member add PlayerName
BotName [2008-09-25 22:03:18]   [BUDDY]   [BUDDY-ADD]   PlayerName
BotName [2008-09-25 22:03:18]   [TELL]   [OUT]   -> PlayerName: AdminName has added you to the bot.
BotName [2008-09-25 22:03:18]   [TELL]   [OUT]   -> AdminName: Player PlayerName has been added to the bot as a member
BotName [2008-09-25 22:03:22]   [TELL]   [INC]   AdminName: !member add PlayerName
BotName [2008-09-25 22:03:22]   [TELL]   [OUT]   -> AdminName: PlayerName is already a member.
Title: Re: Add User issue
Post by: Alreadythere on September 27, 2008, 11:19:49 am
Did you use all 3 new updated files?

main/03_Security.php (http://svn.shadow-realm.org/index.py/BeBot/trunk/main/03_Security.php?view=co)
core/User.php (http://svn.shadow-realm.org/index.py/BeBot/trunk/core/User.php?view=co)
modules/aoc/Autouseradd.php (http://svn.shadow-realm.org/index.py/BeBot/trunk/modules/aoc/Autouseradd.php?view=co)

Because I think the bug with !member add should be fixed.
Title: Re: Add User issue
Post by: Iheaca on September 27, 2008, 11:54:22 am
Oups sorry, indeed missed one.

Fixing asap. thanks
Title: Re: Add User issue
Post by: Iheaca on September 27, 2008, 12:13:32 pm
Updated and tester !member add

Works fine now. Thank you very much for your support !
I will check if autoadd users works.

Check also Logs, I do not have the same error mentioned.

[CORE] [ERROR] Module 'security' does not exist or is not loaded.
[ERROR] [security] Undefined function cache_mgr(del,maincache,0)!
Title: Re: Add User issue
Post by: Elesar1 on September 27, 2008, 03:51:24 pm
I will try and new download again, fresh DB and updated modules. Will notify of any changes to my current status.
Title: Re: Add User issue
Post by: Elesar1 on September 27, 2008, 04:03:48 pm
Well, no auto-banning, but also no auto adding. Will check my config again and see what is going on.

Thanks for all the support that you have provided so farĀ  ;D

UPDATE:
The !say command will not work if sent by tell. This would be useful for my second bot that I am running in an Ally guild's chat.
The !quote command crashes the bot.

Now if I can just figure out how to get the DB ChatRelay working, I would be set other than the three current issues :P
SimplePortal 2.3.7 © 2008-2024, SimplePortal