Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: CatVir on August 22, 2004, 10:52 AM

Title: An idea for banning code
Post by: CatVir on August 22, 2004, 10:52 AM
I've got an idea how it could be done instead of making timer:
for each user create record:

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

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
Title: Re:An idea for banning code
Post by: DeTaiLs on August 22, 2004, 11:02 AM
please use code tags when pasting a code
Title: Re:An idea for banning code
Post by: titan0060 on August 23, 2004, 09:01 PM
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.