Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: Tass on November 20, 2005, 12:21 PM

Title: Squelch/Unsquelch problem SmallIcons -> Listview
Post by: Tass on November 20, 2005, 12:21 PM
For some reason I have a problem when the listview is refreshed when you unsquelch someone, sometimes they still show the icon that they are squelched, why is it doing this? :x

It's not sending some flags for the other people that are logged on his ip so it's not editing there icons? I think..
When I rejoin the channel they do not have the squelched icon
Title: Re: Squelch/Unsquelch problem SmallIcons -> Listview
Post by: Joe[x86] on November 20, 2005, 12:47 PM
See my Channel Class (http://forum.valhallalegends.com/index.php?topic=13295.0). Asuming your using VB, you should be able to easilly use this. Just pass your flagsupdate event to it, and their icon will be fixed.
Title: Re: Squelch/Unsquelch problem SmallIcons -> Listview
Post by: Tass on November 20, 2005, 12:54 PM
I think the problem is that it's not getting the flag change because it works find any other time
I squelch Victory which he also has Victory[L]
When I unsquelch him I get:
[2:01:40 PM] Victory has been squelched.
[2:01:40 PM] Victory[L] Flags: 48
[2:01:40 PM] Victory Flags: 32
[2:01:47 PM] Victory[L] has been unsquelched.
[2:01:47 PM] Ops Flags: 2
[2:01:47 PM] Ops has aquired ops.
[2:01:47 PM] Legacy Flags: 2
[2:01:47 PM] Legacy has aquired ops.
[2:01:47 PM] RaGe[L] Flags: 0
[2:01:47 PM] Victim Flags: 0
[2:01:47 PM] Victory[L] Flags: 16
[2:01:47 PM] Victory Flags: 0
[2:01:47 PM] Epic Flags: 0
[2:01:47 PM] Narc Flags: 0
[2:01:47 PM] Malcolm[L] Flags: 0
[2:01:47 PM] tassinator Flags: 0
[2:01:47 PM] Doom[L] Flags: 0

It dosen't send new flags for Victory[L] when I unsquelch him, but wheN I leave channel and rejoin he's not squelched
Title: Re: Squelch/Unsquelch problem SmallIcons -> Listview
Post by: shadypalm88 on November 20, 2005, 01:06 PM
Quote from: Tass on November 20, 2005, 12:54 PM
It dosen't send new flags for Victory[L] when I unsquelch him, but wheN I leave channel and rejoin he's not squelched
Battle.net does send you the flag update for all users in your channel that are being unsquelched.  If I squelch Victory and unsquelch him both Victory and Victory[L] return to normal.
Title: Re: Squelch/Unsquelch problem SmallIcons -> Listview
Post by: Tass on November 20, 2005, 01:12 PM
Ok, so where can I get some info on the Flags recieved in OnFlags?

I only don't get the change when the user gets the flags of 16 and that's usually when the user is using a ping plug. On sb it says it's UDP Plug [16], so how do I fix this??
Title: Re: Squelch/Unsquelch problem SmallIcons -> Listview
Post by: shadypalm88 on November 20, 2005, 01:30 PM
Quote from: Tass on November 20, 2005, 01:12 PM
Ok, so where can I get some info on the Flags recieved in OnFlags?
BnetDocs - Battle.net Flags Reference (http://bnetdocs.valhallalegends.com/content.php?Section=d&id=1)
Title: Re: Squelch/Unsquelch problem SmallIcons -> Listview
Post by: Tass on November 20, 2005, 01:38 PM
So do you do the same thing for flags of 0 and flags of 16?
Title: Re: Squelch/Unsquelch problem SmallIcons -> Listview
Post by: Kp on November 20, 2005, 01:42 PM
Quote from: Tass on November 20, 2005, 01:38 PMSo do you do the same thing for flags of 0 and flags of 16?

No, I report a plug if someone has flags of 0x10 and do not report a plug for flags of 0.  You do realize that flags are a bitmask, right?
Title: Re: Squelch/Unsquelch problem SmallIcons -> Listview
Post by: Joe[x86] on November 20, 2005, 01:42 PM
Use the bitwise AND operator. Asume that flags are stored in m_lFlags.

If (m_lFlags And 32) Then
  'Squelched
Else
  'Not Squelched
End If
Title: Re: Squelch/Unsquelch problem SmallIcons -> Listview
Post by: Tass on November 20, 2005, 01:47 PM
Thanks for all your help I fixed it.