I have a Question can some 1 chance this script??
so that the Blocket profiles only can message OP ore admin wen a new user must be registert
i hope some 1 can make that :)
--PM Filter 1.0 LUA 5
--
--by Mutor 7/6/05
--
--
-- Filter PM's by profiles
--
--User Settings-------------------------------------------------------------------------------------
Bot = frmHub:GetHubBotName()
-- Adjust to your profiles
--profile_idx, PM send is filtered [0=PM Filter is bypassed / 1=PM's are filtered]
CanSendPm = {
[-1] = 1, --Unregistered User
- = 0, --Master
[1] = 0, --Operator
[2] = 0, --Vip
[3] = 1, --Registered User
[4] = 0, --Moderator
[5] = 0, --NetFounder
}
-- Adjust to your profiles
--profile_idx, PM Permission level
--Sender may only PM profiles equal to or greater than their own profile setting.
CanGetPm = {
[-1] = 0, --Unregistered User
- = 6, --Master
[1] = 3, --Operator
[2] = 2, --Vip
[3] = 1, --Registered User
[4] = 4, --Moderator
[5] = 5, --NetFounder
}
--End User Settings----------------------------------------------------------------------------------
function ToArrival(user, data)
if CanSendPm[user.iProfile] == 1 then
local s,e,who = string.find(data,"$To:%s+(%S+)%s+From:")
local userprof = GetProfileName(user.iProfile)
local nick = GetItemByName(who)
if not nick then
local OfflineMsg = "The user "..who.." is not online. Check your spelling."
SendPmToNick(user.sName,Bot,OfflineMsg)
return 1
end
if CanGetPm[user.iProfile] >= CanGetPm[nick.iProfile] then
return 1
else
local nickprof = GetProfileName(nick.iProfile)
local FilterMsg = "\r\n\r\n\t***Your Private Message To "..nick.sName.." Was Blocked.***\r\n"..
"\t"..userprof.."'s are currently not allowed to PM "..nickprof.."'s.\r\n\r\n"
SendPmToNick(user.sName,nick.sName,Bot.." 8( ...Sorry "..user.sName..FilterMsg)
return 1
end
end
end