Please convert little script Antireklama
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

Please convert little script Antireklama

Started by Zigurds, 05 March, 2005, 09:56:09

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Zigurds

---------------------------------------------------------------------------------------------------------------------
--   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

Zigurds

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

SMF spam blocked by CleanTalk