7 posts
Posted 03 September 2013 - 07:46 PM
Is is possible to lookup a computercraft instance via the id?
I'd like to build a serverside only plugin that can inject events to a dedicated "admin" computer based on its id … something like
lookupComputer(id).queueLuaEvent("admin_event", "awesome");
758 posts
Location
Budapest, Hungary
Posted 04 September 2013 - 08:29 AM
Use the rednet API. If you only want to queue events on the other computer, that's the easiest way.
7 posts
Posted 05 September 2013 - 01:37 AM
This would be a Java level question, although as a hack, that might be a working solution for me. (in java) But still would not not how to inject a random message into the rednet queue.
758 posts
Location
Budapest, Hungary
Posted 05 September 2013 - 10:15 AM
The what? Try to explain what you want to accomplish - it sure is possible using Lua only.
If I was messing with something like a tele-shell (if that's what you're talking about), I'd just send a serialized table over rednet to the so called "admin" computer and then I'd have it unserialized and its contents queued on that computer. In a separate coroutine maybe.
8543 posts
Posted 05 September 2013 - 10:28 AM
Moved to Peripheral Help & Discussion.
1243 posts
Location
Indiana, United States
Posted 05 September 2013 - 11:44 AM
The what? Try to explain what you want to accomplish - it sure is possible using Lua only.
If I was messing with something like a tele-shell (if that's what you're talking about), I'd just send a serialized table over rednet to the so called "admin" computer and then I'd have it unserialized and its contents queued on that computer. In a separate coroutine maybe.
He explained it perfectly; he wants to insert messages into the rednet message queue on specific computers from Java.
OP: I'm not sure that this is possible without breaking the license (i.e., using classes that aren't in the API). Sorry.
808 posts
Posted 05 September 2013 - 12:08 PM
A peripheral would be the easiest way to go. One that can only be made in creative mode. And I believe a peripheral can check the ID of the computer it's on if you're worried about non-admins getting their hands on one of these somehow.
7 posts
Posted 06 September 2013 - 02:58 AM
Thanks, but license? Isn't there some sort of irony there? "don't abuse the software you're using to abuse software with"? or something? I'm really confused about this? Also, can't I just interact with the class prototypes I mean, dynamically or something?
Anyway, its a no-can-do on a peripheral, I need to make this something that is server side only, requiring no client mods, so it will still be FTB Ultimate compatible. (not requiring idiot users to cry about not understanding things :P/> ) Which is why I was attempting to push my messages through on the back end.
or maybe a peripheral can be server side only?
171 posts
Location
Eastern USA
Posted 12 September 2013 - 05:00 PM
Peripherals can be server side only. OpenPeripheral was when it was first released
130 posts
Posted 12 September 2013 - 09:41 PM
But OpenPeripheral didn't add any new blocks just registered existing blocks as peripherals.