L* R*
HOME FORUM DOWNLOADS
Content
  Links
     Browse SVN
     SVN Commit log
     Documentation (Wiki)
  Developers
     Taskmanager
User
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 21, 2008, 08:43:09 PM

Login with username, password and session length
Search



Advanced search
Support GoPHP5.org
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Modules > Modules for older versions > 0.2.x Custom/Unofficial Modules > Topic: Experimental Rooster_GUILD.php
Pages: 1 2 3 [4] 5   Go Down
« previous next »
Print
Author Topic: Experimental Rooster_GUILD.php  (Read 8453 times)
0 Members and 1 Guest are viewing this topic.
jjones666
BeBot Contributor
Champion
*******
Offline Offline

Posts: 353


Re: Experimental Rooster_GUILD.php
« Reply #45 on: June 20, 2006, 08:47:45 AM »

I wasn't 100% sure which AOChat I am using, I think from the previous SVN builds - I know Khalem said that his latest update breaks a lot of stuff so didn't update.  I know Xen also distributes a modified AOChat also at one point (so assume this is the one his module is based on).

Hopefully these type of problems will go away when we have one "standard" AOchat to use for all modules.

I will try to fix the module module based on your above input Nesi (thanks very much!).  Will let you know the results.

Cheers,

-b-
Logged
jjones666
BeBot Contributor
Champion
*******
Offline Offline

Posts: 353


Re: Experimental Rooster_GUILD.php
« Reply #46 on: June 20, 2006, 06:56:57 PM »

Works perfectly, thanks!

One thought, with new roster automatically adding person to roster - removing a new member from guestlist automatically before making a member would make sense.  (I know you can do this manually before invite).

Cheers,

-jj-
Logged
Alreadythere
BeBot Maintainer
Administrator
Grandmaster
********
Offline Offline

Posts: 1077


Re: Experimental Rooster_GUILD.php
« Reply #47 on: June 21, 2006, 07:29:52 AM »

The current way the cronjob adds buddies doesn't handle deleted characters well.
It adds them, printing an empty "[BUDDY] [ADD]" message, followed by "[BUDDY] [LOG]    logged [off] (not member)".

Adding a check so only IDs > 0 gets added as buddie seems to solve this.
Logged
Nesi
Rookie
**
Offline Offline

Posts: 55


Re: Experimental Rooster_GUILD.php
« Reply #48 on: June 21, 2006, 02:31:22 PM »

Hmmm tried using a while loop instead of a foreach?
Foreach can cause problems in some cases.

Edit: took a quick peek at the module code around the add buddy segment.

The foreach statement may go sideways through the columns of the array if there is only one row, in the array that is passed to it.
On numerous rows it will go downwards through the array, catching the key and value of the buddy in question as expected.

IE. if there is only one member to be added and this member is offline, the array from AOChat could look something like this $bud_del[id#] = false.

Foreach may then treat both the id# and the false (0) as an array value, adding both to the memberlist. And 0 is a valid "character" ingame.
 
« Last Edit: June 22, 2006, 06:48:34 AM by Nesi » Logged
Nesi
Rookie
**
Offline Offline

Posts: 55


Re: Experimental Rooster_GUILD.php
« Reply #49 on: June 22, 2006, 06:38:53 AM »

No promises, but try this line instead of the foreach..  will do the exact same thing as the foreach but not going sideways.

// Add to buddylist if not yet in there
   while(list($key, $memb) = each($members))
« Last Edit: June 22, 2006, 06:55:36 AM by Nesi » Logged
Alreadythere
BeBot Maintainer
Administrator
Grandmaster
********
Offline Offline

Posts: 1077


Re: Experimental Rooster_GUILD.php
« Reply #50 on: June 22, 2006, 07:28:30 AM »

The problem I noticed is this: a char that got deleted is still in the member table. Then you get the result I posted above.
Doesn't have anything to do with foreach, it's just a missing check for a valid ID before or in aorc -> addbuddy().
Logged
Nesi
Rookie
**
Offline Offline

Posts: 55


Re: Experimental Rooster_GUILD.php
« Reply #51 on: June 22, 2006, 07:59:31 AM »

Quote from: Alreadythere on June 21, 2006, 07:29:52 AM
Adding a check so only IDs > 0 gets added as buddie seems to solve this.

Well i assumed this was your fix, and you are talking about adding buddys.
Logged
Dabaron
Apprentice
***
Offline Offline

Gender: Male
Posts: 145


Re: Experimental Rooster_GUILD.php
« Reply #52 on: August 18, 2006, 02:18:03 AM »

Found an error in here that was causing my bot to crash if I did a -seen on someone that it had never seen.  Was crashing with Fatal Error: Cannot use string offset as an array in C:\BeBot\Beerraid\modules\Rooster_GUILD.php on line 219.

I changed 219 from:
if ($t_result
  • ==
to:
 if (empty($t_result))
and that seems to have fixed it.  Made more sense to me since it was looking for if (!empty($t_result)) for people that it had seen.
Logged
Xenixa
BeBot Contributor
Expert
*******
Offline Offline

Posts: 307



Re: Experimental Rooster_GUILD.php
« Reply #53 on: September 02, 2006, 07:45:59 PM »

Quote from: Dabaron on August 18, 2006, 02:18:03 AM
Found an error in here that was causing my bot to crash if I did a -seen on someone that it had never seen.  Was crashing with Fatal Error: Cannot use string offset as an array in C:\BeBot\Beerraid\modules\Rooster_GUILD.php on line 219.

I changed 219 from:
if ($t_result
  • ==
to:
 if (empty($t_result))
and that seems to have fixed it.  Made more sense to me since it was looking for if (!empty($t_result)) for people that it had seen.

Hmm strange my line 219 is:
Code:
if (!empty($t_result)) { $last['seen'] = $t_result[0][0]; }
It's checking to make sure the timestamp field is not empty before it reassigns $t_result[0][0] to $last['seen']. Reassigning the value from the DB to a new string var clears up the offset error before the actuall value is used.

Also I updated my Xens_Rooster_GUILD.php on my ftp server that contains:
- Fix suggestion from Nesi about checking the regex in the gmsg function for the or your in the string that comes from aochat.php

Thanks Nesi. Smiley
Logged

<<< Hack's in Zend Studio

All my Custom Bebot files may be Found Here <-clicky
buff
Rookie
**
Offline Offline

Posts: 36


Re: Experimental Rooster_GUILD.php
« Reply #54 on: October 17, 2006, 01:38:49 PM »

Not sure if anyone noticed a problem with the lastest update with Bot rekon the Org. Msg. when people join and leaves. When I temp invite my alts to org and leaves then log off. My online list still shows the name of the alts that temp join and leaves. Thought would bring that up if anyone noticed this issue.

Also when I use jj's gueslist function and turn alert on/off, i guess this warning:

MySQL error (# 0) on query: UPDATE guests SET alertstatus = 1 WHERE name = 'xxxxxxx'
Unknown column 'alertstatus' in 'field list'
« Last Edit: October 17, 2006, 05:19:28 PM by buff » Logged
Khalem
BeBot Founder
Administrator
Grandmaster
********
Offline Offline

Gender: Male
Posts: 670



WWW
Re: Experimental Rooster_GUILD.php
« Reply #55 on: October 17, 2006, 07:56:46 PM »

Somewhat related, but the issue with people remaining on online list is resolved in 0.3 SVN which has a rewritten roster.
Logged

BeBot Founder and Fixer Kingpin
Madman coder and destroyer of good code
kuznechik
BeBot Contributor
Rookie
*******
Offline Offline

Gender: Male
Posts: 60



Re: Experimental Rooster_GUILD.php
« Reply #56 on: October 20, 2006, 12:29:53 PM »

in Xens_Rooster_guild.php at line 131 there must be

if (empty($l_result[0]) || $l_result[0][1] != $memb["rank"] || $l_result[0][2] != $memb["level"] || $l_result[0][3] != $memb["ailevel"] || $l_result[0][5] = '')

instead of

if (empty($l_result[0]) || $l_result[1] != $memb["rank"] || $l_result[2] != $memb["level"] || $l_result[3] != $memb["ailevel"] || $l_result[5] = '')
Logged

Kuznechik, proud bot admin of Disciples of Omni-Tek, Rimor.
buff
Rookie
**
Offline Offline

Posts: 36


Re: Experimental Rooster_GUILD.php
« Reply #57 on: October 24, 2006, 12:02:36 PM »

tried what kuznechik recommended but still not working :/
Logged
jjones666
BeBot Contributor
Champion
*******
Offline Offline

Posts: 353


Re: Experimental Rooster_GUILD.php
« Reply #58 on: January 23, 2007, 07:59:27 AM »

Branched and split discussion on autoinvite and alert plugins to...

http://bebot.shadow-realm.org/index.php/topic,648.0.html

-jj-
Logged
pusikas
Experienced
****
Offline Offline

Posts: 161


Re: Experimental Rooster_GUILD.php
« Reply #59 on: April 06, 2007, 02:59:50 PM »

The Roster_GUILD.php module deletes a member from the raid_points table when you do a "!member del" on him. It doesn't do that when the person is kicked from org, or just leaves. It also only deletes the raid points if the command is executed on the main, not when it is done on an alt. This is especially annoying, as there is no easy way to find out how many raidpoints were deleted, and since everyone can use the !member command. While the "!points add" command is limited (for good reason) to superadmins. And guess who managed to delete all his raidpoints this way? ^^

Is there a reason for this, or can I just comment out the following line?

Code:
$this -> bot -> db -> query("DELETE FROM raid_points WHERE id = " . $id);
Logged

Luuv  Bot-Keeper of Vengeance ^^*
Pages: 1 2 3 [4] 5   Go Up
Print
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Modules > Modules for older versions > 0.2.x Custom/Unofficial Modules > Topic: Experimental Rooster_GUILD.php
« previous next »
 
Jump to:  

Recent
Change text in remember "...
by gerborg
[Today at 05:14:57 PM]

Log playtime from buddys ...
by Temar
[November 20, 2008, 10:33:57 AM]

Vote Core module and Simp...
by Temar
[November 19, 2008, 09:26:52 AM]

Restrict access for one m...
by Organizer
[November 19, 2008, 03:21:19 AM]

Custom / Revised Modules ...
by Elesar1
[November 17, 2008, 03:51:46 PM]

TWC
by Temar
[November 16, 2008, 11:39:12 AM]

Are there any FUN modules...
by Elesar1
[November 15, 2008, 07:39:15 PM]

Call to a member function...
by exxie
[November 15, 2008, 09:29:31 AM]

Ported Modules
by Alreadythere
[November 14, 2008, 06:10:07 PM]

cURL and other non-defaul...
by Temar
[November 14, 2008, 04:11:44 PM]
Stats
Members
Total Members: 1235
Latest: DDDepressionnn
Stats
Total Posts: 11037
Total Topics: 1496
Online Today: 16
Online Ever: 168
(July 01, 2007, 09:30:02 PM)
Users Online
Users: 1
Guests: 19
Total: 20
upstart

Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
TinyPortal v0.9.8 © Bloc | NewDef design by Bloc
Page created in 0.464 seconds with 29 queries. (Pretty URLs adds 0.041s, 4q)
Loading...