For some reason The flags don't update properlly. Instead of showing the correct icon when the flags update it simplly shows a blank space.
Private Sub CSB_FlagsUpdate(ByVal Username As String, ByVal Flags As Long, ByVal Message As String, ByVal Ping As Long, SimulatedEvent As Boolean)
Dim Icon As Integer
Icon = GetIconCode(Product, Flags)
lvChannel.ListItems.Remove lvChannel.FindItem(Username).Index
If Icon = ICON_OPER Then
lvChannel.ListItems.Add 1, , Username, , Icon
Else
With lvChannel
.ListItems.Add , , Username, , Icon
.ListItems(.ListItems.Count).ListSubItems.Add , , Ping
End With
End If
End Sub
ElseIf BNFLAGS_OP And Flags = BNFLAGS_OP Then
GetIconCode = ICON_OPER
Exit Function
Public Const BNFLAGS_OP = &H2
It does the same with squelching. However it works fine if I join a channel with ops already in the channel.
Would it be possible for you to not use CSB and see if you hit the same problem? ... Other than that, the code seems totally fine, might be a CSB related problem of it maybe raising FlagsUpdate before the JoinUpdate, did you try looking into that?