L* R*
HOME FORUM DOWNLOADS
Content
  Links
     Browse SVN
     SVN Commit log
     Documentation (Wiki)
  Developers
     Taskmanager
User
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 02, 2008, 11:36:21 AM

Login with username, password and session length
Search



Advanced search
Support GoPHP5.org
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Information > News > Topic: Official character lookup fix
Pages: [1]   Go Down
« previous next »
Print
Author Topic: Official character lookup fix  (Read 1140 times)
0 Members and 1 Guest are viewing this topic.
Khalem
BeBot Founder
Administrator
Grandmaster
********
Offline Offline

Gender: Male
Posts: 670



WWW
Official character lookup fix
« on: November 28, 2006, 04:14:00 PM »

An official fix for the character lookup problem is now ready and BeBot 0.2.10 will be released in one of the coming days.

In the meantime you can grab the fix from the links below.
It is a drop in replacement, which means you only need to replace the old AOChat.php file in your bot directory (or Sources directory for newer 0.3 snapshots)

0.2.x: http://svn.shadow-realm.org/svn/BeBot/branches/0.2/AOChat.php
0.3.x: http://svn.shadow-realm.org/svn/BeBot/trunk/Sources/AOChat.php

Note, if you have applied an earlier fix offered by the community, it is advised to change your character id column back to INT (11).
Any characters added under other fixes should be deleted from the database table, in short, delete any entry with a character id larger than 2147483647
New characters with ID's higher than 2147483647 will be stored in the database with negative id's. While this might be confusing, it makes perfect sense to the bot.

If you use any custom modules or web interfaces etc and need to be able to search on the "true" character ID, you can use the following two functions to convert to and from the "true" id's and the overflowed id's stored in the database.
These will also be included in the upcoming 0.2.10 release.
Code:
<?php
/*
Used to convert an overflowed (unsigned) integer to a string with the correct positive unsigned integer value
If the passed integer is not negative, the integer is merely passed back in string form with no modifications.
*/
    
function int_to_string($int)
{
       if (
$int <= -1)
   {
           
$int += (float)"4294967296";
   }
       return (string)
$int;
}

/*
Used to convert an unsigned interger in string form to an overflowed (negative) integere
If the passed string is not an integer large enough to overflow, the string is merely passed back in integer form with no modifications. 
*/
function string_to_int($string)
{
       
$int = (float)$string;
       if (
$int > (float)2147483647)
   {
           
$int -= (float)"4294967296";
   }
       return (int)
$int;
}
?>

Logged

BeBot Founder and Fixer Kingpin
Madman coder and destroyer of good code
Malosar
Expert
*****
Offline Offline

Posts: 259


WWW
Re: Official character lookup fix
« Reply #1 on: November 30, 2006, 09:37:41 AM »

That new AOChat.php breaks my "not expecting logon" fix as it tries to use bcmath. I changed the get_uid function to your new one, is that the only change neccessary?
Logged

Eternalist
General of The Syndicate
Khalem
BeBot Founder
Administrator
Grandmaster
********
Offline Offline

Gender: Male
Posts: 670



WWW
Re: Official character lookup fix
« Reply #2 on: November 30, 2006, 03:13:37 PM »

It's the only change necessary.

I would like to know the details of your fix however as it might help others and possibly also implemented in the official library.
In any case i have plans to add a toggle for authentication method in the config at one point so people can explicitly configure which authentication method to use first.
Logged

BeBot Founder and Fixer Kingpin
Madman coder and destroyer of good code
Malosar
Expert
*****
Offline Offline

Posts: 259


WWW
Re: Official character lookup fix
« Reply #3 on: November 30, 2006, 03:57:02 PM »

My fix was just the standard aokex with GMP (openssl didn't work for me) and a modified AOChat.php. With your AOChat.php it dies on login, with mine it works. I did a diff of the files and it turns out the only part that was breaking it was:

dl("aokex.so");

So it's just that it wasn't loading aokex and thus was falling back to bcmath.
Logged

Eternalist
General of The Syndicate
Khalem
BeBot Founder
Administrator
Grandmaster
********
Offline Offline

Gender: Male
Posts: 670



WWW
Re: Official character lookup fix
« Reply #4 on: November 30, 2006, 04:17:08 PM »

Fixed this for 0.2.11 where the check is carried out in Main.php.
Logged

BeBot Founder and Fixer Kingpin
Madman coder and destroyer of good code
Pages: [1]   Go Up
Print
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Information > News > Topic: Official character lookup fix
« previous next »
 
Jump to:  

Recent
Log playtime from buddys ...
by IKShadow
[Today at 06:48:12 AM]

[request] Raid timers
by Elesar1
[December 01, 2008, 04:41:09 PM]

Shared DB online list
by Temar
[December 01, 2008, 01:55:47 AM]

relay colors
by Temar
[December 01, 2008, 01:54:56 AM]

BeBot v0.6.0 released
by Alreadythere
[November 30, 2008, 05:32:00 PM]

Change to Bid.php
by Temar
[November 30, 2008, 11:41:44 AM]

OnlineOrg
by Jiheld
[November 29, 2008, 12:44:27 PM]

Silly Newbie Question.
by Temar
[November 29, 2008, 12:00:02 PM]

massive_pvp_time_table 1
by gerborg
[November 29, 2008, 06:55:35 AM]

Bot not see Guild Chat
by Delvar
[November 28, 2008, 08:30:34 AM]
Stats
Members
Total Members: 1244
Latest: Armonkens
Stats
Total Posts: 11145
Total Topics: 1505
Online Today: 23
Online Ever: 168
(July 01, 2007, 09:30:02 PM)
Users Online
Users: 6
Guests: 27
Total: 33
Whackoeng
DocJones
johskar
Slacklin
Pharexys

Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
TinyPortal v0.9.8 © Bloc | NewDef design by Bloc
Page created in 0.412 seconds with 30 queries. (Pretty URLs adds 0.032s, 4q)
Loading...