Valhalla Legends Archive

Programming => General Programming => Visual Basic Programming => Topic started by: Yegg on October 21, 2004, 05:48 PM

Title: User rejoin error
Post by: Yegg on October 21, 2004, 05:48 PM
Ok heres the problem, whenever a user gains ops, my bot shows that  username in the channel 2 times. under inchannel users i have:

    username = Replace(username, "*", "")
    lvChannel.Refresh
    lvChannel.AddItem username

for userjoin i have:

username = Replace(username, "*", "")
lvChannel.Refresh
lvChannel.AddItem username

for userleave i have:

username = Replace(username, "*", "")
AddChat username & " has left the channel." & vbNewLine, vbGreen
lvChannel.Refresh
lvChannel.RemoveItem username

some1 tel me wuts wrong with this code(im using a listbox, i just used lv instead of lst)

Title: Re: User rejoin error
Post by: CrAz3D on October 21, 2004, 06:40 PM
When a user gains the operator flags they aren't leaving, their flags are simply being updated.
Title: Re: User rejoin error
Post by: Yegg on October 21, 2004, 06:51 PM
omg, this stil isn't making ne sense at all. heres wut i did for userjoin:

If flags = 2 Or flags = 18 Then
Exit Sub
Else
lvChannel.AddItem username
End If

and for onleave i have:

If flags = 2 Or flags = 18 Then
Exit Sub
Else
lvChannel.RemoveItem username
End If
Title: Re: User rejoin error
Post by: Dyndrilliac on October 21, 2004, 06:52 PM
Your onleave and onjoin events make no difference, it's a flag update.

The event for 0x0F is:

0x09 - EID_USERFLAGS

inchannel/onjoin/onleave are 0x01/0x02/0x03.