Hola a todos, necesito un script que bloquee los PM de usuarios a Usuarios registrados.
Pero que permita el envio de PM a OP's y VIP's.
-----------------------------------------------------------------------
Hello, I need script that blocks the p.m. of users to registered Users.
But that allows to send of p.m. to OP's and VIP's.
Gracias / Thanks
are you using the standard profiles?
Thanks mens.
Now:
How I can allow PM to unregistered user From OP and VIP. ?(
Thanks again. :D
QuoteOriginally posted by Mutor
any profile that = 1 may send pm's
CanPM = {[0]=1,[1]=1,[2]=1,[3]=0,[4]=1,[5]=1,[6]=1}
set that part per your need.
I know that. But my cuestion is: How I can allow to Unreg Users send PM to OP and VIP.
?(
Thanks
Hi Hi Hi.
Me too use RC-8.0, but I install this script and does not allow me to send p.m. to the Masters.
This is the config of the script:
CanPM = {[0]=1,[1]=1,[2]=0,[3]=0,[4]=1,[5]=1,[6]=0}
This is the message send of User to Master:
Hi
<(Master)--xxxxx> BOT ***Private Message blocked. You are not alowed to PM (Master)--xxxxx
Pls, help me. 8)
--PM Filter 1.0
--by Mutor
--
--Requested by Jorgesc
--
-- Allow PM by unregistered users to select profiles only
--
--User Settings-------------------------------------------------------------------------------------
Bot = frmHub:GetHubBotName()
-- Which profiles may an unregistered user send a PM to? '1=yes/0=no'
-- Adjust to your profiles
CanPM = {
[0]=1, --0|Master
[1]=1, --1|Operator
[2]=0, --2|VIP
[3]=0, --3|Reg
[4]=0, --4|Newbie <-- Moderator in RC9
[5]=1, --5|Moderator <-- NetFounder in RC9
[6]=0, --6|Admin <-- only in CB
[7]=0 --7|NetWorkFounder <-- only in CB
}
--End User Settings----------------------------------------------------------------------------------
function DataArrival(user, data)
if (strsub(data,1,4) == "$To:") and (user.iProfile == -1) then
local s,e,who = strfind(data,"$To:%s+(%S+)%s+From:")
local nick = GetItemByName(who)
if not nick = nil and CanPM[nick.iProfile] ~= 1 then
user:SendPM(who,"\r\n\r\n\t\t* ** <-=Holly-Inquisitor=-> ** *\r\n\r\n\tYour Private Message to : <"..who.."> has been blocked.\r\n\tBecause: you are not a regged user. ")
return 1
end
end
end
this is what i have now ..
and this is what i get ..
Syntax error: attempt to index local `nick' (a nil value)
stack traceback:
1: function `DataArrival' at line 30 [file `...(NEW)~\scripts\X.01.nopmfornonreggedbymutor.lua']
any clue.. even though i run a beta-test-ptokax or just a "cold shoulder" .. ;0)
not sure about that..
but indeed the script works fine ,,..
user could be kicked be a antiflood before ...
or user that gets pm might not be regged or in list..
no matter WORKS great .. :0)
*EDIT
if not nick = nil and CanPM[nick.iProfile] ~= 1 then
solves the error messages
(incase anybody had the same problem)
*EDIT again
well i just see that error messege again .. so i am trying some other way to fix it . but now only one ..after many hours .. instead of many in one hour ...
local s,e,who = strfind(data,"$To:%s+(%S+)%s+From:")
if GetItemByName(who) ~="" then
local nick = GetItemByName(who)
seems to solve the error messages also ..
(no errors in last 12 hours yet)
but you are right ..
i will do the
"else
user:SendPM(who," Has logged off the hub")"
thingy too ..
is nicer indeed..
..although ..
if a user is no longer logged into the hub,
doesn't the sender get a "user is no longer online" message anyway ? (from their client or the hub)..