Valhalla Legends Forums Archive | Battle.net Bot Development | I've tried everything i can think of i need help

AuthorMessageTime
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
May 25, 2003, 5:34 AM
______

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
May 25, 2003, 5:44 AM
gosu
this operator thing thanks again newbie! :D
May 25, 2003, 5:49 AM
MrRaza
lol
May 25, 2003, 9:10 PM

Search