• Welcome to Valhalla Legends Archive.
 

User rejoin error

Started by Yegg, October 21, 2004, 05:48 PM

Previous topic - Next topic

Yegg

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)


CrAz3D

When a user gains the operator flags they aren't leaving, their flags are simply being updated.
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...

Yegg

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

Dyndrilliac

#3
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.
Quote from: Edsger W. DijkstraIt is practically impossible to teach good programming to students that have had a prior exposure to BASIC; as potential programmers they are mentally mutilated beyond hope of regeneration.