i need a script to change redirect addy by an op if possible...anyone have any ideas?
Hi,
Hope it helps...
--Requested by SmoKinG
--Made by nErBoS
Bot = "Red-Bot"
function Main()
fmrHub:RegBot(Bot)
end
function DataArrival(user, data)
if (strsub(data,1,1)=="<") or (strsub(data,1,5+strlen(Bot))=="$To: "..Bot) then
data=strsub(data,1,strlen(data)-1)
s,e,cmd = strfind(data,"%b<>%s+(%S+)")
if (cmd=="!chred") then
ChangeRedAdd()
return 1
end
end
end
function ChangeRedAdd(user, data)
if (user.bOperator) then
_,_,arg = strfind( data, "%b<>%s+%S+%s+(%S+)" )
frmHub:SetRedirectAddress(arg)
else
user:SendPM(Bot, "You don't have permission to use this command.")
end
end
Best regards, nErBoS
to avoid a simple nil:
function ChangeRedAdd(user, data)
if (user.bOperator) then
_,_,arg = strfind( data, "%b<>%s+%S+%s+(%S+)" )
if arg==nil then
user:SendData(Bot,"Syntax: !chred ")
return 1
end
frmHub:SetRedirectAddress(arg)
else
user:SendPM(Bot, "You don't have permission to use this command.")
end
end
/NL
function ChangeRedAdd(user, data)
if user.iProfile== 0 then
_,_,arg = strfind( data, "%b<>%s+%S+%s+(%S+)" )
if arg==nil then
user:SendData(Bot,"Syntax: !chred ")
return 1
end
frmHub:SetRedirectAddress(arg)
else
user:SendPM(Bot, "You don't have permission to use this command.")
end
end
Not such a great idea to let every OP have the chance to change the Redirect =))
This is only allowing the Master..*nOOb change* =)
thanks guys ill give it a try