Why? If i use this my script with Robocop, Robocop doesn't work?
BotName = "REG"
prefix = "!"
command = prefix.."regme"
function Main()
frmHub:RegBot(BotName)
end
function NewUserConnected(user)
if user.iProfile == -1 then
user:SendPM(BotName, "To register your self "..command..",then wait an operator")
end
end
function DataArrival(user, data)
if (strsub(data,1,1) == "<") then
data = strsub(data,1,strlen(data)-1)
local s,e,cmd = nil
s,e,cmd = strfind(data, "%b<>%s(%S+)")
if user.iProfile == -1 then
if cmd == command then
SendPmToOps(BotName, "User "..user.sName.." want to be registered")
user:SendPM(BotName, "Plese wait an Operator")
end
return 1
else
user:SendPM(BotName, "You are not allowd to use this command")
return 1
end
end
end
Hiya i think this is what you been looking for?
BotName = "REG"
prefix = "!"
function Main()
frmHub:RegBot(BotName)
end
function NewUserConnected(user)
if user.iProfile == -1 then
user:SendPM(BotName, "To register your self "..prefix.."regme, then wait an operator")
end
end
function DataArrival(user, data)
if (strsub(data, 1, 1) == "<" ) then
data=strsub(data,1,strlen(data)-1)
_,_,cmd=strfind(data, "%b<>%s+(%S+)")
if (cmd) then
if user.iProfile == -1 then
if (cmd==prefix.."regme") then
SendPmToOps(BotName, "User "..user.sName.." want to be registered")
user:SendPM(BotName, "Plese wait an Operator")
return 1
else
user:SendPM(BotName, "You are not allowd to use this command")
return 1
end
end
end
end
end
L8trs Opti
thank Optimus, the script it's all right now ;)
Sorry Optimus, but i have finded a conflit with help command.
If an user use !help command, the command doesn't open the help file..
I have found that Robocop will not allow multi hub linking to work too from the new DC Hub Link.
Which is a damn shame as my hub as a good reputation with another hub and we wanted to multi link our hubs it only works when Robocop is not installed on the other hub but they love robocop so we are hoping that maybe someone can tell us why this maybe the case with Robocop and if anything can be done...
QuoteSorry Optimus, but i have finded a conflit with help command.
If an user use !help command, the command doesn't open the help file..
Users use !userhelp :D
About the hublink thingy mmm, i don't know haven't checked that out. Maybe it has some todo with the HubProtection that it blocks some other data to.
i think that the problem is in the command..
if user.iProfile == -1 then
because if an user use !userhelp.. My Bot reply with this message..
user:SendPM(BotName, "You are not allowd to use this command")
Ok tested this must work, here you go!
BotName = "REG"
prefix = "!"
function Main()
frmHub:RegBot(BotName)
end
function NewUserConnected(user)
if user.iProfile == -1 then
user:SendPM(BotName, "To register your self "..prefix.."regme, then wait an operator")
end
end
function DataArrival(user, data)
if (strsub(data, 1, 1) == "<" ) then
data=strsub(data,1,strlen(data)-1)
_,_,cmd=strfind(data, "%b<>%s+(%S+)")
if (cmd) then
if (cmd==prefix.."regme") then
if user.iProfile == -1 then
SendPmToOps(BotName, "User "..user.sName.." want to be registered")
user:SendPM(BotName, "Plese wait an Operator")
return 1
else
user:SendPM(BotName, "You are not allowd to use this command")
return 1
end
end
end
end
end
BTW: I added this function to the Next RoboCopv7.0 release...
thank Optimus, now works ;) . Really? It's fantastic.