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

Ignore pm script

Started by bliskner, 25 May, 2004, 19:32:59

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bliskner

hi, i'm looking for a script that will ignore a private message that i recieve if it is of a certain form. ie if the message contains xxxxxx then ignore the message and don't pop it up.

is there any way to do this? using bcdc++ vers 0.401
thx

nErBoS

#1
Hi,

You are requesting for a hub script or a client script ???

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

bliskner

client side pls

but i don't even know if it is possible

client is BCDC v401b

nErBoS

Hi,

Not expert on that part but i think is possible, wait for the experts :)

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

plop

here is 1.
--// vim:ts=4:sw=4:noet
--//
--// the second argument decides in which order the scripts are run
--// use numbers when you need order, else you can just use a _unique_ identifier

-- the array of forbidden things
trigs = { "fuck", "weingarten", "ip.com", "ass.org", "dns2go", "yhub", "servemp3.net", "mine,nu"}

dcpp:setListener( "pm", "pmfilter",
	function( hub, user, text )
		local s = string.lower( text )
		if not user:isOp() then
            for i=1,table.getn(trigs) do
                if string.find(s, trigs[i]) then
                   return 1
                end
            end
        end
	end																			
)
DC():PrintDebug( "  ** Loaded pm_filter.lua **" )
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 <----<<

SMF spam blocked by CleanTalk