Main chat or PM chat only for regs ?
 

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

Main chat or PM chat only for regs ?

Started by davnis, 28 September, 2005, 08:26:40

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

davnis

Hi everybody !

Im wonder if is any script that block any messages on Main or PM or both for unregistered users.

i know is an script that block the download for unregistered users. Can be this redisigned for main ( or ) and private chat  to block any text until the users register ? Eventualy with an Error message ?? You're not allowed to post messages until you're not registered !

thank you

Dessamator

Yes, there is, search the forum.
Ignorance is Bliss.

Pothead

I supose you could allow them to PM Op's, but nobody else. :)

Jelf

QuoteOriginally posted by Mutor
Using smoke signals has, as of yet, not been tested.

:P
RAFLMAO

davnis

thanks for replay ...  unfortunately no reply helps

thank you

Great Job

BoyKind

Davnis, put this script in your ptokax
-- ======================================================== --
--// MainLock by GeceBekcisi, 22.11.2005
-- ======================================================== --
sMainChatLock = nil
sBot = frmHub:GetHubBotName()
-- ======================================================== --
function ChatArrival(curUser, data)
	data = string.sub(data, 1, string.len(data)-1)
	if curUser.bOperator then
		local s,e,cmd,arg = string.find(data,"%b<>%s+(%S+)%s+(%S+)")
		if (cmd == "!mainchat") then
			if (arg == "off") then
				if sMainChatLock then
					curUser:SendData(sBot, "Main chat is already disabled for user access.")
				else
					SendToAll(sBot, "Temporarily main chat is disabled for user access.")
					sMainChatLock = 1
				end
			end
			if (arg == "on") then
				if sMainChatLock then
					SendToAll(sBot, "Main chat is now enabled for user access.")
					sMainChatLock = nil
				else
					curUser:SendData(sBot, "Main chat is already enabled for user access.")
				end
			end
			return 1
		end
	end
	if sMainChatLock then
		if curUser.bOperator then
			return 0
		else
			curUser:SendData(sBot, "Main chat is disabled for user access.")
			return 1
		end
	end
end


Reload this text, then type in Mainchat !mainchat off . Then in your PtokaX > Options > Profile Manager then you select the profiles you want, and you tick No chat limits ... Hope that will work ;)
With all the respect

6Marilyn6Manson6

#6
-- ======================================================== --
--// MainLock by GeceBekcisi, 22.11.2005
--// Modded by TTB, 07-12-2005
--// Fixed small bug by 6Marilyn6Manson6, 07-12-2005
-- ======================================================== --
sMainChatLock = nil
sBot = frmHub:GetHubBotName()

Block = {
[-1] = 1,  -- Users
[0] = 0,   -- Masters
[1] = 0,   -- OPs
[2] = 0,   -- VIPs
[3] = 0,   -- REGs
[4] = 0,   -- MODs
[5] = 0,   -- Founders
}
-- ======================================================== --
function ChatArrival(usr, data)
	local data = string.sub(data, 1, string.len(data)-1)
	if usr.bOperator then
		local s,e,cmd,arg = string.find(data,"%b<>%s+(%S+)%s+(%S+)")
		if (cmd == "!mainchat") then
			if (arg == "off") then
				if sMainChatLock then
					usr:SendData(sBot, "Main chat is already disabled for user access.")
				else
					SendToAll(sBot, "Temporarily main chat is disabled for user access.")
					sMainChatLock = 1
				end
			end
			if (arg == "on") then
				if sMainChatLock then
					SendToAll(sBot, "Main chat is now enabled for user access.")
					sMainChatLock = nil
				else
					usr:SendData(sBot, "Main chat is already enabled for user access.")
				end
			end
			return 1
		end
	end
	if sMainChatLock then
		if Block[usr.iProfile] == 1 then
			usr:SendData(sBot, "Main chat is disabled for user access.")
			return 1
		else
			return 0
		end
	end
end
--// 6Marilyn6Manson6


I love this small modded :D

Markitos

local data = string.sub(data, 1, string.len(data)-1)

6Marilyn6Manson6


Markitos

Just saw now [ again] and i can say that the pattern matching can be optimized.

SMF spam blocked by CleanTalk