PtokaX forum

Archive => Archived 5.0 boards => Request for scripts => Topic started by: Northwind on 01 March, 2006, 16:04:49

Title: Advanced mainlock
Post by: Northwind on 01 March, 2006, 16:04:49
Hi can some one of you advanced coders do script like this.

...for master profile
!lockmc  -- lock mainchat for all but master profile
!dlockmc -- open mainchat for vip/op and security coded unreg/regs

...for  unreg/reg user
<bot>This hub is running PtokaX DC Hub 0.3.4.0a [debug] Jan  5 2006 21:14:11 (UpTime: 2 days, 18 hours, 19 minutes)
<bot>Type security code: <rnd 5 number> to allow mainchat.
Title: Re: Advanced mainlock
Post by: GeceBekcisi on 01 March, 2006, 16:22:52
You can use the MainLock script below and SpamKing.v2.1 (http://forum.ptokax.org/index.php?topic=5742.0) with coordination and use
!startscript SpamKing.v2.1.lua and !stopscript SpamKing.v2.1.lua commands
for the same action ;)

But if you are lazy to work with them and really want the script you requested, I'll take
a look to modify SpamKing to suit your needs.

Best regards


-- ======================================================== --
--// 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
Title: Re: Advanced mainlock
Post by: Northwind on 01 March, 2006, 16:29:44
Thank you, waiting for your modded version :)...
Title: Re: Advanced mainlock
Post by: Northwind on 04 March, 2006, 16:37:01
gece is there any progress... :)