Modified Lucifer Script
 

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

Modified Lucifer Script

Started by Cid, 18 February, 2004, 17:03:55

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Cid

--              Modified Lucifer Script for Hubs with regged Users
--              Here its features:
--              Script blocks this types of advertisement: A) example.no-ip.com
--                   B) e x a m p l e . n o - i p . c o m
--                   C)example.
--                       no-
--                       ip.
--                       com
--                   D)e
--                                   x
--                                   a
--                                   m
--                                   p
--                                   l
--                                   e
--                                   .
--                                   n
--                                   o
--                                   -                     
--                                   i
--                                   p
--                                   .
--                                   c
--                                   o
--                                   m
--            
--             1)added a "smart" list of addresses (be careful when adding URLs or IPs, if you put "http" in validstrings it will allow ALL URLs same if you add an empty string "",
--                so if you have to add something there use a very specific word of the URL like "imdb" if you want to allow the Internet Movie Database)
--   2)Profiles Regged and above can post without restrictions
--   3)When advertising: OPs get message in Mainchat from Bot showing the Ad
--                 For Op's eyes only! Nick is advertising this in MainChat: Advertisement
--                 For Op's eyes only! Nick is advertising this in PM: Advertisement
--             4)Prevented very splitted addresses (with more tabAdvert lines)
--
--                



BotName = "YourBotName"

advtrigs = {"dns2go.","mine.nu","no-ip.","dynip.","staticip.","gotdns.","dyndns.","d2g.","myip.","mine.org",
                   "kick-ass.","homeip.","bounceme.","http://","www.","ftp://","irc."}

validtrigs = {"imdb","-----", "------"}

tabAdvert = {}

function Main()
   frmHub:RegBot(BotName)
end

function DataArrival(user, data)
   if not user.bOperator then
      if strsub(data, 1, 1) == "<" then
         local _, _, msg = strfind(data, "^%b<>%s+(.*)|")
         if Verify(user.sName, msg) then
            if user.iProfile == 3 or user.iProfile == 2 then
                                                                return msg
                                                                else
                  SendToOps(BotName,"For Op's eyes only! "..user.sName.." is advertising this in MainChat: "..msg)
                   return 1

                                                                end
         end

         spam=0
         if( strfind( strlower(data), "no",1,1) ) and ( strfind( strlower(data), "ip.",1,1) ) then
            if ( strfind( strlower(data), "com",1,1) ) or ( strfind( strlower(data), "org",1,1) ) or ( strfind( strlower(data), "info",1,1) ) then
         spam=spam+1; end; end;

         if( strfind( strlower(data), "dns",1,1) ) and ( strfind( strlower(data), "2",1,1) ) and ( strfind( strlower(data), "go",1,1) ) then
         spam=spam+1; end

         if( strfind( strlower(data), "dy",1,1) ) and ( strfind( strlower(data), "nu",1,1) ) then
            if( strfind( strlower(data), ".net",1,1) ) or ( strfind( strlower(data), ".com",1,1) ) then
         spam=spam+1;end; end

         if( strfind( strlower(data), "d n s a",1,1) ) or ( strfind( strlower(data), "d n s .",1,1) ) or ( strfind( strlower(data), "d n s 2",1,1) ) or ( strfind( strlower(data), "o d s .",1,1) ) or ( strfind( strlower(data), "d y n",1,1) ) then
         spam=spam+1;end
   
         if spam>0 then
               SendToOps(BotName,"For Op's eyes only! "..user.sName.." is advertising this in MainChat: "..msg)
         end

      elseif strsub(data, 1, 4) == "$To:" then
         local _, _, to, from, msg = strfind(data, "^%$To:%s+(%S+)%s+From:%s+(%S+)%s-%$%b<>%s+(.*)|")
         local nick = GetItemByName(to)
         if not nick.bOperator then
            local userdata = to.." "..from
            if Verify(userdata, msg) then
                           if user.iProfile == 3 or user.iProfile == 2 then
                                                                               return msg
                                                                               else
                                SendToOps(BotName,"For Op's eyes only! "..user.sName.." is advertising this in PM: "..msg)
                                return 1
         
                                                                               end
                          end

            spam=0
            if( strfind( strlower(data), "no",1,1) ) and ( strfind( strlower(data), "ip.",1,1) ) then
               if ( strfind( strlower(data), "com",1,1) ) or ( strfind( strlower(data), "org",1,1) ) or ( strfind( strlower(data), "info",1,1) ) then
            spam=spam+1; end; end;

            if( strfind( strlower(data), "dns",1,1) ) and ( strfind( strlower(data), "2",1,1) ) and ( strfind( strlower(data), "go",1,1) ) then
            spam=spam+1; end
   
            if( strfind( strlower(data), "dy",1,1) ) and ( strfind( strlower(data), "nu",1,1) ) then
               if( strfind( strlower(data), ".net",1,1) ) or ( strfind( strlower(data), ".com",1,1) ) then
            spam=spam+1;end; end
   
            if( strfind( strlower(data), "d n s a",1,1) ) or ( strfind( strlower(data), "d n s .",1,1) ) or ( strfind( strlower(data), "d n s 2",1,1) ) or ( strfind( strlower(data), "o d s .",1,1) ) or ( strfind( strlower(data), "d y n",1,1) ) then
            spam=spam+1;end
      
            if spam>0 then
                  SendToOps(BotName,"For Op's eyes only! "..user.sName.." is advertising this in PM: "..msg)
            end
         end
      end
   end
end

function Verify(userdata, msg)
   if not msg then return end
   tmp =""
   gsub(strlower(msg), "([a-z0-9.:%-])", function(x) tmp = tmp..x end)
   if not tabAdvert[userdata] then
      tabAdvert[userdata] = { iClock = clock(), l1 = "", l2 = "", l3 = "", l4= "", l5= "",l6= "",l7= "",l8= "",l9 = tmp}
   else
      tabAdvert[userdata].iClock = clock()
      tabAdvert[userdata].l1 = tabAdvert[userdata].l2
      tabAdvert[userdata].l2 = tabAdvert[userdata].l3
      tabAdvert[userdata].l3 = tabAdvert[userdata].l4
      tabAdvert[userdata].l4 = tabAdvert[userdata].l5
      tabAdvert[userdata].l5 = tabAdvert[userdata].l6
      tabAdvert[userdata].l6 = tabAdvert[userdata].l7
      tabAdvert[userdata].l7 = tabAdvert[userdata].l8
      tabAdvert[userdata].l8 = tabAdvert[userdata].l9
      tabAdvert[userdata].l9 = tmp
   end
   local Lines = tabAdvert[userdata].l1..tabAdvert[userdata].l2..tabAdvert[userdata].l3..tabAdvert[userdata].l4..tabAdvert[userdata].l5..tabAdvert[userdata].l6..tabAdvert[userdata].l7..tabAdvert[userdata].l8..tabAdvert[userdata].l9
   for key, value in advtrigs do
      if (strfind(Lines, strlower(value), 1, 1)) then
         for key2, value2 in validtrigs do
            if (strfind(Lines, strlower(value2), 1, 1)) then
               return nil
            end
         end
         return 1
      end
   end
end

DEEP-GOA

hi,

wanna test asap

http://deep-goa.no-ip.org
Put any term or title on me you want. What I am is what I do. I make things.

DEEP-GOA

i have this error:

Syntax error: attempt to index local `nick' (a nil value)
stack traceback:
   1:  function `DataArrival' at line 88 [file `C:..\scripts\Lucifer.lua']

http://deep-goa.no-ip.org
Put any term or title on me you want. What I am is what I do. I make things.

kbeh273300

well i tested it i didnt get any errors but it let me send the addy in pm but it blocked it in the main
-=United Kings network=-
Network Webpage?
Hub address: houseofkings.no-ip.org:420
hub webpage
hub forum

Cid

#4
works for me when you change "http://" --> "http"
in the advtrigs list.
oh. and when you send it in PM...it looks for the sender like he sent the PM. if the bot sends a message to mainchat that there was a PM advertizement then it was blocked. and all users who have a reg profile can send what they want.

SMF spam blocked by CleanTalk