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

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

Author Topic: Server merge!  (Read 33147 times)

0 Members and 3 Guests are viewing this topic.

Offline Ezzii

  • BeBot Rookie
  • *
  • Posts: 8
  • Karma: +0/-0
Re: Server merge!
« Reply #15 on: February 28, 2013, 02:58:03 am »
Ok Heffalomp,

Really nice thanks so much!

I only added one line that maybe you over looked on purpose or not??

Code: [Select]
        ) {
            $site1NAME = "Auno";
            // $site1URL = "http://auno.org/ao/char.php?output=xml&dimension=" . $this->bot->dimension . "&name=" . strtolower($name);
            $site1URL = "http://auno.org/ao/char.php?output=xml&dimension=1&name=" . strtolower($name);                                         // Change by Heffalomp
            $site2NAME = FALSE;
        }
        else {
            $site1NAME = "Auno";
            // $site1URL = "http://auno.org/ao/char.php?output=xml&dimension=" . $this->bot->dimension . "&name=" . strtolower($name);
            $site1URL = "http://auno.org/ao/char.php?output=xml&dimension=1" . "&name=" . strtolower($name);                                    //  ** Update Added Change by Ezzii
            $site2NAME = "Anarchy-Online";
            // $site2URL = "http://people.anarchy-online.com/character/bio/d/" . $this->bot->dimension . "/name/" . strtolower($name) . "/bio.xml";
            $site2URL = "http://people.anarchy-online.com/character/bio/d/1/name/" . strtolower($name) . "/bio.xml";                            // Change by Heffalomp
        }

        $xml = $this->bot->core("tools")->get_site($site1URL);
        $xml = $this->check_xml($xml);

My whois works great again thanks to you.   :)

 -- Ezzii

Offline Ezzii

  • BeBot Rookie
  • *
  • Posts: 8
  • Karma: +0/-0
Re: Server merge!
« Reply #16 on: February 28, 2013, 05:50:25 am »
maybe !history   is next?

 -- Ezzii

Offline verillo

  • BeBot Rookie
  • *
  • Posts: 1
  • Karma: +0/-0
Re: Server merge!
« Reply #17 on: February 28, 2013, 10:27:20 am »
Hi
Change in BeBot\modules\ao\History.php: line 81

from:
Code: [Select]
$content = $this -> bot -> core("tools") -> get_site("http://auno.org/ao/char.php?output=xml&dimension=1" . $this -> bot -> dimension . "&name=".$name." ");to:
Code: [Select]
//$content = $this -> bot -> core("tools") -> get_site("http://auno.org/ao/char.php?output=xml&dimension=" . $this -> bot -> dimension . "&name=".$name." ");
$content = $this -> bot -> core("tools") -> get_site("http://auno.org/ao/char.php?output=xml&dimension=1". "&name=".$name." ");
And the character history will work.

If you use ping option on bot, in BeBot\modules\Ping.php

after:
Code: [Select]
case 3:
return "chat.d3.funcom.com";
Add:
Code: [Select]
case 5:
return "chat.d1.funcom.com";
« Last Edit: February 28, 2013, 10:53:19 am by verillo »

Offline Heffalomp

  • BeBot Apprentice
  • ***
  • Posts: 80
  • Karma: +0/-0
Re: Server merge!
« Reply #18 on: February 28, 2013, 06:29:36 pm »
The whois will only be correct for Rk1 chars for the time being as it with this fix is the rk1 data from Auno that is benig parsed...
Not so much love for looking up both rk1 and 2 chars in the new world with it, if we could get the same kind of history from funcom xml instead however... :-)
"Ubuntu" is an ancient African word, meaning "I can't configure Slackware"

Offline Ezzii

  • BeBot Rookie
  • *
  • Posts: 8
  • Karma: +0/-0
Re: Server merge!
« Reply #19 on: March 01, 2013, 08:57:50 am »
!history mod for both RK1 and RK2 legacy toons

This is added to just underneath vertillo's code respective to his above posting.
BeBot\modules\ao\History.php: about line 82   -- just underneath

This gives the bot a second chance to look for the toon in auno's Rk2
dimension if the first query in dimension 1 comes up with "No such character"


( The new stuff to add is remarked between "Ezzii code --------" markers )

Code: [Select]
    /*
      Get info on player
    */
    function player_history($name)
    {
        $name = ucfirst(strtolower($name));
        $id = $this->bot->core("chat")->get_uid($name);
        if (!empty($id)) {
            $output = "##blob_title##::: Character history for " . $name . " :::##end##\n\n";
            // $content = $this -> bot -> core("tools") -> get_site("http://auno.org/ao/char.php?output=xml&dimension=" . $this->bot->dimension . "&name=" . $name . " ");  // original line
            $content = $this -> bot -> core("tools") -> get_site("http://auno.org/ao/char.php?output=xml&dimension=1" . "&name=" . $name . " ");    //  new from verillo
    // -------------START of Ezzii code ----------
            $checker = 0;
            foreach ( $content as $liney ) {
                $possy = strpos( $liney, "No such character");
                if ($possy === false ) {
                        //  false stuff (nothing going on here)
                } else {
                        //  true stuff
                        $checker = $checker + 1;
                }
            }

            if ( $checker == 0 ) {
                // Zero on checker (nothing going on here)
             }
            else {
                sleep(1);
                $content = $this -> bot -> core("tools") -> get_site("http://auno.org/ao/char.php?output=xml&dimension=2" . "&name=" . $name . " ");
            }
    // -------------END of Ezzii code ----------
            if (!$content['error']) {
                $history = $this->bot->core("tools")
                    ->xmlparse($content['content'], "history");
                $events = explode("<entry", $history);
                for ($i = 1; $i < count($events); $i++) {
                    if (preg_match(
-- Ezzii

http://omni-sc.com

Offline Heffalomp

  • BeBot Apprentice
  • ***
  • Posts: 80
  • Karma: +0/-0
Re: Server merge!
« Reply #20 on: March 02, 2013, 07:34:01 pm »
The original 'core/ao/Whois.php' and 'main/10_Roster.php' should work as intended again and the temp fixes for those are not needed.
FC now exports to 'http://people.anarchy-online.com/org/stats/d/5/name/<orgid>' and 'http://people.anarchy-online.com/character/bio/d/5/name/<charname>' as intended.
"Ubuntu" is an ancient African word, meaning "I can't configure Slackware"

Offline Zweiblum

  • BeBot Apprentice
  • ***
  • Posts: 135
  • Karma: +0/-0
Re: Server merge!
« Reply #21 on: March 09, 2013, 06:42:41 pm »
hmm whois isnt working probably.

for example Bullfrog is a lvl 26 adv in my bot. but actualy it is a 209 enfo....

i dont know why whois isnt working
« Last Edit: March 09, 2013, 07:43:10 pm by Zweiblum »

Offline Heffalomp

  • BeBot Apprentice
  • ***
  • Posts: 80
  • Karma: +0/-0
Re: Server merge!
« Reply #22 on: March 10, 2013, 04:49:33 am »
hmm whois isnt working probably.

for example Bullfrog is a lvl 26 adv in my bot. but actualy it is a 209 enfo....

i dont know why whois isnt working
Are you running with the temp whois mods we posted here or the original whois module? (should be using the original now)
Also, did you remember to clean the whois table in your db after merge?
"Ubuntu" is an ancient African word, meaning "I can't configure Slackware"

Offline Zweiblum

  • BeBot Apprentice
  • ***
  • Posts: 135
  • Karma: +0/-0
Re: Server merge!
« Reply #23 on: March 10, 2013, 11:00:06 am »
ah thx!
i didnt whiped the whois table.

its now working, thx ;)

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: Server merge!
« Reply #24 on: March 16, 2013, 11:56:24 pm »
I've kept half an eye on this thread and first of all I want to thank everyone that contributed.

I have committed fixes for most issues to the BeBot-legacy repository on github. You can get the latest code from https://github.com/J-Soft/BeBot-legacy/archive/master.zip

Feedback would be most welcome before i promote this as a release.

Please note that $dimension should now read "Rubi-Ka" and you will need to add $conf_version = 1; to your config file to make the bot start.
BeBot Founder and Fixer Kingpin

Offline Dontask

  • BeBot Rookie
  • *
  • Posts: 8
  • Karma: +0/-0
Re: Server merge!
« Reply #25 on: March 18, 2013, 03:52:05 am »
Here is a little function for restoring !logons since character IDs were reset on merge. This is only relevant if you backed up your old whois table. I named mine whois_old so you will need to change that if needed.

Either make a new module out of this or add it to some existing module temporarily.

Code: [Select]
function updatelogons(){
$idupdates = 0;
$oldid = $this -> bot -> db -> select("SELECT id FROM #___logon");
foreach ($oldid as $id){
$name = $this -> bot -> db -> select("SELECT nickname FROM #___whois_old WHERE ID = '$id[0]'");
$newid = $this -> bot -> db -> select("SELECT ID FROM #___whois WHERE nickname = '" . $name[0][0] . "'");
if(!(empty($newid))){
$this -> bot -> db -> query("UPDATE #___logon SET id = '" . $newid[0][0] . "' WHERE id = '$id[0]'");
$idupdates++;
}
}
return "Selected " . count($oldid) . " IDs. Updated " . $idupdates . ".";
}

If someone feels like adding to this by looking information up from AUNO or some other source be my guest.

 

* Recent Posts
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 ]


Bebot and Rasberry by bitnykk
[November 29, 2023, 11:04:14 pm ]

* Who's Online
  • Dot Guests: 329
  • 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