Have to do !whois twice for characters not known by the bot

Bug #390216 reported by xen on 2009-06-21
This bug affects 2 people
Affects Status Importance Assigned to Milestone

Bug Description

If you issue a !whois for a valid character but one not already known by the bot you have to issue the command twice to get a reply. The first time appears to pickup the bot doesn't know them and thus BUDDY-ADDs them to get their details but then doesn't return them unless asked again:

Thefist [2009-06-21 12:05:42] [TELL] [INC] Kessi: !whois Arazorth
Thefist [2009-06-21 12:05:42] [BUDDY] [BUDDY-ADD] Arazorth

Thefist [2009-06-21 12:06:17] [TELL] [INC] Kessi: !whois Arazorth
Thefist [2009-06-21 12:06:17] [TELL] [OUT] -> Kessi: Arazorth is a level 21 Demonologist :: [link]Details[/link]

Temar (chris-smith96) wrote :

Ive committed a possible fix
i couldn't see any problems
but i think the issue might be that it adds the buddy before it adds the name to the cache were buddy function checks
im not sure if this is why but it all i came up with as it looked fine

Changed in bebot:
assignee: nobody → Temar (chris-smith96)
importance: Undecided → Medium
status: New → In Progress
Temar (chris-smith96) wrote :

oh yer and i cant test so you will have to let me know

xen (xen-uk) wrote :

Had to correct a couple of typos in modules/whois.php before it'd run (just mismatched brackets) - patch attached for those.

With those fixed tho it still doesn't work correctly. Here's the console log for a !whois against someone never encountered before (in AoC):

Thefist [2009-06-21 14:24:25] [TELL] [INC] Kessi: !whois Poisonshadow
Thefist [2009-06-21 14:24:25] [BUDDY] [BUDDY-ADD] Poisonshadow
Thefist [2009-06-21 14:24:25] [BUDDY] [LOG] Poisonshadow changed status [1] (not on notify)
Thefist [2009-06-21 14:24:25] [OUTPUT] [ERROR] Broken plugin, type: is unknown to me; source: , message: Poisonshadow is a level 19 Assassin :: Online :: [link]Details[/link]

btw - I only applied revision 48's changes against 0.6.3, let me know if the breakage is a result of me skipping the intermediate revisions and I'll try it again.

Temar (chris-smith96) wrote :

ok i have fixed the typos and fixed the part that cause it to fail to output

xen (xen-uk) wrote :

Yup, that seems to have fixed it, can now query someone not known to the bot and it replies to the whois first time.

Thanks Temar! :)

Temar (chris-smith96) on 2009-06-24
Changed in bebot:
status: In Progress → Fix Committed
DJKRose (dj-krose) wrote :

The bug is still reproduceable with the current branch 0.6 r76:

Helferlein [14:09:42] [TELL] [INC] Luyu: whois Atzbar
Helferlein [14:09:42] [BUDDY] [BUDDY-ADD] Atzbar
Helferlein [14:10:06] [TELL] [INC] Luyu: whois Atzbar
Helferlein [14:10:06] [TELL] [OUT] -> Luyu: Atzbar is a level 67 Bear Shama

Changed in bebot:
status: Fix Committed → Confirmed
DJKRose (dj-krose) wrote :

I have identified the problem. It's a little bit more complicated, but I'm on it...

Changed in bebot:
assignee: Temar (chris-smith96) → DJKRose (dj-krose)
DJKRose (dj-krose) wrote :

Problem might be solved with rev 141. I leave this bug open, because it still needs some testing, especially:
- !whois and buddy add/remove under AO
- roster update
- Logging a bot with many members into AoC after a long offline time, so that everybody's info gets refreshed.

DJKRose (dj-krose) wrote :

Problem is verified to be solved in trunk, which will become version 0.7 sometimes. It is unlikely that the patch comes to 0.6, because the bug revealed an even bigger issue, for which pig parts of the code had to be restructured, and the way this was done is still a little bit experimental.

Changed in bebot:
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers