• Welcome to Valhalla Legends Archive.
 

Am I seeing double?

Started by Eternal, April 13, 2005, 01:40 AM

Previous topic - Next topic

Eternal

I have a slightly puzzling problem that I'm too close to and now just can't see a way through - if anyone has any pointers or advice to help trouble-shoot, I'd be grateful.

Problem: My roomlist is displaying WAR3 user names twice. Through general testing, I've found that it only happens when the user logs on for the first time (ie, normal channel joins are fine) and it doesn't affect other clients. The wierdest part is that it isn't 100% consistent. 90% of the time, two users will appear. The other 10%, one will appear <scratches head>.

This is a log of my project taken while another WAR3 client has logged on and joined the channel:

1    Recv 
0000  FF 0F 2D 00 02 00 00 00 00 00 00 00 5D 00 00 00    ..-.........]...
0010  00 00 00 00 0D F0 AD BA 0D F0 AD BA 42 44 5F 47    ............BD_G
0020  75 61 72 64 69 61 6E 00 33 52 41 57 00             uardian.3RAW.

2  Recv 
0000  FF 0F 37 00 01 00 00 00 00 00 00 00 5D 00 00 00    ..7.........]...
0010  00 00 00 00 0D F0 AD BA 0D F0 AD BA 42 44 5F 47    ............BD_G
0020  75 61 72 64 69 61 6E 00 33 52 41 57 20 31 52 33    uardian.3RAW 1R3
0030  57 20 30 20 44 62 00                               W 0 Db.


And now a log of the same client which is already logged on and joins the channel  (which works fine):
1 Recv 
0000  FF 0F 37 00 02 00 00 00 00 00 00 00 5D 00 00 00    ..7.........]...
0010  00 00 00 00 0D F0 AD BA 0D F0 AD BA 42 44 5F 47    ............BD_G
0020  75 61 72 64 69 61 6E 00 33 52 41 57 20 31 52 33    uardian.3RAW 1R3
0030  57 20 30 20 44 62 00                               W 0 Db.


If you would find elements of the code helpful, I'm happy to post them (I just wasn't sure what would be the most relevant to show).

Thanks in advance.
^-----silly Brit
-----------------------------
www.brimd.com

Eric

#1
When you receive an EID_SHOWUSER for a user that you've already been notified of, then it's a stat update for the user.  You should check to determine if the user's already present in the channel when receiving this event, and if they are, just modify them accordingly.

iago

Quote from: LoRd[nK] on April 13, 2005, 03:00 AM
When you receive an EID_SHOWUSER for a user that you've already been notified of, then it's a stat update for the user.  You should check to determine if the user's already present in the channel when receiving this event, and if they are, just modify them accordingly.

That's correct.  I used to have a problem with my old bot showing some War3 people twice, and it turned out to be because you sometimes receive a second SHOWUSER.
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Zakath

This is a well known feature of Battle.net. Diablo II has done this since it was first introduced (quite some time ago now).

If you analyzed it, you would notice that the first EID_SHOWUSER notification would have no extended information in the statstring - just the user's product. The second one, meanwhile, would contain either character information (for Diablo II - these sort of updates are only sent to other Diablo II clients) or win/icon information (for Warcraft III). It becomes fairly obvious that what it's doing is updating you on that person's actual status.
Quote from: iago on February 02, 2005, 03:07 PM
Yes, you can't have everybody...contributing to the main source repository.  That would be stupid and create chaos.

Opensource projects...would be dumb.

Eternal

#4
Thanks guys. I'll review the code with these thoughts in mind.
I'll let you know how I go.

[EDIT: Problem solved - as suggested. Thanks]
^-----silly Brit
-----------------------------
www.brimd.com