Random regme 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

Random regme script

Started by wulfy21uk, 24 December, 2003, 01:24:15

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

wulfy21uk

Could someone code a !regme script with someone way of asking for a random inputo stop bots from auto registering themselves ie a random number gen or something

BlazeXxX

I think rathar than making a script like this, why not try a spam blocker? which asks for a generated no to be typed in order to activate the main chat and pm?

raz

BlazeXxX
QuoteI think rathar than making a script like this, why not try a spam blocker? which asks for a generated no to be typed in order to activate the main chat and pm?

    This does dat exact thing with dis script u can't talk in pm or main.u can even set it so operators and regged userz will have 2 put a 4 digit number. :D

BotName = "{C2TM}?"  
TestReggedUsers = 0  -- Set to 1 if you want to require validation from registered users.
TestOperators = 0  -- Set to 1 if you want to require validation from operators.
NoChatUsers = { }

--// This function is fired at the serving start
function Main()
end

--// This function is fired when a new data arrives
function DataArrival(curUser, sData)
	sData = strsub(sData, 1, strlen(sData)-1)
	if curUser.iProfile == -1 or TestReggedUsers == 1 then
		if NoChatUsers[curUser.sName] ~= nil then
			if NoChatUsers[curUser.sName] == 1 then
				NoChatUsers[curUser.sName] = random(1000, 9999)
				SendToNick(curUser.sName, "<"..BotName.."> Spam protect: To enable full hub functionality, reply with the following key: "..NoChatUsers[curUser.sName] )
				return 1
			else
				_,_,keystring = strfind(sData, "%b<>%s+(%S+)")
				if tostring(keystring) == tostring(NoChatUsers[curUser.sName]) then
					NoChatUsers[curUser.sName] = nil
					SendToNick(curUser.sName, "<"..BotName.."> Spam protect: Hub Unlocked")
				else
					SendToNick(curUser.sName, "<"..BotName.."> Spam protect: To enable full hub functionality, reply with the following key: "..NoChatUsers[curUser.sName] )
				end
				return 1
			end
		end
	end
end


--// This function is fired when a new user finishes the login
function NewUserConnected(curUser)
	NoChatUsers[curUser.sName] = 1
end


--// This function is fired when an operator enters the hub
function OpConnected(curUser)
	if TestOperators == 1 then
		NoChatUsers[curUser.sName] = 1
	end
end

--// This function is fired when an user disconnects
function UserDisconnected(curUser)
	NoChatUsers[curUser.sName] = nil
end

--// This function is fired when an operator disconnects
function OpDisconnected(curUser)
	NoChatUsers[curUser.sName] = nil
end

SMF spam blocked by CleanTalk