PtokaX forum

Archive => Archived 5.0 boards => Request for scripts => Topic started by: Zigurds on 05 March, 2005, 09:56:09

Title: Please convert little script Antireklama
Post by: Zigurds on 05 March, 2005, 09:56:09
---------------------------------------------------------------------------------------------------------------------
--   ANTIREKLAMBOTS
---------------------------------------------------------------------------------------------------------------------

botname = "-ANTIBOTS-"
key = {
        [".*[hH][%c%p%s]*[uU][%c%p%s]*[bB][%c%p%s]*[sS][%c%p%s]*[oO][%c%p%s]*[rR][%c%p%s]*[gG].*"]="HubReklama!!!",
        [".*[mM][%c%p%s]*[aA][%c%p%s]*[xX][%c%p%s]*[xX][%c%p%s]*[nN][%c%p%s]*[oO][%c%p%s]*[lL][%c%p%s]*[vV].*"]="maxxfax!!!",
        [".*2[%c%p%s]*1[%c%p%s]*3[%c%p%s]*1[%c%p%s]*8[%c%p%s]*2[%c%p%s]*2[%c%p%s]*0[%c%p%s]*6[%c%p%s]*1[%c%p%s]*6[%c%p%s]*5.*"]="hubIP Reklama"
}

function Main()
--    frmHub:RegBot(botname)
end

function DataArrival(user,data)
        for sp,res in key do
                if (string.find(data, sp) == nil) then
                else
                        SendToOps(botname, "*** User "..user.sName.." kicked. Reason: "..res.." *** Full text: "..data)
                        user:SendPM(botname, "*** You are kicked because of:"..res)
                        user:Disconnect()
                        return 1
                end
        end
        return 0
end

---------------------------------------------
owner for Latvian hub Alfa
Title:
Post by: Zigurds on 06 March, 2005, 10:16:53
thanks :) Here any one version


---------------------------------------------------------------------------------------------------------------------
--   ANTIBOTS
--Latvian hub Alfa
---------------------------------------------------------------------------------------------------------------------
botname = "-ANTIBOTS-"
key = {
[".*[nN][%c%p%s]*[oO][%c%p%s]*[iI][%c%p%s]*[pP][%c%p%s]*[oO][%c%p%s]*[rR][%c%p%s]*[gG].*"]="Tiek reklameets hubs!!!",
[%c%p%s]*[uU][%c%p%s]*[bB][%c%p%s]*[gG][%c%p%s]*[oO][%c%p%s]*[oO][%c%p%s]*[dD][%c%p%s]*[lL][%c%p%s]*[vV].*"]="Tiek reklameets hubs!!!"
}

function Main()
--    frmHub:RegBot(botname)
end

function adv(curUser,data)
        if not curUser.bOperator then
      for sp,res in key do
                   if (string.find(data, sp) ~= nil) then
                           SendToOps(botname, "*** User "..curUser.sName.." kicked. Reason: "..res.." *** Full text: "..data)
                           curUser:SendPM(botname, "*** You are kicked because of:"..res)
                           curUser:TimeBan(28800)   --time in minutes
            curUser:Disconnect()
                           return 0
                   end
           end
           return data
   end
end

function ChatArrival(curUser, data)
   return adv(curUser,data)
end

function ToArrival(curUser, data)
   return adv(curUser,data)
end

function MyINFOArrival(curUser, data)
   return adv(curUser,data)
end