SendPmToOps and SendToOps for Ptokax 0.3.3.0
 

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

SendPmToOps and SendToOps for Ptokax 0.3.3.0

Started by DorianG, 09 March, 2004, 20:04:27

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DorianG

If i use in my scripts to send a message SendPmToOps and SendToOps with Ptokax 0.3.3.0, the command don't works. But if instread of SendToOps i put user:SendData or an other Ptokax command, my scripts works..

Why???

Ptokax 0.3.3.0 build 15.25 [debug] doesn't have SendToOps and SendPmToOps command ??

pHaTTy

can you change it to SendPmToOps and then post the function here, see if u making a mistake....
Resistance is futile!

tezlo

it works.. look for errors elsewhere

DorianG

#3
No, i think that there aren't errors.
i think that the bot when i enter inside the hub doesn't consider me an operator, but in the users list, i have the key. Also if i use user.bOperator doesn't work. This problem there is for all operators profiles..

0|Master|10000100011111111100111000000001
1|Operator|10000100011001111100110000000001
2|VIP|10000000000001111000000000000000
3|Reg|10000000000000000000000000000000
4|Mod|10000100011111111100110000000001
5|Admin|10001100111111111100111000000001
6|Owner|10001111111111111100111000000001



Bot = "BotName"

function Main()
	frmHub:RegBot(Bot)
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,msg = strfind( data, "%b<>%s+(%S+)s+(%S+)" )
		if cmd == "!report" then
			if msg ~= nil then
				SendPmToOps(Bot, msg)
			else
				user:SendData(Bot, "post this commend in main chat !report ")
			end
		end
	end
end

tezlo

local s, e, cmd. msg = strfind(data, "%b<>%s+(%S+)%s+(%S+)")

btw.. this will never be executed
user:SendData(Bot, "post this commend in main chat !report ")

DorianG

ok sorry i have't rewritten good the exaple.. But it is not my problem.
the problem is that if i put SendToOps enstead of user:SendData the bot not sends at the operators the message.

tezlo

so if you write..
SendToOps("someone", "something")
in a new blank script
it doesnt work?

DorianG

No if i write SendToOps in a command of my Bot or anything that it does reference to the Operator.
Example:  user.bOperator, SendPmToOps ecc.. doen't work

?????

it is strange :(

DorianG

#8
When i have started to write my Bot these commands worked.. But when i have writen a new function that allow to set each cmds to on or off.. any commands with SendToOps ecc... doesn't works

SMF spam blocked by CleanTalk