• Welcome to Valhalla Legends Archive.
 

OP holders not staying on top of listview.

Started by Crypticflare, March 04, 2003, 12:16 PM

Previous topic - Next topic

Grok

#15
Try designating someone, then telling ops to leave channel.  The designated person does not rejoin, they just receive ops.

As people have tried to tell you, ops comes with a flags update.  You do not get ops until after joining the channel, unless you are Blizzard, as Yoni pointed out.

Skywing

#16
QuoteTry designating someone, then telling ops to leave channel.  The designated person does not rejoin, they just receive ops.

As people have tried to tell you, ops comes with a flags update.  You do not get ops until after joining the channel, unless you are Blizzard, as Yoni pointed out.
There is an exception to this.  If an Operator "joins" the channel during a server resync after a server split, they'll come in with Operator flags.

Camel

QuoteThere is an exception to this.  If an Operator "joins" the channel during a server resync after a server split, they'll come in with Operator flags.
just write a function to find the icon based on statstring and flags, and use it for both userjoin and userupdate
that way you'll never have to worry about if it's a problem with a specific one of the packets

ILurker

#18
I recently noticed that after someone with ops joins, bnet sends a flags update, i just am using that to update their icon/subitems

Camel

#19
use the same function to find the icon for both events
in fact, i even use the same function to add users as to modify them in the list, because when a d2 char logs in it'll send a userjoin packet even if that user is already in the channel

           Select Case ID2
                Case 1 'user list
                    frmMain.UL.AddUser UserName, chat, Flags, Ping
                Case 2 'user join
                    frmMain.UL.AddUser UserName, chat, Flags, Ping
                Case 3 'user part
                    frmMain.UL.RemoveUser UserName
Public Sub AddUser(Name As String, StatStr As String, Flags As Long, Ping As Long)
    Dim Acct As String, sName As String
    Acct = AccountOf(Name)
    sName = ShowName(Name)
    
    On Error GoTo AddUser
    With lvUsers.FindItem(Acct, lvwTag) 'Acct) 'attempt to find the user with that account; if it fails, Add them to the listview
        .Text = sName 'Acct
        .SmallIcon = GetIcon(StatStr, Flags)
        .ListSubItems(1).Text = Ping
        .ListSubItems(1).ReportIcon = LagBars(GetLag(Ping, Flags))
        .ListSubItems(2).Text = SortOrder(Flags)
    End With
    Exit Sub

AddUser:
    With lvUsers.ListItems.Add(, , sName)  'Acct)
        .Tag = Acct
        .SmallIcon = GetIcon(StatStr, Flags)
        .ListSubItems.Add , , Ping, LagBars(GetLag(Ping, Flags))
        .ListSubItems.Add , , SortOrder(Flags)
    End With
End Sub

Public Sub RemoveUser(Name As String)
    lvUsers.ListItems.Remove lvUsers.FindItem(AccountOf(Name), lvwTag).Index
End Sub

tA-Kane

Quoteafter someone with ops joins, bnet sends a flags update
Assuming that the only changed flag is the channel operator flag, they did not have ops when they joined.
Macintosh programmer and enthusiast.
Battle.net Bot Programming: http://www.bash.org/?240059
I can write programs. Can you right them?

http://www.clan-mac.com
http://www.eve-online.com