help with Lucifer 6.6.6
 

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

help with Lucifer 6.6.6

Started by xokas, 17 December, 2003, 17:01:21

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

xokas

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

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

--History: Base='multiline antiadvertise' by OpiumVolage (your tables simplify the work I did until that moment). Here its features:
--             1)Script can block 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
--             2)You can insert valid addresses (like yours) in trigs, so bot won't kick you
--             3)Users conversating with ops don't get kicked
--             4)Why the Timer? It cleans memory.

--             Demone.Astaroth addons: 1)added an huge list of addresses
--         2)When advertising: user advised on Pm before disconnection; Bot sends to all in main chat the kicking message (without IP);
--                                         advertise-infos send to Op-chat directly without troubling any Op with Pms! Infos 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 space: they will not
--                                                                                       get kicked for any addresses, but in case of typing a Control-address, Ops will be
--                                                                                          informed.
--                                      7)Fixed some bug (Thanks Opium)
--      8)Added a new string-pieces find way to catch advertises

BotName = "AntiPub"

advtrigs = {}




validtrigs = {"hubtugas.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,5)         --5 is counting chars of the tag below: if u change [VIP], change it!
if catch=="[OP]" then                  --ControlUser status : insert users Tag u don't want to get kicked
else
tabAdvert[user.sName]=nil
SendToAll( BotName, user.sName.." foi kickado por pub!")
user:SendPM(BotName, "Foste kickado por pub! N?o repitas a brincadeira!")
user:Disconnect();
user:TimeBan(15);
s,e,onlymes = strfind(data, "%b<> (.*)")
SendPmToOps ("Consultorio_Sentimental", "O user "..user.sName.." com o IP "..user.sIP.." fez pub no main chat, mensagem: "..onlymes.."")
end
end
for key, value in controltrigs do
if( strfind( strlower(data), key) ) then
s,e,onlymes = strfind(data, "%b<> (.*)")
SendPmToOps ("Consultorio_Sentimental", "Control: User "..user.sName.." com o IP "..user.sIP.." disse no main: "..onlymes.."")
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
SendToAll( BotName, user.sName.." foi kickado por pub!")
user:SendPM(BotName, "Foste kickado por pub! N?o repitas a brincadeira!")
user:Disconnect();
user:TimeBan(15);
s,e,onlymes = strfind(data, "%b<> (.*)")
SendPmToOps ("Consultorio_Sentimental", "User "..user.sName.." com o IP "..user.sIP.." fez pub no main chat, mensagem: "..onlymes.."")
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
catch=strsub(user.sName,1,16)
if catch=="['??SemiDeus??']" then
else
tabAdvert[userdata] = nil
SendToAll( BotName, user.sName.." foi kickado por pub!")
user:SendPM(BotName, "Foste kickado por pub! N?o repitas a brincadeira!")
user:Disconnect();
user:TimeBan(15);
s,e,whoTo,from,mes = strfind(data,"$To:%s+(%S+)%s+From:%s+(%S+)%s+$%b<>%s+(.*)")
SendPmToOps ("Consultorio_Sentimental", "User "..user.sName.." com o IP "..user.sIP.." fez pub no main chat dizendo a "..whoTo.." o seguinte: "..mes.."")
end
end
for key, value in controltrigs do
if( strfind( strlower(data), key) ) then
s,e,whoTo,from,mes = strfind(data,"$To:%s+(%S+)%s+From:%s+(%S+)%s+$%b<>%s+(.*)")
SendPmToOps ("Consultorio_Sentimental", "Control: User "..user.sName.." com o IP "..user.sIP.." disse a "..whoTo.." o seguinte: "..mes.."")
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
SendToAll( BotName, user.sName.." foi kickado por pub!")
user:SendPM(BotName, "Foste kickado por pub! N?o repitas a brincadeira!")
user:Disconnect();
user:TimeBan(15);
s,e,whoTo,from,mes = strfind(data,"$To:%s+(%S+)%s+From:%s+(%S+)%s+$%b<>%s+(.*)")
SendPmToOps ("Consultorio_Sentimental", "User "..user.sName.." com o IP "..user.sIP.." fez pub no main chat dizendo a "..whoTo.." o seguinte: "..mes.."")
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






hi there, i was needing some explanations on this script, this is a very good one and i dont wanna waste it(tkhx to Demone.Astaroth and OpiumVolage for the nice work done on it). my question is: those this script catch a pub done like this ---> . hubname  <------ my question is about the ---> . <----- because i defined it as defined -----> * <---- and the script doesnt catch both of them. of course this is only testing, but the advertising goes untouchable. and im using the ---> . or the * <---- alone. just those two separate(no hub name or the two together) Ex: advtrig={"."," . ","*"." * "}. just an example of it. hope someone can help me out here please. tkhx for ya time reading this.

xokas

hi there, i've found the solution with Guibs help... the place i need to make changes is here gsub(strlower(msg), "([a-z0-9.:%-])", function(x) tmp = tmp..x end) <----- this is on line 313 i guess, but another problem came although there is a . there the script wont catch when i type just a dot when im testing and it should catch because i add there the * and it didnt pass when i type * alone, for testing. hints everyone?

plop

QuoteOriginally posted by xokas
hi there, i've found the solution with Guibs help... the place i need to make changes is here gsub(strlower(msg), "([a-z0-9.:%-])", function(x) tmp = tmp..x end) <----- this is on line 313 i guess, but another problem came although there is a . there the script wont catch when i type just a dot when im testing and it should catch because i add there the * and it didnt pass when i type * alone, for testing. hints everyone?
hint

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

xokas

tkhx a lot plop :)) there's something i didn't knew and its a great help :))) tkhx a loooooooooooot

xokas

errr... i'm a n00b in coding on lua and i've tried to change the code itself to catch that magic one but i couldn't even with the hint of plop... could some one use a little time and do that for me plz?

xokas

could someone help me out here plz?maybe some guru like opium,phatty, and so many out there... thanks

plop

QuoteOriginally posted by xokas
could someone help me out here plz?maybe some guru like opium,phatty, and so many out there... thanks
check your pm, posted you a version with debugging.
can't really folow what your trying 2 do.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

xokas

we in portugal suffer a bad habit that is making advertising many times and almost every ways possible and one of them is this one: .no-ip.com, .no, .serveber,*no-ip.com, .s.e.r.v.e and so on. the one that i can't seem to stop is the one like this: ------> .no, *no, .no-ip.com, *no-ip.com



hope i am making myself clear.


P.S: i fought that was strange because the . is in the code, but in fact doesn't work but im gonna run more test's on it. hope ya understand me.

plop

try this 1.
it replaces every url unless you allow it.
only it doesn't capture those spreaded over multilple lines.
-- sneaky anti advertising bot by plop
-- it replaces the url's users post for your own.   lol
-- let them work for you, instead of against you
-- thx again for the hints from rabidwombat


WEBSITE = "http://www.dcvikings.com/~goldenangel/"
HUBADRESS ="goldenangel.no-ip.org"

OKSITES = { ["www.plop.nl"] = 1, ["www.dcvikings.com"] = 1 }

OKHUBS = { ["tga-darkstar.no-ip.com"] = 1, ["goldenangel.no-ip.org"] = 1, ["tga-norge.2waky.com"] = 1}

function DataArrival(user, data)
   if user.iProfile == -1 or user.iProfile == 3 then
      if (strsub(data, 1, 1) == "<") then
      --if not(strsub(data, 1, 4) == "$To:") then 
         data = strsub(data, 1, (strlen(data)-1))
         local s,e,msg,webadver,msg2 = strfind(data, "%b<>%s(.*)[URL]http://[/URL]([^%.]+%.[^%.]+%.%S+)(.*)$")
         if webadver ~= nil then 
            local s,e,webby = strfind(webadver, "(%S+%.[^%.]+%.%a+)/.*")
            if webby == nil then webby = webadver end
            if OKSITES[webby] == nil then
               SendToAll(user.sName, msg..WEBSITE..msg2)
               return 1
            end
         else 
            local s,e,msg,webadver,msg2 = strfind(data, "%b<>%s(.*)(www+%.[^%.]+%.%S+)(.*)$")
            if webadver ~= nil then
               local s,e,webby = strfind(webadver, "(%S+%.[^%.]+%.%a+)/.*")
               if webby == nil then webby = webadver end
               if OKSITES[webby] == nil then
                  SendToAll(user.sName, msg..WEBSITE..msg2)
                  return 1
               end
            else
               local s,e, adver = strfind(data, "%b<>%s(%S+%.[^%.]+%.[^%.]+)")
               if adver ~= nil then 
                  local s,e,hubby = strfind(adver, "(%S+%.[^%.]+%.%a+)/.*")
                  if hubby == nil then hubby = adver end
                  if OKHUBS[hubby] == nil then
                     SendToAll(user.sName, HUBADRESS)
                     return 1
                  end
               else
                  local s,e,msg,adver,msg2 = strfind(data, "%b<>%s(.*)%s([^%.]+%.[^%.]+%.%S+)(.*)$")
                  if adver ~= nil then 
                     local s,e,hubby = strfind(adver, "(%S+%.[^%.]+%.%a+)/.*")
                     if hubby == nil then hubby = adver end
                     if OKHUBS[hubby] == nil then
                        SendToAll(user.sName, msg.." "..HUBADRESS..msg2)
                        return 1
                     end
                  end
               end
            end
         end
      else
         --local s,e,to,text = strfind(data, "%$To: (%S+) From: %S %$(.+)$") 
                            local s,e,to,text = strfind(data,    "%$To:%s(%S+)%sFrom:%s%S+%s$(.*)$")
         if(to == nil) then return 0 end
         to = GetItemByName(to)
         if to.iProfile == -1 or to.iProfile == 3 then
            text = strsub(text, 1, (strlen(text)-1))
            local s,e,msg,webadver,msg2 = strfind(text, "%b<>%s(.*)[URL]http://[/URL]([^%.]+%.[^%.]+%.%S+)(.*)$")
            if webadver ~= nil then 
               local s,e,webby = strfind(webadver, "(%S+%.[^%.]+%.%a+)/.*")
               if webby == nil then webby = webadver end
               if OKSITES[webby] == nil then
                  SendPmToNick(to.sName, user.sName, msg..WEBSITE..msg2)
                  return 1
               end
            else 
               local s,e,msg,webadver,msg2 = strfind(text, "%b<>%s(.*)(www+%.[^%.]+%.%S+)(.*)$")
               if webadver ~= nil then
                  local s,e,webby = strfind(webadver, "(%S+%.[^%.]+%.%a+)/.*")
                  if webby == nil then webby = webadver end
                  if OKSITES[webby] == nil then
                     SendPmToNick(to.sName, user.sName, msg..WEBSITE..msg2)
                     return 1
                  end
               else
                  local s,e, adver = strfind(text, "%b<>%s(%S+%.[^%.]+%.[^%.]+)")
                  if adver ~= nil then 
                     local s,e,hubby = strfind(adver, "(%S+%.[^%.]+%.%a+)/.*")
                     if hubby == nil then hubby = adver end
                     if OKHUBS[hubby] == nil then
                        SendPmToNick(to.sName, user.sName, HUBADRESS)
                        return 1
                     end
                  else
                     local s,e,msg,adver,msg2 = strfind(text, "%b<>%s(.*)%s([^%.]+%.[^%.]+%.%S+)(.*)$")
                     if adver ~= nil then 
                        local s,e,hubby = strfind(adver, "(%S+%.[^%.]+%.%a+)/.*")
                        if hubby == nil then hubby = adver end
                        if OKHUBS[hubby] == nil then
                           SendPmToNick(to.sName, user.sName, msg.." "..HUBADRESS..msg2)
                           return 1
                        end
                     end
                  end
               end
            end
         end
      end
   end
end
plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

NightLitch

I would want some professional help here guys...

There where I have marked I think the problem lies...

Try adding validtrigs that's no-ip.com or others is with
and put the address in validtrigs you get banned...

And I can't fix it... so plz someone fix it... This is one of the
best AntiAdvertising scripts....

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

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

--History: Base='multiline antiadvertise' by OpiumVolage (your tables simplify the work I did until that moment). Here its features:
--             1)Script can block 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
--             2)You can insert valid addresses (like yours) in trigs, so bot won't kick you
--             3)Users conversating with ops don't get kicked
--             4)Why the Timer? It cleans memory.

--             Demone.Astaroth addons: 1)added an huge list of addresses
--		   	      2)When advertising: user advised on Pm before disconnection; Bot sends to all in main chat the kicking message (without IP); 
--	                                         advertise-infos send to Op-chat directly without troubling any Op with Pms! Infos 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 space: they will not
--                                     	                                                  get kicked for any addresses, but in case of typing a Control-address, Ops 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,5)         --5 is counting chars of the tag below: if u change [VIP], change it!
				if catch=="[VIP]" then                  --ControlUser status : insert users Tag u don't want to get kicked
				else
					tabAdvert[user.sName]=nil
					SendToAll( BotName, user.sName.." get slaughtered by Lucifer for advertising!")
					user:SendPM(BotName, "I slaughtered you! Don't try again to advertise!") 
					user:Disconnect();
					user:TimeBan(15); 
					s,e,onlymes = strfind(data, "%b<> (.*)")
					SendPmToOps ("INSERT.HERE.YOUR.OP-CHAT.NAME", "User "..user.sName.." with IP "..user.sIP.." advertised in main chat saying: "..onlymes.."")
				end
			end
			for key, value in controltrigs do
				if( strfind( strlower(data), key) ) then
					s,e,onlymes = strfind(data, "%b<> (.*)")
					SendPmToOps ("INSERT.HERE.YOUR.OP-CHAT.NAME", "Control: User "..user.sName.." with IP "..user.sIP.." told in main: "..onlymes.."")
				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
					SendToAll( BotName, user.sName.." get slaughtered by Lucifer for advertising!")
					user:SendPM(BotName, "I slaughtered you! Don't try again to advertise!") 
					user:Disconnect();
					user:TimeBan(15); 
					s,e,onlymes = strfind(data, "%b<> (.*)")
					SendPmToOps ("INSERT.HERE.YOUR.OP-CHAT.NAME", "User "..user.sName.." with IP "..user.sIP.." advertised in main chat saying: "..onlymes.."")
			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 
					catch=strsub(user.sName,1,16) 
					if catch=="['??SemiDeus??']" then
					else
						tabAdvert[userdata] = nil
						SendToAll( BotName, user.sName.." get slaughtered by Lucifer for advertising!")
						user:SendPM(BotName, "I slaughtered you! Don't try again to advertise!") 
						user:Disconnect();
						user:TimeBan(15); 
						s,e,whoTo,from,mes = strfind(data,"$To:%s+(%S+)%s+From:%s+(%S+)%s+$%b<>%s+(.*)")  
						SendPmToOps ("INSERT.HERE.YOUR.OP-CHAT.NAME", "User "..user.sName.." with IP "..user.sIP.." advertised in main chat saying to "..whoTo.." this: "..mes.."")
					end
				end
				for key, value in controltrigs do
					if( strfind( strlower(data), key) ) then
						s,e,whoTo,from,mes = strfind(data,"$To:%s+(%S+)%s+From:%s+(%S+)%s+$%b<>%s+(.*)")  
						SendPmToOps ("INSERT.HERE.YOUR.OP-CHAT.NAME", "Control: User "..user.sName.." with IP "..user.sIP.." said to "..whoTo.." this: "..mes.."")
					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
						SendToAll( BotName, user.sName.." get slaughtered by Lucifer for advertising!")
						user:SendPM(BotName, "I slaughtered you! Don't try again to advertise!") 
						user:Disconnect();
						user:TimeBan(15); 
						s,e,whoTo,from,mes = strfind(data,"$To:%s+(%S+)%s+From:%s+(%S+)%s+$%b<>%s+(.*)")  
						SendPmToOps ("INSERT.HERE.YOUR.OP-CHAT.NAME", "User "..user.sName.." with IP "..user.sIP.." advertised in main chat saying to "..whoTo.." this: "..mes.."")
				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

----------- THIS PART IS WAY WRONG -------
	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


the ----------- THIS PART IS WAY WRONG ------- think the problem
lies there.. otherwise... I don't know...

plz fix
//NL

NightLitch

Plop look into this one plz... cause it's not working and I
can't figure out completly what is wrong... but it has to do
with the part I have ------- above I think...

This Script doesn't work... As everybody say...
//NL

plop

QuoteOriginally posted by NightLitch
Plop look into this one plz... cause it's not working and I
can't figure out completly what is wrong... but it has to do
with the part I have ------- above I think...

This Script doesn't work... As everybody say...
gone look @ it but not 2day, falling apart here.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

pHaTTy

because its not sending all data i guess it will have to be put into the data arrival, unless you pasre everyhintg and send as strings, but thats me with my sleeping brain so i think i cud be talking nonsense lol
Resistance is futile!

pHaTTy

if (strfind(Lines, strlower(value), 1, 1)) then
:S what is lines??? userdata shud be i reckon :/
Resistance is futile!

plop

#14
QuoteOriginally posted by (uk-kingdom)pH?tt?
if (strfind(Lines, strlower(value), 1, 1)) then
:S what is lines??? userdata shud be i reckon :/
look just above his comment for Lines.

not tested, but maby it works.
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]]

----------- THIS PART IS WAY WRONG -------
	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
plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

pHaTTy

Resistance is futile!

SMF spam blocked by CleanTalk