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: Solution: Bot doesnt listen to org chat  (Read 3557 times)

0 Members and 1 Guest are viewing this topic.

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Solution: Bot doesnt listen to org chat
« on: July 29, 2005, 08:25:38 pm »
[Edit]

There should no longer be a need to use this workaround. A proper fix has been added to BeBot 0.2.3 and 0.3.x versions.
[/edit]

I finally had time to sit down and look into this problem and traced it back to a problem in AOChat itself.

Open up AOChat.php and find the following code snippit:
Code: [Select]
    function lookup_group($g, $type=0)
    {
      if($type && ($gi = (strlen($g) === 5 && ord($g[0]) < 0x10)))
        return $g;
      if(!$gi)
        $g = strtolower($g);
      return empty($this->gid[$g]) ? false : $this->gid[$g];
    }

Replace it with:
Code: [Select]
    function lookup_group($g, $type=0)
    {
      if($type && ($gi = (strlen($g) === 5 && ord($g[0]) < 0x10)))
        return $g;
      if(!$gi)
        $g2 = strtolower($g);

        if (!empty($this->gid[$g]))
          return $this->gid[$g];
        else if (!empty($this->gid[$g2]))
          return $this->gid[$g2];
        else
          return false;
    }

The double check im doing is probably not needed, but i dont know why strtolower was used in the first place (it wasnt in earlier versions of the AOChat library, hence it wont affect the IGN release thats out for example)
Ive contacted Auno about it but have still yet to hear back.
« Last Edit: May 14, 2006, 10:33:33 am by Khalem »
BeBot Founder and Fixer Kingpin

 

* 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: 269
  • 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