PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: Zigurds on 23 April, 2004, 16:05:12

Title: Kill Ptokax 0.330 v15.25
Post by: Zigurds on 23 April, 2004, 16:05:12
Tested version 15.18, 15.24 and 15.25

Kill Ptokax, when long text in $MyINFO  and when  flood

Write Antikill

--- Written by oollee

Bot = ANTI-KILL

l = {}
r = {}

function Main()
  frmHub:EnableFullData(1)
end

function UserDisconnected(user)
  if l[user.sName] then
    l[user.sName] = nil
  end
  if r[user.sName] then
    r[user.sName] = nil
  end
end

function DataArrival(user,data)
  if strsub(data, 1, 7) == "$MyINFO" then
    if(strlen(data)>130) then
      user:SendData("*** Your $MyINFO tags is to long!")
      user:Disconnect()
    end
    local sec = Jmn()

    if not l[user.sName] then
      l[user.sName] = sec;
    end

    if not r[user.sName] then
      r[user.sName] = 0;
    end

    local u = sec - l[user.sName]
    r[user.sName] = r[user.sName] + 1

    if u < 2 then
      if r[user.sName] > 4 then
        l[user.sName] = nil
        r[user.sName] = nil
        user:Disconnect()
        return 1;
      end
    else
      l[user.sName] = sec
      r[user.sName] = 0
      return 0;
    end
  end
end

function Jmn()
  D = tonumber(date("%d"))
  H = tonumber(date("%H"))
  min = tonumber(date("%M"))
  sec = tonumber(date("%S"))
  Y = tonumber(date("%Y"))
  M = tonumber(date("%m"))
    if M <= 2 then
      M = M + 12
      Y=Y-1
    end
        mn = 1440*(floor(Y*365,25) + floor((M+1)*30,6) + D -428) + H*60 + min + sec
        return mn
end
---------------------


Sorry my bad languages
-------------------------------------
owner for Latvian hub ALFA
Title:
Post by: MrZ on 24 April, 2004, 17:49:07
Hia

and could u pls explain a bit moore :))

what is it and what does it...sorry if stupid quest
Title:
Post by: Zigurds on 24 April, 2004, 19:01:30
bad my English, sorry

hub kill, from it  long text  to

[16:06] (81.198.128.209) > $Key 0?F?????????r 3??aP#"QA???/%DCN000%/E ?B??/%DCN096%/???&|
[16:06] (81.198.128.209) > $ValidateNick AntonKiller|
[16:06] AntonKiller (81.198.128.209) > $Version 1.0091|
[16:06] AntonKiller (81.198.128.209) > $MyINFO $ALL AntonKiller <++ V:0.306,M:A,H:1/0/0,S:10>$ $DSL-$$172456789422$|
[16:06] AntonKiller (81.198.128.209) > $MyINFO $ALL AntonKiller 0                     - ABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABCABC<++V:0.306,M:A,H:1/0/0,S:10>$ $DSL-$$38456789422$|
[16:06] x User removed: AntonKiller (Socket 316)

Sorry my bad languages
-------------------------------------
owner for Latvian hub ALFA
Title:
Post by: MrZ on 24 April, 2004, 21:05:49
:)) no problem... tnx
Title:
Post by: [G-T-E]Gate? on 24 April, 2004, 23:35:45
any chance on a better explaination on that Anti Kill
Title:
Post by: plop on 25 April, 2004, 02:10:34
QuoteOriginally posted by [G-T-E]Gate?
any chance on a better explaination on that Anti Kill
the myinfo string is 2 long which ptokax cuts 2 size but it can crash ptokax.
fixed in the latest beta's.

plop