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

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

Author Topic: Whois.php doesn't work correctly  (Read 1899 times)

0 Members and 1 Guest are viewing this topic.

Offline CGamer

  • BeBot Rookie
  • *
  • Posts: 3
  • Karma: +0/-0
  • AO-Char: Agnefi(DNW)
Whois.php doesn't work correctly
« on: May 09, 2008, 03:56:42 pm »
I found out that the links in the command !whois doesn't work because of these lines:
Quote
         $window .= $this -> bot -> core("tools") -> chatcmd('start ' . $funcomURL, 'Official character bio') . "\n";
         $window .= $this -> bot -> core("tools") -> chatcmd('start ' . $vhabotURL, 'Vhab\'s character info (beta)') . "\n";
         $window .= $this -> bot -> core("tools") -> chatcmd('start ' . $aunoURL, 'Auno\'s character info') . "\n";
      }
so i changed them(i found out how chatcmd() works in core/14_Tools.php) to this:
Quote
         $window .= $this -> bot -> core("tools") -> chatcmd($funcomURL, 'Official character bio', 'start') . "\n";
         $window .= $this -> bot -> core("tools") -> chatcmd($vhabotURL, 'Vhab\'s character info (beta)', 'start') . "\n";
         $window .= $this -> bot -> core("tools") -> chatcmd($aunoURL, 'Auno\'s character info', 'start') . "\n";
and it worked. I dont know if this Thread is in the correct category.

If i did anything wrong, say it to me.

[Note]
Sry for my english, I'm german and its very hard to write and speak english. I'm going to search for more wrong used chatcmd's. Maybe i've already found more of this wrong code.

[Edit]
Ok now i know that this is in the wrong category. It should be in "Coding and development discussion"
« Last Edit: May 09, 2008, 04:02:28 pm by CGamer »

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Whois.php doesn't work correctly
« Reply #1 on: May 09, 2008, 04:23:04 pm »
0.5 forums is the correct one ;)

Thanks for noticing us, those links are fixed in the SVN now.

Will make 0.5.1, which I'll try to publish beginning of next week to keep the momentum up.

Offline CGamer

  • BeBot Rookie
  • *
  • Posts: 3
  • Karma: +0/-0
  • AO-Char: Agnefi(DNW)
Re: Whois.php doesn't work correctly
« Reply #2 on: May 09, 2008, 04:32:50 pm »
I just found out some more coding-errors:
complete fixed Links:
Quote
      if ($this -> bot -> core("settings") -> get("Whois", "ShowOptions") == TRUE)
      {
         $window .= "\n##normal##::: Options :::##end##\n";
         $window .= $this -> bot -> core("tools") -> chatcmd($whois['nickname'], 'Add to buddylist', 'cc addbuddy') . "\n";
         $window .= $this -> bot -> core("tools") -> chatcmd($whois['nickname'], 'Remove from buddylist', 'cc rembuddy') . "\n";
         $window .= $this -> bot -> core("tools") -> chatcmd('history ' . $whois['nickname'], 'Character history') . "\n";
      }

      if ($this -> bot -> core("settings") -> get("Whois", "ShowLinks") == TRUE)
      {
         $funcomURL = "http://people.anarchy-online.com/character/bio/d/" . $this -> bot -> dimension . "/name/" . strtolower($whois['nickname']);
         $vhabotURL = "http://characters.vhabot.net/character.php?character=" . strtolower($whois['nickname']) . "&dimension=" . $this -> bot -> dimension;
         $aunoURL = "http://auno.org/ao/char.php?dimension=" . $this -> bot -> dimension . "&name=" . strtolower($whois['nickname']);

         $window .= "\n##normal##::: Links :::##end##\n";
         $window .= $this -> bot -> core("tools") -> chatcmd($funcomURL, 'Official character bio', 'start') . "\n";
         $window .= $this -> bot -> core("tools") -> chatcmd($vhabotURL, 'Vhab\'s character info (beta)', 'start') . "\n";
         $window .= $this -> bot -> core("tools") -> chatcmd($aunoURL, 'Auno\'s character info', 'start') . "\n";
      }

      return ($this -> bot -> core("tools") -> make_blob("Details", $window));
   }

}
?>

ive added some case "...": to 14_Tools.php:
Quote
      switch($origin)
      {
         case'gc':
         case'o':
         case 3:
            $chatcmd = "o";
            Break;
         case'pgmsg':
         case'pg':
         case 2:
            $chatcmd = "group ".$this -> bot -> botname;
            Break;
         case 'start':
            $chatcmd = "start";
            Break;
         case 'cc addbuddy':
            $chatcmd = "cc addbuddy";
            Break;
         case 'cc rembuddy':
            $chatcmd = "cc rembuddy";
            Break;
         Default:
            $chatcmd = "tell ".$this -> bot -> botname;
      }

May i start working as a Bug-Hunter in BeBot php-files? Just asking^^

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Whois.php doesn't work correctly
« Reply #3 on: May 09, 2008, 05:34:38 pm »
Sure, bug-hunter are always welcome. But if you do that you should use an up-to-date SVN version. We do fix and change stuff in the trunk version regulary - there is a fix for the link trouble in SVN already, we just haven't done another official dev release yet.

Offline CGamer

  • BeBot Rookie
  • *
  • Posts: 3
  • Karma: +0/-0
  • AO-Char: Agnefi(DNW)
Re: Whois.php doesn't work correctly
« Reply #4 on: May 09, 2008, 08:09:30 pm »
i'll download the newest SVN.

Is that a bug, that !Say has no Settings? I remember that !Say had settings...

[Edit]
Which is the correct SVN? tags/0.5.0/ or trunk/ ?
« Last Edit: May 09, 2008, 08:11:44 pm by CGamer »

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: Whois.php doesn't work correctly
« Reply #5 on: May 09, 2008, 08:59:10 pm »
trunk is the active development code.
tags are tagged releases which provide a snapshot of the code at the time of release. As such tags/0.5.0 represents the same code as available for download.
BeBot Founder and Fixer Kingpin

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: Whois.php doesn't work correctly
« Reply #6 on: May 09, 2008, 10:32:30 pm »
Say now output based on were u are
if u are on GC & PG it sends it both
if u are only in 1 of them it only sends to 1
if you are not in iver it returns in a tell

 

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


0.8.x updates for AoC by bitnykk
[January 30, 2024, 11:16:08 pm]


0.8.x updates for AO by bitnykk
[January 30, 2024, 11:15:37 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: 531
  • 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