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: Clan shopping 1-50 (Can't read from)  (Read 2264 times)

0 Members and 1 Guest are viewing this topic.

Offline Ebag333

  • Contributor
  • *******
  • Posts: 134
  • Karma: +0/-0
Clan shopping 1-50 (Can't read from)
« on: April 02, 2007, 10:50:11 pm »
I recently put together a plugin to have the bot listen to OT shopping 1-50, Neu. shopping 1-50, and Clan shopping 1-50.

OT and Neu shopping seem to work perfectly fine.  However, I can't recieve Clan shopping 1-50.

Anyway, long story short, I pulled out my old IGN bot, and modified it to send a test message to Clan shopping 1-50.  Boom, disconnect.

Seems Clan shopping 1-50 isn't actually a valid channel.

Anyone have any experience/knowledge with this?  I know I used to read from the Clan shopping 1-50 channel some months ago when I was running an IGN bot, now the exact same bot/plugin/setup doesn't work.

Offline Ebag333

  • Contributor
  • *******
  • Posts: 134
  • Karma: +0/-0
Re: Clan shopping 1-50 (Can't read from)
« Reply #1 on: April 02, 2007, 11:28:47 pm »
Some further testing.  Seems all clan channels have this problem.  Clan Shopping 50-100 and Clan OOC also have this.

Offline Vhab

  • Contributor
  • *******
  • Posts: 180
  • Karma: +0/-0
    • VhaBot Forum
Re: Clan shopping 1-50 (Can't read from)
« Reply #2 on: April 03, 2007, 08:42:50 am »
Just to clarify, as i didn't fully understand it from the main post, is this about IGN or BeBot?

Offline Malosar

  • BeBot Expert
  • ****
  • Posts: 259
  • Karma: +0/-0
    • http://www.lowerdimension.com
Re: Clan shopping 1-50 (Can't read from)
« Reply #3 on: April 03, 2007, 12:55:58 pm »
I think he means he used his old IGN bot to test the channel as well and had similar issues.
Eternalist
General of The Syndicate

Offline Ebag333

  • Contributor
  • *******
  • Posts: 134
  • Karma: +0/-0
Re: Clan shopping 1-50 (Can't read from)
« Reply #4 on: April 03, 2007, 07:01:42 pm »
Yup.  I probably wasn't clear enough.

Here's the snippet of code I'm using.

OT Shopping works just fine, clan shopping doesn't.

Code: [Select]
<?php


$shopsearch 
= new Shopsearch($bot);

$commands['gmsg']['OT shopping 1-50'][] = &$shopsearch;
$commands['gmsg']['Clan shopping 1-50'][] = &$shopsearch;
$commands['gmsg']['Neu. shopping 1-50'][] = &$shopsearch;

class 
Shopsearch
{
    var 
$bot;

function Shopsearch(&$bot)
{
$this -> bot = &$bot;
}

function gmsg($name$group$msg)
{
if ($group 'OT shopping 1-50')
{
$grouptype "Omni";
}
else if ($group 'Clan shopping 1-50')
{
$grouptype "Clan";
}
else if ($group 'Neu. shopping 1-50')
{
$grouptype "Neutral";
}
else
{
$grouptype $group;
}

$newmessage "[<font color=#ffff00>".$grouptype."</font>][<font color=#ffff00>".$name."</font>] ".$msg;
$this -> bot -> send_pgroup($newmessage);

$replace = array("'""\"");
$msg str_replace($replace""$msg);

$exists $this -> bot -> db -> select("SELECT * FROM shop_history WHERE seller = '$name' AND msg = '$msg' AND channel = '$group'");

if (empty($exists))
{
$this -> bot -> db -> query("INSERT INTO shop_history (seller,channel,msg,time,lasttime) VALUES ('$name','$group','$msg','".time()."','".time()."')");
}
else
{
$this -> bot -> db -> query("UPDATE shop_history SET lasttime = '".time()."' WHERE seller = '$name' AND msg = '$msg' AND channel = '$group'");
}
}

?>



Offline Vhab

  • Contributor
  • *******
  • Posts: 180
  • Karma: +0/-0
    • VhaBot Forum
Re: Clan shopping 1-50 (Can't read from)
« Reply #5 on: April 03, 2007, 07:37:57 pm »
Did you try to log the bot on aorc and see if the channel shows there?

Offline Ebag333

  • Contributor
  • *******
  • Posts: 134
  • Karma: +0/-0
Re: Clan shopping 1-50 (Can't read from)
« Reply #6 on: April 03, 2007, 08:01:51 pm »
Yup.  Works fine ingame, in AORC, and various other chat clients.  I even parsed out every single incoming message (on the IGN bot) and nabbed the exact channel name as it was shown on IGN (which is what I'd already had).

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Clan shopping 1-50 (Can't read from)
« Reply #7 on: April 03, 2007, 08:40:25 pm »
May be completly unrelated, but $group = 'OT shopping 1-50' should be $group == 'OT shopping 1-50' too, or you'll always end with Omni as group ;)

Offline Ebag333

  • Contributor
  • *******
  • Posts: 134
  • Karma: +0/-0
Re: Clan shopping 1-50 (Can't read from)
« Reply #8 on: April 03, 2007, 09:05:20 pm »
Thanks.  That'll fix the pgmsg, but if you notice I'm actually inserting into the table the actual group name, not the short name.

So unfortunatly not the actual problem...wish it was that easy though. :D

 

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