This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
HPWebcamAble's profile picture

Command Computers get Chat events

Started by HPWebcamAble, 15 March 2015 - 03:48 PM
HPWebcamAble #1
Posted 15 March 2015 - 04:48 PM
It's a really simple concept.

Command Computers should be able to receive 'chat' events, kind of like the chat block from MoarPeripherals, except no peripheral is needed

Whenever a message comes up in chat, the computer would get an event like 'chat', <user/block that said it>, message


I think a Command Computer should have the ability to see messages from chat, since it can send them.
Lupus590 #2
Posted 15 March 2015 - 06:23 PM
the only problem would be that all command computers in range would get bombarded by chat in SMP
perhaps have it as an option that the script can activate i.e. commands.listenToChat(true)
HPWebcamAble #3
Posted 15 March 2015 - 07:34 PM
the only problem would be that all command computers in range would get bombarded by chat in SMP
perhaps have it as an option that the script can activate i.e. commands.listenToChat(true)

Well, it's an event, so if your program doesn't do anything when it receives the event (from os.pullEvent() obviously), it wouldn't really effect anything.
If you had several hundred players on a server, sure, it would just be another thing for the server to process, but there aren't many modded servers that have hundreds of players anyway

Alternatively, it could be a type of 'modem', but that would really just be a Chat Block.
Exerro #4
Posted 15 March 2015 - 07:35 PM
There isn't enough chat for a command computer to be 'spammed' by it I wouldn't say. I'd love this functionality in a command computer. It would allow custom commands, like a minecraft plugin can add, just without the / prefix. If it were added, I would suggest there isn't a range, or maybe something like the rednet range in the config file.
MKlegoman357 #5
Posted 15 March 2015 - 07:43 PM
I don't see how computers might be "bombarded" with events. Computers can handle about 20 events per second, so I don't see why it would fail. Also, there is already some peripherals that do that, and I haven't heard anything negative about them.

Remember that Command Computers are only accessible by OPs, so regular players would still be demanding other mods on servers, such as MoarPeripherals, for the ChatBox, thus, those mods would not be hurt either.

Some way of receiving commands would also be nice.

To add to that, how about a feature to send messages to a computer directly? I cannot see how it would work yet, but I see it being useful. Not only a player could send direct commands to Command Computer, but also the server could too. That means there could be full communication between a server plugin and the computer!

I fully support this idea.