• Welcome to Valhalla Legends Archive.
 

VB6: help with buggy antiflood

Started by Tontow, May 03, 2004, 03:31 AM

Previous topic - Next topic

Tontow

i just cant seem to get it right, maby someone here could help ( I've been working on this for a few days now...)

frist time its called it works perfictly, but the second time its called it says the item twice, 3ed time it says it 3 times, 4th it says it 4 times, etc...

Private Sub nofloodtime_Timer()
Dim spaces As Integer
Dim trans As String
trans = que(1)
If que(1) <> "" Then frmui.FormHost.queuetextnolblogo trans
spaces = 0

For spaces = 1 To quenum
If que(spaces) <> "" Then que(spaces) = que(spaces + 1)
que(spaces + 1) = ""
Next spaces

spaces = 0

For spaces = 1 To quenum
If que(spaces) = "" Then quenum = quenum - 1
Next spaces
End Sub

Public Sub saythis(rest As String)
quenum = quenum + 1
If que(quenum) = "" Then
   que(quenum) = rest
   End If
End Sub

Grok

Sounds like you're not popping the queue when you say the top item.

Tontow

its part of a plugin for a bot, the thing is, there is no anti flood for the plugings so you have to code one in..
frmui.FormHost.queuetextnolblogo trans is the function call to make it "talk" in the chat room.....

ps: i am trying to get this thing to work but no such luck yet.....