Techcable / pircbotx

Automatically exported from code.google.com/p/pircbotx
0 stars 0 forks source link

Owner MessageEvent Get[Level] list is not populated #91

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Handle the MessageEvent when the channel owner (or +q) activates the event 
2. In debug mode, check GetOwners user list
3. Check each list: voices, ops, sops, hops, etc

What is the expected output? What do you see instead?
Expected output: the owner list is populated.
Instead: the owner list, and every other user list is empty. 
This is a hard bug to replicate, but it only seems to happen when the channel 
owner activates the MessageEvent.

What version of the product are you using? On what operating system?
Pircbotx Version 1.7, on windows 7, 32 bit.

Please provide any additional information below.
- Debugging in netbeans
- java framework 1.7
- using an anonymous class to handle the event

I'm really excited that this project is being regularly updated, and have found 
a workaround for my personal uses in the meantime.  If I can help in any way to 
fix this problem, please let me know!

Original issue reported on code.google.com by tenner.j...@gmail.com on 30 Oct 2012 at 12:30

GoogleCodeExporter commented 9 years ago
Sorry for the delay, I've been very busy lately 

Well, first, it seems that owners haven't been filled in correctly since a ~ in 
the WHO reply doesn't equal an owner, its r. I'm not sure exactly why its been 
like that for a while (I think that code is several versions old). 

I'm entirely sure if that was your problem, but when I change the parsing to 
use the correct letter, I get this as output

1354292794624 <<<:TheLQ!~LQ@ulsecure-belknap-10008.wireless.louisville.edu 
PRIVMSG #pircbotx :?list
1354292794624 >>>PRIVMSG #pircbotx :TheLQ: Ops: TheLQ, 
1354292795625 >>>PRIVMSG #pircbotx :TheLQ: Voice: 
1354292796626 >>>PRIVMSG #pircbotx :TheLQ: Owner: TheLQ, 
1354292797626 >>>PRIVMSG #pircbotx :TheLQ: SuperOps: 
1354292798626 >>>PRIVMSG #pircbotx :TheLQ: Halfops: 

So it seems to be working. Also note that all the lists are populated by the 
WHO reply, so if you, for example, start immediately trying to use the user 
lists it isn't going to give you anything. Are you sure your waiting till the 
user lists are populated?

Would you mind trying the snapshot version? I just deployed a new version

Original comment by Lord.Qua...@gmail.com on 30 Nov 2012 at 4:53

GoogleCodeExporter commented 9 years ago
For some reason, the isOp(user), isHalfOp(user), isSuperOp(user) and 
isOwner(user) methods in channel are not working for me either. They always 
return false no matter what status a user has, even if they are de-op'd and 
re-op'd again.

Original comment by lduckd...@gmail.com on 8 Dec 2012 at 6:06

GoogleCodeExporter commented 9 years ago
Have you tried the latest snapshot?

This was done on the SwiftIRC network. I think I might drop TheLQ-Pircbotx 
permanently on that channel since Freenode doesn't support owners, halfops, and 
superops. 

<TheLQ-Test> TheLQ: You are: [op, owner, halfop]
<TheLQ-Test> TheLQ: Channel ops: TheLQ
<TheLQ-Test> TheLQ: Channel voices: 
<TheLQ-Test> TheLQ: Channel owners: TheLQ
<TheLQ-Test> TheLQ: Channel super ops: 
<TheLQ-Test> TheLQ: Channel half ops: TheLQ

The first line was built with channel.is[Level] methods with the , the next 5 
were built with channel.get[Level]. 

Original comment by Lord.Qua...@gmail.com on 8 Dec 2012 at 7:14

GoogleCodeExporter commented 9 years ago
yup, I have been using the latest snapshot. I wanted to ask how does the bot 
recognize the change in status? Does it look at the modes in the channel? Or 
does it look for the Who replies? Because no matter what I do, the above 
methods does not return the correct boolean value.

Original comment by lduckd...@gmail.com on 9 Dec 2012 at 3:18

GoogleCodeExporter commented 9 years ago
Sorry I haven't been able to test the issue.  I can probably download the 
snapshot at some point and retry the problem.

Thanks for the quick reply and fix, but  it may be a while before I can get 
back and test it.

Original comment by tenner.j...@gmail.com on 9 Dec 2012 at 9:17

GoogleCodeExporter commented 9 years ago
@lduckduck
The list is initially built with WHO replies, then continuously built with mode 
changes. Note that apparently servers like UnrealIRCD (which was used by 
SwiftIRC) only list the highest operator mode in the WHO reply (IE if your a op 
and a half-op, it only shows you as an op). Not sure if that's related to your 
problem

Other than that I'm not too sure what to say. Can you add the WHO reply lines 
with your expected output?

Original comment by Lord.Qua...@gmail.com on 9 Dec 2012 at 9:29

GoogleCodeExporter commented 9 years ago
A WHO reply from the IRC server that I connect to replies the following:

WHO #hackseye
352: #hackseye Bohan irc-733F86EF.rutgers.edu tx5.irc.sacnr.com Bohan Hr 0 
Infernus suc
352: #hackseye Kiwi Cant.fly hidden Kiwi H& 0 Kiwi
352: #hackseye An n.ya tx5.irc.sacnr.com Ananya Gr~ 0 Ananya
315: #hackseye End of /WHO list.

And as you said, this server is running Unreal3.2.8.1

Original comment by lduckd...@gmail.com on 9 Dec 2012 at 10:59

GoogleCodeExporter commented 9 years ago
@lduckduck Finally free for a while

I'm confused, with that WHO reply Bohan is a channel owner, Kiwi is a half op, 
and An is a channel owner. 

Try adding this listener 
https://code.google.com/p/lq-projects/source/browse/src/main/java/org/thelq/pirc
botx/commands/LevelsListCommand.java?repo=thelq-pircbotx to your bot and show 
me the output. 

Note this is blocking the 1.8 release, so I'd like to resolve this as soon as I 
can. Unfortunately if I can't figure out the issue then I'll have to close this 
as "Works for Me"

Original comment by Lord.Qua...@gmail.com on 15 Dec 2012 at 7:51

GoogleCodeExporter commented 9 years ago
"Works for me" as well. 
Output of that listener:

<SocBot_> __import__: Ops: Deaygo, Skirmisher, Faerie, __import__ | Voices: 
SocBot_, SocBot | Owners: | Super ops:  | Half ops: 

This is on freenode, and the output supports what I see.

Original comment by entityreborn on 21 Dec 2012 at 8:34

GoogleCodeExporter commented 9 years ago
No response, 2nd person verifying it works, I'm closing this as "Works for me". 

If you run into this problem again I'll need a test case with given import and 
expected output. This is the only way I can figure out what the problem is

Original comment by Lord.Qua...@gmail.com on 24 Dec 2012 at 7:06

GoogleCodeExporter commented 9 years ago
~ is the flag for Owner on UnrealIRC at least. I can't find any other Prefix 
specs right now though. 

I've been wondering if it was my fault random users suddenly was considered 
mods by the bot. I guess I'm hardcoding me as owner and not checking for it 
while this gets fixed (unfixed?)
if (prefix.contains("r")) back to if (prefix.contains("~")) please.

I'm the owner in my channel ("/who #channelname" infomation):
tnud Hr~ tnud@xxxxxxxxxxxxxxxxxxxxxxx.com :0

This guy is a SuperOP:
snesxxxx Hr& snesxxxxx@xxxxxxx.us :0 

Regular User:
Rotaxxxx Hr Rotaxxxx@xxxxxxx.com :0

Other regular user:
Haxxxxxxxxxx H xxxxB@xxxxxxxxxxx.com :0 

Original comment by Tnade...@gmail.com on 26 Feb 2013 at 3:18

GoogleCodeExporter commented 9 years ago
Reverted in Revision 25bdb117110f. 1.9 will be pushed out soon, so this bug 
will be fixed

Original comment by Lord.Qua...@gmail.com on 1 Apr 2013 at 1:51