PtokaX forum

Archive => Archived 5.0 boards => Request for scripts => Topic started by: Loading on 25 June, 2005, 18:49:31

Title: Modification
Post by: Loading on 25 June, 2005, 18:49:31
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 ?



best regards

Loading
Title:
Post by: Loading on 25 June, 2005, 18:54:20
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



Title:
Post by: Loading on 26 June, 2005, 03:19:41
hello ppl
can anyone hellp me ? with this script ?


Best regards


Loading
Title:
Post by: Loading on 26 June, 2005, 14:07:20
Please  Please Please

 :D