• Welcome to Valhalla Legends Archive.
 

I've tried everything i can think of i need help

Started by gosu, May 25, 2003, 12:34 AM

Previous topic - Next topic

gosu

I've spent days trying to fix this problem, i cant seem to figure out why it wont keep those who are operators to the top of the list when they join the channel.



Private Sub Event_User(strUser As String, StrFlag, strText, Ping)

Dim lFlags As Long
Dim lPing As Long
Dim Icon As Integer
Icon = GetIconCode(strText, StrFlag)

If Icon = GAVEL Then
   frmMain.Users.ListItems.Add 1, , strUser, , Icon
   frmMain.Users.ListItems(frmMain.Users.ListItems.Count).ListSubItems.Add , , strAccount, GetLagIcon(lPing, lFlags)
   frmMain.Users.ListItems(frmMain.Users.ListItems.Count).ListSubItems.Add , , lPing
Else
   If strUser = "gosu" Then
   frmMain.Users.ListItems.Add , , strUser, , gosu
   frmMain.txtChannelName.text = BNet.CurrentChan & " [" & frmMain.Users.ListItems.Count & "]"
   frmMain.Users.ListItems(frmMain.Users.ListItems.Count).ListSubItems.Add , , strAccount, GetLagIcon(lPing, lFlags)
   frmMain.Users.ListItems(frmMain.Users.ListItems.Count).ListSubItems.Add , , lPing
   ElseIf strUser = "g0su" Then
   frmMain.Users.ListItems.Add , , strUser, , gosu
   frmMain.txtChannelName.text = BNet.CurrentChan & " [" & frmMain.Users.ListItems.Count & "]"
   frmMain.Users.ListItems(frmMain.Users.ListItems.Count).ListSubItems.Add , , strAccount, GetLagIcon(lPing, lFlags)
   frmMain.Users.ListItems(frmMain.Users.ListItems.Count).ListSubItems.Add , , lPing
   Else
   frmMain.Users.ListItems.Add , , strUser, , Icon
   frmMain.txtChannelName.text = BNet.CurrentChan & " [" & frmMain.Users.ListItems.Count & "]"
   frmMain.Users.ForeColor = vbWhite
   frmMain.Users.ListItems(frmMain.Users.ListItems.Count).ListSubItems.Add , , strAccount, GetLagIcon(lPing, lFlags)
   frmMain.Users.ListItems(frmMain.Users.ListItems.Count).ListSubItems.Add , , lPing
   End If
End If


Select Case StrReverse(Mid(strText, 1, 4))
   Case "JSTR"

   Case "SSHR"

   Case "DSHR"

   Case "DRTL"

   Case "STAR"

   Case "SEXP"

   Case "W2BN"

   Case "D2XP"

   Case "D2DV"

   Case "WAR3"

   Case "CHAT"

End Select
LastUser = strAccount
End Sub

______


This is my way of doing the User joins/flags update. it works fine for me.

With form1.lstchannel.ListItems.Add(, , user, , GetIconCode(Message, Flags))
     .ListSubItems.Add , , , GetLagIcon(Ping, Flags)
  End With


 

If Flags = &H2 Then

form1.lstchannel.ListItems.Remove form1.lstchannel.FindItem(user).Index
 
 
  With form1.lstchannel.ListItems.Add(1)
 
  .text = user
  .SmallIcon = 2 'the ops icon
  .ListSubItems.Add , , , GetLagIcon(Ping, Flags)
  End With
End If

gosu


MrRaza