Valhalla Legends Forums Archive | Battle.net Bot Development | An idea for banning code

AuthorMessageTime
CatVir
I've got an idea how it could be done instead of making timer:
for each user create record:
[code]
type BanInfo
Account as string
Activity as integer
Timer as long
end type

'lets say account is set already
sub UserJoinsChannel(User as BanInfo)
User.Activity = 0
User.Timer = GetTickCount()
end sub

sub UserCountBan(User as BanInfo, Message as String)
Temp as long
Temp = GetTickCount()
if Len(Message) / (Temp - User.Timer) > BAN_ACTIVITY_MAX / 1000 then
BanUser (User.Account)
end if
User.Timer = GetTickCount()
end sub
[/code]
BAN_ACTIVITY_MAX is in allowed bytes per second!
think about it! hope it helps, but i don't know if anybody did post it yet... anyway i found this on my own ;D
EDIT:sorry for no code tags :P
August 22, 2004, 3:52 PM
Twix
please use code tags when pasting a code
August 22, 2004, 4:02 PM
titan0060
sounds like a good idea for banning 5 or 6 users, but for some of these newer bots that load like a thousand bots, thats where i think your gonna be in trouble.
August 24, 2004, 2:01 AM

Search