[REQ] Convert into Lua 5
 

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

[REQ] Convert into Lua 5

Started by Krysalis, 21 June, 2005, 19:31:45

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Krysalis

--------------------------------------------------------------------------------
	
	
--
Lucifer 6.6.6-- updated version

--This is a Powerful AntiAdvertising Script
--Powered by Demone.Astaroth and OpiumVolage

--HistoryBase='multiline antiadvertise' by OpiumVolage (your tables simplify the work I did until that moment). Here its features:
--             
1)Script can block this types of advertisementA) <userexample.no-ip.com
--
	
	
	
	
	
       
B) <usere x a m p l e n o i p c o m
--
	
	
	
	
	
       
C)<user>example.
--
	
	
	
	
	
          <
user>no-
--
	
	
	
	
	
          <
user>ip.
--
	
	
	
	
	
          <
user>com
--
	
	
	
	
	
       
D)<user>e
--
	
	
	
	
	
          
x
--
	
	
	
	
	
          
a
--
	
	
	
	
	
          
m
--
	
	
	
	
	
          
p
--
	
	
	
	
	
          
l
--
	
	
	
	
	
          
e
--
	
	
	
	
	
          .
--
	
	
	
	
	
          
n
--
	
	
	
	
	
          
o
--
	
	
	
	
	
          -
	
	
	
	
	
      
--
	
	
	
	
	
          
i
--
	
	
	
	
	
          
p
--
	
	
	
	
	
          .
--
	
	
	
	
	
          
c
--
	
	
	
	
	
          
o
--
	
	
	
	
	
          
m
--             2)You can insert valid addresses (like yoursin trigsso bot won't kick you
--             3)Users conversating with ops don'
t get kicked
--             4)Why the TimerIt cleans memory.

--             
Demone.Astaroth addons1)added an huge list of addresses
--
	
	
   
	
      
2)When advertisinguser advised on Pm before disconnectionBot sends to all in main chat the kicking message (without IP); 
--
	
                                         
advertise-infos send to Op-chat directly without troubling any Op with PmsInfos contain user's IP, user To(if PM) and last message
--
	
	
	
         Just replace INSERT.HERE.YOUR.OP-CHAT.NAME fields with yours.
--
	
     
	
                      3)inserted Disconnect and TimeBan (15 minutes) instead of gagging user
--
	
	
   
	
      4)Prevented very splitted addresses (with more tabAdvert lines)
--                                
	
      5)added Control-addresses: user isn'
t kicked for these addresses but Ops are informed in any case.
--                                                  
	
                                 
this is useful for friend-hubs addresses, if u also want to control them
-- 
	
                                      
6)added ControlUser status: if u're scary about your vips advertising their hubs and stealing you user, 
--                   
	
                                                                  you can'
t insert the tag [VIP] or anything else in the specific spacethey will not
--                                     
	
                                                  
get kicked for any addressesbut in case of typing a Control-addressOps will be
--                                                        
	
                                  
informed.
--
	
                                      
7)Fixed some bug (Thanks Opium)
--
	
	
	
      
8)Added a new string-pieces find way to catch advertises

BotName 
"?Lucifer?" 

advtrigs = {"dns2go","myftpsite","servebeer","mine.nu","ip.com","dynip","depecheconnect.com","zapto.org",
	
"staticip","serveftp","ipactive","ip.org","no-ip","servegame","gotdns.org","ip.net","ip.co.uk",
	
"ath.cx","dyndns","68.67.18.75","clanpimp","idlegames","sytes","unusualperson.com",
	
"24.184.64.48","uni.cc","151.198.149.60","homeunix","24.209.232.97","ciscofreak.com",
	
"deftonzs.com","24.187.50.121","flamenap","xs4all","serveftp","point2this.com","ip.info",
	
"myftp","d2g","151.198.149.60","24.184.64.48","orgdns","myip.org","stufftoread.com",
	
"ip.biz","dynu.com","mine.org","kick-ass.net","darkdata.net","ipme.net","udgnet.com","homeip.net",
	
"e-net.lv","newgnr.com","bst.net","bsd.net","ods.org","x-host","bounceme.net","myvnc.com",
	
"kyed.com","lir.dk","finx.org","sheckie.net","vizvaz.net","snygging.net","kicks-ass.com","nerdcamp.net",
	
"cicileu.","3utilities.com","myftp.biz","redirectme.net","servebeer.com","servecounterstrike.com",
	
"servehalflife.com","servehttp.com","serveirc.com","servemp3.com","servepics.com","servequake.com",
	
"damnserver.com","ditchyourip.com","dnsiskinky.com","geekgalaxy.com","net-freaks.com","ip.ca",
	
"securityexploits.com","securitytactics.com","servehumour.com","servep2p.com","servesarcasm.com",
	
"workisboring.com","hopto","64.246.26.135","213.145.29.222","dnsalias"

validtrigs = {"myhub.no-ip.com","multihub2.no-ip.com""greatfriend.no-ip.com"} --insert here your addresses (like yours or multihub ones or great friend's hub ;) )

controltrigs={["hub1"]=1,["hub2"]=2,["hub3"]=3, ["hub4"]=4, ["hub5"]=5} --insert here addresses you want to be informed (no kick)




tabAdvert = {}


function Main()

frmHub:RegBot(BotName)

SetTimer(60000)

StartTimer()

end


function OnTimer()

for key, value in tabAdvert do

if (tabAdvert[key].iClock > clock()+60) then

tabAdvert[key]=nil

end

end

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 

catch=strsub(user.sName,1,9)         --9 is counting chars of the tag below: if u change [VIP], change it!

if catch=="sgm" then                  --ControlUser status : insert users Tag u don'
t want to get kicked
SendPmToOps 
(BotName"1User "..user.sName.." mit der IP "..user.sIP.." hat gerade Werbung im Main-Chat gemacht: "..onlymes.."")

else

tabAdvert[user.sName]=nil

SendToAll
BotNameuser.sName.." wurde wegen Werbung gebannt!")

user:SendPM(BotName"Du hast greade Werbung gemacht. Les die regeln mit +rules und halte dich bitte daran!!"

user:Disconnect();

user:TimeBan(15); 

s,e,onlymes strfind(data"%b<> (.*)")

SendPmToOps (BotName"2User "..user.sName.." mit der IP "..user.sIP.." hat gerade Werbung im Main-Chat gemacht: "..onlymes.."")

end

end

for keyvalue in controltrigs do

if( 
strfindstrlower(data), key) ) then

s
,e,onlymes strfind(data"%b<> (.*)")

SendPmToOps (BotName"Control: 2User "..user.sName.." mit der IP "..user.sIP.." hat gerade Werbung im Main-Chat gemacht: "..onlymes.."")

end

end


spam
=0

if( strfindstrlower(data), "no",1,1) ) and ( strfindstrlower(data), "ip.",1,1) ) then

if ( strfindstrlower(data), "com",1,1) ) or ( strfindstrlower(data), "org",1,1) ) or ( strfindstrlower(data), "info",1,1) ) then

spam
=spam+1endend;


if( 
strfindstrlower(data), "dns",1,1) ) and ( strfindstrlower(data), "2",1,1) ) and ( strfindstrlower(data), "go",1,1) ) then

spam
=spam+1end


if( strfindstrlower(data), "dy",1,1) ) and ( strfindstrlower(data), "nu",1,1) ) then

if( strfindstrlower(data), ".net",1,1) ) or ( strfindstrlower(data), ".com",1,1) ) then

spam
=spam+1;endend


if( strfindstrlower(data), "d n s a",1,1) ) or ( strfindstrlower(data), "d n s .",1,1) ) or ( strfindstrlower(data), "d n s 2",1,1) ) or ( strfindstrlower(data), "o d s .",1,1) ) or ( strfindstrlower(data), "d y n",1,1) ) then

spam
=spam+1;end



if spam>0 then

SendToAll
BotNameuser.sName.." wurde wegen Werbung gebannt!")

user:SendPM(BotName"Werbung ist hier nicht. Du solltest dir die Regeln mit +rules anschauen !!"

user:Disconnect();

user:TimeBan(15); 

s,e,onlymes strfind(data"%b<> (.*)")

SendPmToOps (BotName"3User "..user.sName.." mit der IP "..user.sIP.." hat gerade Werbung im Main-Chat gemacht: "..onlymes.."")

end







elseif strsub(data14) == "$To:" then

local _
_tofrommsg 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(userdatamsgthen 

catch=strsub(user.sName,1,16

if catch==
"['??SemiDeus??']" then

else

tabAdvert[userdata] = nil

SendToAll
BotNameuser.sName.." wurde wegen Werbung gebannt!")

user:SendPM(BotName"Wer wird denn Werbung machen? Das ist aber nicht fein!!:)"

user:Disconnect();

user:TimeBan(15); 

s,e,whoTo,from,mes strfind(data,"$To:%s+(%S+)%s+From:%s+(%S+)%s+$%b<>%s+(.*)")  

SendPmToOps (BotName"4User "..user.sName.." mit der IP "..user.sIP.." hat gerade Werbung im PM-Chat gemacht: "..onlymes.."")

end

end

for keyvalue in controltrigs do

if( 
strfindstrlower(data), key) ) then

s
,e,whoTo,from,mes strfind(data,"$To:%s+(%S+)%s+From:%s+(%S+)%s+$%b<>%s+(.*)")  

SendPmToOps (BotName"Control: 5User "..user.sName.." mit der IP "..user.sIP.." hat gerade im PM-Chat mit "..whoTo.." das folgende gesagt: "..mes.."")

end

end


spam
=0

if( strfindstrlower(data), "no",1,1) ) and ( strfindstrlower(data), "ip.",1,1) ) then

if ( strfindstrlower(data), "com",1,1) ) or ( strfindstrlower(data), "org",1,1) ) or ( strfindstrlower(data), "info",1,1) ) then

spam
=spam+1endend;


if( 
strfindstrlower(data), "dns",1,1) ) and ( strfindstrlower(data), "2",1,1) ) and ( strfindstrlower(data), "go",1,1) ) then

spam
=spam+1end



if( strfindstrlower(data), "dy",1,1) ) and ( strfindstrlower(data), "nu",1,1) ) then

if( strfindstrlower(data), ".net",1,1) ) or ( strfindstrlower(data), ".com",1,1) ) then

spam
=spam+1;endend



if( strfindstrlower(data), "d n s a",1,1) ) or ( strfindstrlower(data), "d n s .",1,1) ) or ( strfindstrlower(data), "d n s 2",1,1) ) or ( strfindstrlower(data), "o d s .",1,1) ) or ( strfindstrlower(data), "d y n",1,1) ) then

spam
=spam+1;end



if spam>0 then

SendToAll
BotNameuser.sName.." wurde wegen Werbung gebannt!")

user:SendPM(BotName"Ich habe Dich erwischt! Du hast Werbung gemacht und deshalb habe ich Dich gekickt !!!"

user:Disconnect();

user:TimeBan(15); 

s,e,whoTo,from,mes strfind(data,"$To:%s+(%S+)%s+From:%s+(%S+)%s+$%b<>%s+(.*)")  

SendPmToOps (BotName"6User "..user.sName.." with IP "..user.sIP.." hat gerade Werbung im PM-Chat gemacht: "..onlymes.."")

end

end

end

end

end


function Verify(userdatamsg)

if 
not msg then return end

tmp 
=""

gsub(strlower(msg), "([a-z0-9.:%-])", function(xtmp tmp..x end)

if 
not tabAdvert[userdatathen

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 keyvalue in advtrigs do

if (
strfind(Linesstrlower(value), 11)) then

for key2value2 in validtrigs do

if (
strfind(Linesstrlower(value2), 11)) then

return nil

end

end

return 1

end

end

end


Anyone here who can translate this Script for me please? Its a great script and i think it would help some more people as me ;-)

Greets

jiten

This script has already been converted to Lua 5. Search the Finished Scripts section for "Lucifer 6.6.6".

Best regards,

jiten

Krysalis

I searched, sorry for the mistake.

Best Regards

jiten

QuoteOriginally posted by Krysalis
I searched, sorry for the mistake.

Best Regards
Sometimes it happens ;)

Regards

SMF spam blocked by CleanTalk