Anti Swearing
 

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

Anti Swearing

Started by Pedro, 27 February, 2004, 02:32:36

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Pedro

Dont tell me to use search, I already have a script but what it doesnt do is check main chat only, the one I am using checks main chat and PMs, but I believe the PMs should be kept private and users should be allowed to say what they want..so really all I need is a script to check for Swearing I Main Chat ONLY!!!

Can anyone help.. here is the script I use now

--Made By nErBoS 
--Fixed by plop 


botname = "??Helga??" 
trigs = {"bad words removed  to keep it clean in forum"} 

function Main() 
   frmHub:RegBot(botname) 
end 
    
function DataArrival(user, data) 
   if (not user.bOperator) then 
      if (( strsub(data, 1, 1) == "<" ) or ( strsub(data, 1, 4) == "$To:" )) then 
         for i=1,getn(trigs) do 
            if( strfind( strlower(data), trigs[i]) ) then 
            local word = strlower(data), trigs[i]
               SendToAll(botname, "The user "..user.sName.." was banned for Swearing." ) 
               user:SendData(botname, "You have been banned for Swearing.") 
               SendPmToOps(botname, "The user "..user.sName.." was banned for Swearing.") 
               SendPmToOps(botname, "The user IP "..user.sIP.." .") 
               SendPmToOps(botname, "He wrote : "..word) 
               user:Disconnect() 
               user:TempBan() 
               break 
            end 
         end 
      end 
   end
end

Thanx guys and good luck to you and make me a happy man
if it aint broke, open it up and find out why...

nErBoS

Hi,

Done...

--Made By nErBoS 
--Fixed by plop 


botname = "? Helga ?" 
trigs = {"bad words removed  to keep it clean in forum"} 

function Main() 
   frmHub:RegBot(botname) 
end 
    
function DataArrival(user, data) 
   if (not user.bOperator) then 
      if ( strsub(data, 1, 1) == "<" ) then 
         for i=1,getn(trigs) do 
            if( strfind( strlower(data), trigs[i]) ) then 
            local word = strlower(data), trigs[i]
               SendToAll(botname, "The user "..user.sName.." was banned for Swearing." ) 
               user:SendData(botname, "You have been banned for Swearing.") 
               SendPmToOps(botname, "The user "..user.sName.." was banned for Swearing.") 
               SendPmToOps(botname, "The user IP "..user.sIP.." .") 
               SendPmToOps(botname, "He wrote : "..word) 
               user:Disconnect() 
               user:TempBan() 
               break 
            end 
         end 
      end 
   end
end

Best regards, nErBoS
--## nErBoS Spot ##--

Pedro

Thanks m8, your a life saver.

this will help our network and can only make it better ( well at least it will stop the complaints) lol


HAPPIER DAYS
if it aint broke, open it up and find out why...

SMF spam blocked by CleanTalk