PtokaX forum

Archive => Archived 5.0 boards => Request for scripts => Topic started by: davnis on 28 September, 2005, 08:26:40

Title: Main chat or PM chat only for regs ?
Post by: davnis on 28 September, 2005, 08:26:40
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
Title:
Post by: Dessamator on 28 September, 2005, 10:54:56
Yes, there is, search the forum.
Title:
Post by: Pothead on 28 September, 2005, 13:33:29
I supose you could allow them to PM Op's, but nobody else. :)
Title:
Post by: Jelf on 28 September, 2005, 14:38:55
QuoteOriginally posted by Mutor
Using smoke signals has, as of yet, not been tested.

:P
RAFLMAO
Title:
Post by: davnis on 28 September, 2005, 17:56:28
thanks for replay ...  unfortunately no reply helps

thank you

Great Job
Title: Re: Main chat or PM chat only for regs ?
Post by: BoyKind on 24 July, 2006, 22:54:58
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 ;)
Title: Re: Main chat or PM chat only for regs ?
Post by: 6Marilyn6Manson6 on 24 July, 2006, 23:09:06
-- ======================================================== --
--// 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
Title: Re: Main chat or PM chat only for regs ?
Post by: Markitos on 25 July, 2006, 08:20:13
local data = string.sub(data, 1, string.len(data)-1)
Title: Re: Main chat or PM chat only for regs ?
Post by: 6Marilyn6Manson6 on 25 July, 2006, 08:27:18
Post Update ;D
Title: Re: Main chat or PM chat only for regs ?
Post by: Markitos on 25 July, 2006, 08:35:38
Just saw now [ again] and i can say that the pattern matching can be optimized.