collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18366
  • stats Total Topics: 2501
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: AoChatwrapper_Core error by the hundreds  (Read 3184 times)

0 Members and 1 Guest are viewing this topic.

Offline Runemy

  • BeBot Apprentice
  • ***
  • Posts: 97
  • Karma: +0/-0
    • Exalted [Age of Conan guild - Aquilonia EU]
AoChatwrapper_Core error by the hundreds
« on: March 11, 2010, 03:59:48 pm »
Alright, this is no new "error" and as far as I can tell it doesn't do any major harm, but as the bot every now and then shows a -1 as online in the guild I wanted to see if anybody has found a fix for it.

When I restart the bot or doing a roster update I'm getting a massive amount of the issue posted in the thread I'm quoting here. I am talking 100+ As I found no fix I'm hoping that some clever folks has sorted the issue and are kind enough to post it here :)

Hello again, a couple questions, first a general one, while loading the bot up i get msgs along the line of:
"XXXX [ERROR] [AOChatWrapper_Core]    I was unable to get the user id for user: 'XXXX'"

i tried removing allantries connected to those apparently no longer existing characters using !admin del XXXX, and though it is saying they are no longer members of the bot i still get the above line at bot start.

The other issue and this seem to have came up only after 1.05 and while using 6.4 pre2 is the -1 member "thing" on bot start i would get the following

"XXXX [BUDDY QUEUE]   [BUDDY-ADD]     -1" trying to remove "-1" from buddy list does not help exactly.

Alrdy tried !buddylist clear, but as soon as i do a roster update i end up with those -1 popping up again.
The other part of it is if people log in sometimes msgs along the line of :
XXXX [GROUP] [MSG]   [XX] XXXX: "-1" (Lvl 19 Herald of Xotli) Logged On :: Alt of 17114350 :: [link]Details[/link]
however after zoning around it tends to recognize them and posts the msg onemore time with the correct info as if they just came on.
Any thoughts?

[edit by Khalem for readability]
Wood of Exalted
Age of Conan
Aquilonia - EU

Offline Yite

  • BeBot Apprentice
  • ***
  • Posts: 152
  • Karma: +0/-0
    • Niflheim - Crom
Re: AoChatwrapper_Core error by the hundreds
« Reply #1 on: March 11, 2010, 05:03:52 pm »
I'm getting the error on startup but am just ignoring it, my bots run fine even with the "XXXX [ERROR] [AOChatWrapper_Core]    I was unable to get the user id for user: 'XXXX'"  error.
-Yite [Crom]

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: AoChatwrapper_Core error by the hundreds
« Reply #2 on: March 11, 2010, 10:15:04 pm »
First up I would recommend upgrading to the latest BeBot version.

The reason for this issue seems to be that the chatserver is returning -1 as a name on a userid lookup.
This has never happened in AO, thus the chat library does not take this into account.

I have been unable to get in touch with any AoC devs, and all emails directed at Funcom goes unanswered, so I'm still in the dark as towards why this happens in the first place.

The first thing you can try is the following change in Sources/AOChat.php
Locate
Code: [Select]
case AOCP_CLIENT_NAME :
if($this -> game == "aoc")
{
list($id, $unknown, $name) = $packet->args;
            $id   = "" . $id;
$name = ucfirst(strtolower($name));
$this->id[$id]   = $name;
$this->id[$name] = $id;
break;
}

case AOCP_CLIENT_LOOKUP :
list($id, $name) = $packet->args;
$id   = "" . $id;
$name = ucfirst(strtolower($name));

// *** FIXME ***
// This is an ugly workaround for now to deal with overflowing 32bit int in Age of Conan
if ($id == 4294967295)
{
$id = -1;
}

$this->id[$id]   = $name;
$this->id[$name] = $id;
break;

Change to
Code: [Select]
case AOCP_CLIENT_NAME :
if($this -> game == "aoc")
{
list($id, $unknown, $name) = $packet->args;

// We need to catch invalid lookups returning -1
if ($name != -1)
{
$id   = "" . $id;
$name = ucfirst(strtolower($name));
$this->id[$id]   = $name;
$this->id[$name] = $id;
}
break;
}

case AOCP_CLIENT_LOOKUP :
list($id, $name) = $packet->args;
if ($name != -1)
{
$id   = "" . $id;
$name = ucfirst(strtolower($name));

// *** FIXME ***
// This is an ugly workaround for now to deal with overflowing 32bit int in Age of Conan
if ($id == 4294967295)
{
$id = -1;
}

$this->id[$id]   = $name;
$this->id[$name] = $id;
}
break;

This is untested code, and it could end up making things worse, but let me know how it works out.


BeBot Founder and Fixer Kingpin

Offline Runemy

  • BeBot Apprentice
  • ***
  • Posts: 97
  • Karma: +0/-0
    • Exalted [Age of Conan guild - Aquilonia EU]
Re: AoChatwrapper_Core error by the hundreds
« Reply #3 on: March 12, 2010, 12:28:34 am »
Thanks for the help. I am currently using BeBot-0.6.5 and as this version doesn't have the original code you posted above in Aochat.php I'll have a look at upgrading as well.

I have multiple addons attached to it spread all over so it's a drag. But it might actually give me a reason to upgrade and clean it up a little so why not :)
Wood of Exalted
Age of Conan
Aquilonia - EU

Offline Runemy

  • BeBot Apprentice
  • ***
  • Posts: 97
  • Karma: +0/-0
    • Exalted [Age of Conan guild - Aquilonia EU]
Re: AoChatwrapper_Core error by the hundreds
« Reply #4 on: March 12, 2010, 01:44:14 am »
I did the upgrade and your fix and it seems like it fixed the problem!

Thanks! One less worry to bother with :)

It does still have the one error where it can't find the userid for the bot character itself, but that's like nothing in comparison to how it was.
Wood of Exalted
Age of Conan
Aquilonia - EU

Offline Runemy

  • BeBot Apprentice
  • ***
  • Posts: 97
  • Karma: +0/-0
    • Exalted [Age of Conan guild - Aquilonia EU]
Re: AoChatwrapper_Core error by the hundreds
« Reply #5 on: March 14, 2010, 05:14:56 pm »
On second thought...

Now, a couple of days later it's just as bad as it was. The bot created 14 Buddy-adds -1 on the last restart.
Wood of Exalted
Age of Conan
Aquilonia - EU

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: AoChatwrapper_Core error by the hundreds
« Reply #6 on: March 14, 2010, 10:53:53 pm »
That makes sense actually.

The above fix/workaround only prevents the bot from adding any NEW members with a username of -1.
It does not however do anything with the already existing users who are in the database with the username -1.

Since you have a database containing a handfull of these apparently, would you be willing to send me an SQL dump that i can work with to try and get a proper solution to this?
BeBot Founder and Fixer Kingpin

Offline Runemy

  • BeBot Apprentice
  • ***
  • Posts: 97
  • Karma: +0/-0
    • Exalted [Age of Conan guild - Aquilonia EU]
Re: AoChatwrapper_Core error by the hundreds
« Reply #7 on: March 15, 2010, 01:22:42 am »
I will be more than happy to send you a dump, but that's the odd thing. Because I use phpmyadmin to delete the instances of -1 I find in whois, users and online. But still they keep popping back in.

But I will take a dump and send it to you.
Wood of Exalted
Age of Conan
Aquilonia - EU

 

* Recent Posts
Com bot module by bitnykk
[November 25, 2024, 05:36:11 pm ]


0.8.x updates for AO by bitnykk
[June 23, 2024, 03:19:47 pm ]


0.8.x updates for AoC by bitnykk
[June 23, 2024, 03:19:44 pm ]


[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm ]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am ]

* Who's Online
  • Dot Guests: 218
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal