Conflit with Robocop
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

Conflit with Robocop

Started by DorianG, 23 February, 2004, 16:55:10

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DorianG

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

Optimus

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

DorianG

thank Optimus, the script it's all right now ;)

DorianG

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..

Flux

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...
? Official HoD Website - http://www.houseofdance.net
? Official HoD Hub Community -  hodhub.dyndns.org:2007

Optimus

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.

DorianG

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")

Optimus

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

Optimus

BTW: I added this function to the Next RoboCopv7.0 release...

DorianG

thank Optimus, now works ;) . Really? It's fantastic.

SMF spam blocked by CleanTalk