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: !announce on .2 raidbot crashs bot  (Read 17064 times)

0 Members and 1 Guest are viewing this topic.

Offline Nytridr

  • BeBot Expert
  • ****
  • Posts: 262
  • Karma: +0/-0
    • Rising Sun
Re: !announce on .2 raidbot crashs bot
« Reply #15 on: February 17, 2007, 09:07:25 pm »
I have an idea.. well first let me say this.. I was able to get through 2 full announcements today and the 3rd one crashed the bot with the above errors.. I have even when to mysql and put in there dll files.. to see if it was something incompatible..dont knwo if that was just a fluck about me getting through it or not but since then I have yet been unable to get through a full announce.

okay.. here is what i also did I put
extension=php_mysql.dll
extension=php_mysqli.dll

in my INI which seems to have speed everything up.. dont think php was looking for the sqli for the newer version of mysql.. anyway.. the problem still remains..

Okay I have did a little changing.. I thought I would just get the member list down to below 1k members.. I did that by removing any member below 100.  so now I am down to 711 members.. I put back in the standard massmsg.php , is.php, roster_raid.php.. and I am able to send out msg message to only 4 people and also mass invites also..

I am just kind of tyring to figure out what the issue is.. maybe this is part of the same issue.. these members where added through the orgraidroster module.. and it seems all members are properly filled in.. so how do I check to make sure those members are actaully on the bots friends list?

Co-Prez of Rising Sun RK1 (1st & only org I will ever belong to)

Offline Nytridr

  • BeBot Expert
  • ****
  • Posts: 262
  • Karma: +0/-0
    • Rising Sun
Re: !announce on .2 raidbot crashs bot
« Reply #16 on: February 17, 2007, 09:10:56 pm »
Throwing out some ideas
Correct me if I'm wrong since I'm assuming alot here without knowing how the thing really works, but here it goes:
The aunnounce module adds people to the friendslist to get their status, to do so it uses user id's directly from the database. one of these user id's is incorrect (probebly of a deleted character), when the bot tries to add it, fc's chat server gets angry and disconnects you.

interesting concept.. but since I can dump the member table and have orgraidroster rebuild it..wouldnt it have the correct usernames and user ID's?  or maybe something is wrong with something with the xml transfer.. umm.. defently a posiblibity.. is there anyway to maybe write a script to see if what there is in the member table is valid against FC?  Maybe like a whois script that would just check the member table ?

or just thought of this.. also.. what about settings in my mysql.ini file OR even the tables being setup wrong?

would be nice to have a blank database to compair to just to make sure..
« Last Edit: February 18, 2007, 01:27:12 am by Nytridr »
Co-Prez of Rising Sun RK1 (1st & only org I will ever belong to)

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: !announce on .2 raidbot crashs bot
« Reply #17 on: February 18, 2007, 10:17:07 pm »
Blank database can be obtained by setting up a blank database and launching a BeBot using it once.

MySQLi has 0 effect on BeBot as BeBot doesn't make use of MySQLi since it's not bundled with PHP4 which we still support, and it hasn't been a priority adding compatibility for both.

What i can offer you at this point is modifying the module with a lot of debug calls to try and see if theres a pattern.

@Vhab, if memory serves we add by nickname, not by ID, and we call AOChat's functions directly.
BeBot Founder and Fixer Kingpin

Offline Nytridr

  • BeBot Expert
  • ****
  • Posts: 262
  • Karma: +0/-0
    • Rising Sun
Re: !announce on .2 raidbot crashs bot
« Reply #18 on: February 19, 2007, 01:48:49 am »
yes if you could that would be awesome.. maybe have it write it to a differnt log file if you could.. (not a biggy thought)  but yes.. some major debugging additions in the code would be helpful..

just maybe we can track this down..
Co-Prez of Rising Sun RK1 (1st & only org I will ever belong to)

Offline Nytridr

  • BeBot Expert
  • ****
  • Posts: 262
  • Karma: +0/-0
    • Rising Sun
Re: !announce on .2 raidbot crashs bot
« Reply #19 on: February 22, 2007, 04:08:26 pm »
This seems to be very random.. it seems like the sending the messages seems to be fine.. it is crashing somewhere in the adding and removing buddy part..

can you modify that part for me where it will actually put it in the log file for me.. I have tried to use the this -> bot -> log   part but it seems like it only puts it to screen.. I actually have to be watching the screen to see if there are any errors.  but when this happens there is nothing put out..it just stops for about 30 seconds and then spits out the errors..   

if someone could add some logging to every line to the log file if you could.. maybe this would help out..

I am going to do some actaul testing on the machine this weekend when I get home.. to make sure there isnt any problems with the RAM or anything.. I understand this is a wierd problem, but the problem I am having is even on my laptop I will still get this error.. and the only thing that the server pc and my laptop have in common is mysql, php, win xp pro... other then that there isnt any simullarities..

Nytridr
Co-Prez of Rising Sun RK1 (1st & only org I will ever belong to)

Offline Nytridr

  • BeBot Expert
  • ****
  • Posts: 262
  • Karma: +0/-0
    • Rising Sun
Re: !announce on .2 raidbot crashs bot
« Reply #20 on: February 25, 2007, 10:57:26 pm »
okay I was able to get it work for a few hours today.. after droping my member and whois tables.. whois never did get recreated but my members table did.. but I didnt have the ai stuff in it anymore.. I changed the php file to readd the ai stuff and it stoped working on me.. so I changed it back.. and now it still isnt working again.. I am woundering if it something to do with the members table somewhere..

any ideas?
Co-Prez of Rising Sun RK1 (1st & only org I will ever belong to)

Offline jjones666

  • Contributor
  • *******
  • Posts: 353
  • Karma: +0/-0
Re: !announce on .2 raidbot crashs bot
« Reply #21 on: February 25, 2007, 11:15:21 pm »
What roster are you using?  If you had AI info and don't now, strikes me something isn't working as intended.

Our raidbot runs 100% using info from the whois-cache, so i wrote this section to update the member table from there, and also re-add any missing buddies as a failsafe:

Code: [Select]
if (preg_match("/^" . $this -> bot -> commpre . "updateroster YES$/i", $msg, $info))
{
$result = $this -> bot -> db -> select("SELECT nickname, lastseen FROM members");
$inside = "<font color=CCInfoHeadline>:::: Roster update ::::</font>\n\n";
if (!empty($result))
foreach ($result as $val)
{
$nickname = $val[0];
$lastseen = $val[1];
$nickname = ucfirst(strtolower($nickname));

$num++;
$inside .= $num.". Updated <font color=#ffff00>".ucfirst($nickname)."</font>...\n";
$who = $this -> bot -> whois -> lookup($nickname);
$stamp = time();

$members["id"] = $this -> bot -> aoc -> get_uid($nickname);
$members["lastseen"] = $lastseen;
$members["nickname"] = $nickname;
$members["firstname"] = $who["firstname"];
$members["lastname"] = $who["lastname"];
$members["rank"] = $who["rank_id"];
$members["rank_name"] = $who["rank"];
$members["level"] = $who["level"];
$members["profession"] = $who["profession"];
$members["gender"] = $who["gender"];
$members["guild"] = $who["org"];
$members["breed"] = $who["breed"];
$members["at"] = $who["at"];
$members["at_name"] = $who["at_name"];

if (!$this -> bot -> aoc -> buddy_exists($nickname))
$this -> bot -> aoc -> buddy_add($members["id"]);

$this -> bot -> db -> query("DELETE FROM members WHERE id = " .$members["id"]);
$this -> bot -> db -> query("INSERT INTO members (id, lastseen, nickname, firstname, lastname, rank, rank_name, level, profession, gender, breed, ailevel, guild, aititle, updated)
VALUES ('" . $members["id"] . "', '" . $members["lastseen"] . "',
'" . $members["nickname"] . "', '" . $members["firstname"] . "',
'" . $members["lastname"] . "', '" . $members["rank"] . "',
'" . $members["rank_name"] . "', '" . $members["level"] . "',
'" . $members["profession"] . "', '" . $members["gender"] . "',
'" . $members["breed"] . "', '" . $members["at"] . "',
'" . $members["guild"] . "', '" . $members["at_name"] . "',
" . $stamp . ")");
}
$this -> bot -> send_tell($name, "Updating roster... ".$this -> bot -> make_blob("result", $inside));
}

Don't expect that to drop straight into the roster, but you may be able to make some use of the code.

-jj-

Offline Nytridr

  • BeBot Expert
  • ****
  • Posts: 262
  • Karma: +0/-0
    • Rising Sun
Re: !announce on .2 raidbot crashs bot
« Reply #22 on: March 01, 2007, 12:25:17 am »
okay I gave up on trying to get a massmsg on our raid bot to work.. I did how ever decide to go another route.. since teh org bots also have !announce I decided to go that route.. which would in turn speed the announces up also.. but now I am having a problem.. and not sure where to look..

Code: [Select]
function send_massmsg($from, $msg, $invite)
{
$all = $this -> bot -> db -> select("SELECT orgbotnames FROM orgbots ORDER BY orgbotnames ASC");
$this -> bot -> send_tell($from, "Mass message initiated to ".count($all)." Org Bots...");
$list = "<font color=CCInfoHeadline>::::: Mass Notification :::::</font><font color=CCInfoText>\n\n";

if (!empty($all))
{
foreach ($all as $member)
{

$this -> bot -> send_tell($member[0], "!announce from $from: <font color=#ffff00>$msg</font>/n"
.  $this -> bot -> make_blob("click to join bot", "/tell aofbot !join"), 1);
//$this -> bot -> log("sending $member the message");
$list .= "<font color=#ffff00>" . $member[0] . "</font> was sent \n";
}
return "Mass Notification :: " . $this -> bot -> make_blob("click to view", $list);
}
return "No bots found!";
}

Code: [Select]
To [Aoftest]: !announce testies
[Aoftest]: Mass message initiated to 2 Org Bots...
[Aoftest]: Mass Notification :: click to view

Code: [Select]
[2007-02-28 23:21:50]   [TELL]  [INC]   Aoftest: !announce from Metanyt: testies
/n[link]click to join bot[/link]
[2007-02-28 23:21:50]   [TELL]  [OUT]   -> Aoftest: /tell rsbot1 !help

both bots are coming out like that..

Code: [Select]
To [Rsbot1]: !security whois Aoftest
[Rsbot1]: Aoftest's highest access level is SUPERADMIN. Aoftest is a member of the following security groups: superadmin, admin, leader

okay.. SO.. what to do.. I can log onto Aoftest and manually do the !announce and it works.. so I am woundering if it has something to do between the 2 bots..

Nytridr
Co-Prez of Rising Sun RK1 (1st & only org I will ever belong to)

Offline Nytridr

  • BeBot Expert
  • ****
  • Posts: 262
  • Karma: +0/-0
    • Rising Sun
Re: !announce on .2 raidbot crashs bot
« Reply #23 on: March 01, 2007, 06:46:36 am »
okay I found to problem with this little escapade of mine..(sp)   

could someone fix this for I can still have colors and still be able to send out properly formated tells please...

bot.php   (I know I know.. dont say it.., but I did find it)

Code: [Select]
/*
send a tell. Set $low to 1 on tells that are likely to cause spam.
*/
function send_tell($to, $msg, $low=0, $color=true)
{
$send = true;
if (preg_match("/<a href=\"(.+)\">/isU", $msg, $info))
if (strlen($info[1]) > $this -> maxsize)
{
$this -> cut_size($msg, "tell", $to, $low);
$send = false;
}

if ($send)
{
$msg = str_replace("<botname>", $this -> botname, $msg);
$msg = str_replace("<pre>", str_replace("\\", "", $this -> commpre), $msg);

if ($color)
//$msg = "<font color=" . $this -> tell_color . ">" . $msg . "</font>"; //this is for color in tells what I had to remove to get tells to work correctly when sent to other bots.

if ($this -> que -> check_que())
{
$this -> log("TELL", "OUT", "-> " . $this -> aoc -> get_uname($to) . ": " . $msg);
$msg = utf8_encode($msg);
$this -> aoc -> send_tell($to, $msg);
}
else
$this -> que -> into_que($to, $msg, "tell", $low);
}
}


I remember having this problem when trying to use gcr with the .3 releases.. not sure if anything is the same or what not.. I will have to look this weekend when I get home..(just something to look at)

the folloing code is what the problem was and things started working after I commented this line out..
spliting the load of the !annonce's works awesome and everyone got the announces in a fraction of the time..

Code: [Select]
$msg = "<font color=" . $this -> tell_color . ">" . $msg . "</font>";
Now if there is a way to auto get the command to be used (!, +, ect)  before sending out a tell to that bot..

any help is appreciated.

Nytridr
« Last Edit: March 01, 2007, 11:11:07 am by Nytridr »
Co-Prez of Rising Sun RK1 (1st & only org I will ever belong to)

 

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