PtokaX forum

Archive => Archived 5.0 boards => Request for scripts => Topic started by: Loading on 27 June, 2005, 04:11:18

Title: request, bad login notify to ops
Post by: Loading on 27 June, 2005, 04:11:18
hello ppl
i have a question can you make this script

just to detect who try to enter whinthout the min.slots ,
min. share , min. client ?

and send a pm to masters and netfounders ?

The script is this one:

   -- Unreg Alert v1

    -- By Dessamator



    function Main()

    tImmune ={}

    if io.open("immune.tbl") then dofile("immune.tbl") end

    end



    function OnExit()

    SaveToFile("immune.tbl" , tImmune , "tImmune")

    end



    function SupportsArrival(user, data)

    if not user.bRegistered and not tImmune[user.sIP] then

    SendToOps("botname",user.sName.." with "..user.sIP.." was not registered and tried to login")

    end

    end



    function ChatArrival(user,data)

    data=string.sub(data,1,-2)

    local s,e,cmd = string.find(data,"%b<>%s+(%S+)")

    local _,__,ip = string.find(data,"%b<>%s+%S+%s+(%S+)")

    if cmd =="!immune" then

    tImmune[(ip)] = 1

    user:SendData(frmHub:GetHubBotName(),"Done!, that ip has been immuned")

    return 1

    elseif cmd =="!delimmune" then

    tImmune[(ip)] = nil

    user:SendData(frmHub:GetHubBotName(),"Done!, that ip is no longer immune")

    return 1

    elseif cmd=="!showimmune" then

    local temp="\r\n\t\Immuned IPs:\r\n"..string.rep("??",12).."\r\n"

    for i,v in tImmune do

    temp=temp.."\t•"..i.."\r\n"

    end

    user:SendData(frmHub:GetHubBotName(),temp)

    return 1

    end

    end





    function Serialize(tTable, sTableName, sTab)

    assert(tTable, "tTable equals nil");

    assert(sTableName, "sTableName equals nil");



    assert(type(tTable) == "table", "tTable must be a table!");

    assert(type(sTableName) == "string", "sTableName must be a string!");



    sTab = sTab or "";

    sTmp = ""



    sTmp = sTmp..sTab..sTableName.." = {\n"



    for key, value in tTable do

    local sKey = (type(key) == "string") and string.format("[%q]",key) or string.format("[%d]",key);



    if(type(value) == "table") then

    sTmp = sTmp..Serialize(value, sKey, sTab.."\t");

    else

    local sValue = (type(value) == "string") and string.format("%q",value) or tostring(value);

    sTmp = sTmp..sTab.."\t"..sKey.." = "..sValue

    end



    sTmp = sTmp..",\n"

    end



    sTmp = sTmp..sTab.."}"

    return sTmp

    end



    function SaveToFile(file , table , tablename)

    local handle = io.open(file,"w+")

    handle:write(Serialize(table, tablename))

    handle:flush()

    handle:close()

    end


can anyone help me ?

best regards

Loading
Title:
Post by: Loading on 27 June, 2005, 21:18:51
can anyone give a help here ?

please ?


best regards
Title:
Post by: Loading on 01 July, 2005, 18:57:13
can anyone make this script for me ?

or chage this one please ?



best regards


Loading