Advanced BadFile Active Search

Destination Script Center
Verfügbare Informationen zu "Advanced BadFile Active Search"

  • Qualität des Beitrags: 0 Sterne
  • Beteiligte Poster: darkevil
  • Forum: Destination Script Center
  • Forenbeschreibung: Ptokax Scripts and many more
  • aus dem Unterforum: Lua 5.1.1 Scripts
  • Antworten: 1
  • Forum gestartet am: Freitag 13.04.2007
  • Sprache: deutsch
  • Link zum Originaltopic: Advanced BadFile Active Search
  • Letzte Antwort: vor 15 Jahren, 11 Monaten, 15 Tagen, 15 Stunden, 3 Minuten
  • Alle Beiträge und Antworten zu "Advanced BadFile Active Search"

    Re: Advanced BadFile Active Search

    darkevil - 13.04.2007, 00:38

    Advanced BadFile Active Search
    --[[

    ---------------------------------------------------------------------------
    Advanced BadFile Active Search // Stripped from Thor 6

    By: NightLitch 2005-03-04

    Changelog:

    Changed: Quick update to LUA 5.1 by jiten (4/15/2006);
    Changed: Searches are case insensitive (4/18/2006).
    Changed: string.find to a plain search - bastya (4/19/2006)'
    Modified: UDPSRArrival's string.find (4/29/2006)
    Moving: More BadFiLes in the List (1/12/2007) by D@rk-Evil
    ---------------------------------------------------------------------------

    ]]--

    tBadFiles = {
    {".dctmp" , "NO sharing of incomplete downloads"},
    {"dctmp" , "NO sharing of incomplete downloads"},
    {"dctmp.antifrag" , "NO sharing of incomplete downloads"},
    {"antifrag" , "NO sharing of incomplete downloads"},
    {".temp.mp3" , "NO sharing of incomplete downloads"},
    {"_INCOMPLETE_" , "NO sharing of incomplete downloads"},
    {"incomplete" , "NO sharing of incomplete downloads"},
    {"download123456789.dat" , "NO sharing of incomplete downloads"},
    {"r@ygold" , "NO sharing of sick porn here"},
    {"part.met" , "NO sharing of incomplete downloads"},
    {".getright" , "NO sharing of incomplete downloads"},
    {"preteen" , "NO sharing of preteen / underage porn"},
    {"kiddy porn" , "NO sharing of kiddy / underage porn"},
    {"underage" , "NO sharing of kiddy / underage porn"},
    {"Program Files" , "NO sharing of installed / packed programs or games"},
    {"virscan .dat" , "NO sharing of installed / packed programs or games"},
    {"Netlimiter" , "NO sharing of installed / packed programs or games"},
    {"email" , "NO sharing of Email Files"},
    {"torrent" , "NO sharing of Torrent Files"},
    {"esel" , "NO sharing of Emule Files"},
    }
    ---------------------------------------------------------------------------
    --// Don't Edit below this point if you don't now what you are doing
    ---------------------------------------------------------------------------

    tTimer = {}

    Main = function()
    RegTimer(SearchForBadFiles, 20*1000, "ActiveBadFileSearch") -- Active Search Each 20 Sec
    SetTimer(1000); StartTimer()
    end

    OnTimer = function()
    for i in ipairs(tTimer) do
    tTimer[i][3] = tTimer[i][3] + 1
    if tTimer[i][3] > tTimer[i][2] then
    tTimer[i][3] = 1; tTimer[i][1]()
    end
    end
    end

    UDPSRArrival = function(sUser,sData)
    local _,_,From,Path,FileSize,FreeSlots,TotalSlots = string.find(sData, "^%$SR%s+(%S+)%s+(.*)(%d+)%s+(%d+)%/(%d+)")
    if tCall["BadFileSearch"] then pcall(tCall["BadFileSearch"],sUser,Path,FileSize) end
    end

    tCall = {
    BadFileSearch = function(sUser,Path,FileSize)
    if not sUser.bOperator then
    local FileFound, FileReason = BadFiles(string.lower(Path))
    if FileFound then
    sUser:SendData(frmHub:GetHubBotName(), "*** You have been Banned for "..FileReason..". "..Path.." "..Units(FileSize))
    SendToOps(frmHub:GetHubBotName(), "*** User "..sUser.sName.." Has Been Banned For "..FileReason..". "..Path.." "..Units(FileSize))
    sUser:Ban()
    end
    end
    end
    }

    RegTimer = function(Function,Interval,str)
    local tmpTrig = Interval / 1000
    table.insert(tTimer,{Function,tmpTrig,1,str})
    end

    Units = function(intSize)
    if tonumber(intSize) ~= 0 then
    local tUnits = { "Bytes", "KB", "MB", "GB", "TB" }
    intSize = tonumber(intSize); local sUnits;
    for i in ipairs(tUnits) do
    if(intSize < 1024) then sUnits = tUnits[i]; break; else intSize = intSize / 1024; end
    end
    return string.format("%0.1f %s",intSize, sUnits);
    else
    return "0 Bytes"
    end
    end

    BadFiles = function(PathStr)
    for i in ipairs(tBadFiles) do
    if string.find(PathStr, string.lower(tBadFiles[i][1]), 1, true) then
    return 1,tBadFiles[i][2]
    end
    end
    return nil, "Other Files"
    end

    SearchForBadFiles = function()
    if t == nil then
    t =1
    if tBadFiles[t] then
    SendToAll("$Search "..frmHub:GetHubIp()..":"..frmHub:GetHubUdpPort().." F?F?0?1?"..tBadFiles[t][1])
    end
    elseif t > table.getn(tBadFiles) then
    t = nil
    else
    t = t+1
    if tBadFiles[t] then
    SendToAll("$Search "..frmHub:GetHubIp()..":"..frmHub:GetHubUdpPort().." F?F?0?1?"..tBadFiles[t][1])
    else
    t = 0
    end
    end
    end



    Mit folgendem Code, können Sie den Beitrag ganz bequem auf ihrer Homepage verlinken



    Weitere Beiträge aus dem Forum Destination Script Center

    0.3.6.0 RC2 - gepostet von darkevil am Montag 23.04.2007



    Ähnliche Beiträge wie "Advanced BadFile Active Search"

    [DECK] «{Advanced Format}» Water with HighSpeed - Whisky Jupes (Sonntag 31.10.2004)
    Ghost Recon - Advanced Warfighter - Buddl (Dienstag 25.04.2006)
    ghost recon advanced warfighter - koelner (Montag 06.08.2007)
    Active Desk - serkan (Donnerstag 24.03.2005)
    Ghost Recon Advanced Warfighter 2 - GDA II MIKE II (Freitag 23.02.2007)
    ghost recon advanced warfighter - koelner (Montag 06.08.2007)
    Regeln "Advanced Showroom" - dirrty_O (Sonntag 21.05.2006)
    List für das Advanced Format (mit verbotenen Karten) - Whisky Jupes (Samstag 02.10.2004)
    Ghost Recon Advanced Warfighter - Uggi (Mittwoch 26.04.2006)
    active - ChrisWee (Sonntag 10.09.2006)