Mass-Message + Banner
 

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

Mass-Message + Banner

Started by RDB, 17 April, 2004, 14:23:08

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

RDB

Is it possible to send a command to a bot rather than posting it in main chat. which then will activate the said command. This is because we sometimes get ops mistyping their commands and end up showing users what we type and it isnt very secure. The two commands im looking to use especially with this feature is a mass message and a banner script. (but the banner script being something that can be used to make it look  like the bot talks and not a full banner).

Thankyou in advance :]

Carnage

Well since normal users can't use those commands anyways ... what's not safe about it ?

RDB

If an OP wants to remain anonymous whilst posting.

nErBoS

#3
Hi,

Just write return 1 in the end of every command and your problem is solved.

Best regards, nErBoS
--## nErBoS Spot ##--

RDB

#4
i have the banner in channelbot. But is it possible to do another banner that simply posts in the main chat as a bot? (using an existing bot and not needing its own bot for this). Also, need a mass message script integrated in the same script if possible.

Thank you in advance  :]

nErBoS

Hi,

You have to excuse my english not understanding the banner thing. Can you explain ??

Best regards, nErBoS
--## nErBoS Spot ##--

plop

QuoteOriginally posted by nErBoS
Hi,

You have to excuse my english not understanding the banner thing. Can you explain ??

Best regards, nErBoS
he means the thing you see in my hub when i go for dinner. lol

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

RDB

I mean a script that will let you send a message in main chat from the bot.

i.e. !botspeak Hi all how ya doing.

Then in mainchat you would see

Hi all how ya doing.

And all ops have this capability, but no user will know who said it  ;)

nErBoS

Hi,

QuoteOriginally posted by plop
QuoteOriginally posted by nErBoS
Hi,

You have to excuse my english not understanding the banner thing. Can you explain ??

Best regards, nErBoS
he means the thing you see in my hub when i go for dinner. lol

plop

LOL :)

Here is it then...

--Requested by RDB 
--Made by nErBoS

sBot = "Bot-ME"

function Main()
	frmHub:RegBot(sBot)
end

function DataArrival(user, data)
	if (strsub(data,1,1) == "<" or strsub(data,1,5+strlen(sBot)) == "$To: "..sBot) then
		data = strsub(data,1,strlen(data)-1)
		s,e,cmd = strfind(data, "%b<>%s+(%S+)")
		if (cmd == "!botspeak" and user.bOperator) then
			local s,e,msg = strfind(data, "%b<>%s+%S+%s+(%S+)")
			if (msg == nil) then
				user:SendPM(sBot, "Syntax Error, !botspeak , you must write a message.")
			else
				SendToAll(sBot, msg)
			end
			return 1
		elseif (cmd == "!massmess" and user.bOperator) then
			local s,e,msg = strfind(data, "%b<>%s+%S+%s+(%S+)")
			if (msg == nil) then
				user:SendPM(sBot, "Syntax Error, !massmess , you must write a message.")
			else
				SendPmToAll(sBot, msg)
			end
			return 1
		end
	end
end

Best regards, nErBoS
--## nErBoS Spot ##--

RDB

Perfect :-)

Thank You for the quick response  :)

If i wanted to modify channelbot so that those commands were activated by typing to the bot like this one would it be easy? If so, further help required...

RDB

#10
Also, ive noticed that certain characters end the message sent

i.e. !botspeak hey, how you all

In main chat users will see

<:HouseBot:> hey,

Is it posssible to stop this from happening?

Thank You in Advance

Added: The character that breaks the command is actually . So only oneword messages can be sent.

plop

QuoteOriginally posted by RDB
Also, ive noticed that certain characters end the message sent

i.e. !botspeak hey, how you all

In main chat users will see

<:HouseBot:> hey,

Is it posssible to stop this from happening?

Thank You in Advance
yep but if you don't mind i'm gone leave it 2 nerbos 2 fix it.

@nerbos: last part of the pattern matching is wrong, it only captures 1 word, you wanne capture everything left in the string.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

nErBoS

Hi,

Sorry too many copy past :P...
Try this then...

--Requested by RDB 
--Made by nErBoS

sBot = "Bot-ME"

function Main()
	frmHub:RegBot(sBot)
end

function DataArrival(user, data)
	if (strsub(data,1,1) == "<" or strsub(data,1,5+strlen(sBot)) == "$To: "..sBot) then
		data = strsub(data,1,strlen(data)-1)
		s,e,cmd = strfind(data, "%b<>%s+(%S+)")
		if (cmd == "!botspeak" and user.bOperator) then
			local s,e,msg = strfind(data, "%b<>%s+%S+%s+(.*)")
			if (msg == nil) then
				user:SendPM(sBot, "Syntax Error, !botspeak , you must write a message.")
			else
				SendToAll(sBot, msg)
			end
			return 1
		elseif (cmd == "!massmess" and user.bOperator) then
			local s,e,msg = strfind(data, "%b<>%s+%S+%s+(.*)")
			if (msg == nil) then
				user:SendPM(sBot, "Syntax Error, !massmess , you must write a message.")
			else
				SendPmToAll(sBot, msg)
			end
			return 1
		end
	end
end

Best regards, nErBoS
--## nErBoS Spot ##--

RDB

#13
Thanks, and one last thing - i put that script in without changing bot name so now i got a new bot - how do i unreg a bot.

BTW.. Thank You for the script  :)

plop

QuoteOriginally posted by RDB
Thanks, and one last thing - i put that script in without changing bot name so now i got a new bot - how do i unreg a bot.

BTW.. Thank You for the script  :)
run this script 1x with the name of the bot you wanne unregister from the userslist.
function Main() 
	frmHub:UnregBot("PlaceTheToBeRemovedBotNameHere")
end
plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

RDB

Thanks, works perfectly  :)

SMF spam blocked by CleanTalk