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");
Is is possible to lookup a computercraft instance via the id?
Started by prozacgod, Sep 03 2013 06:46 PM
9 replies to this topic
#1
Posted 03 September 2013 - 06:46 PM
#2
Posted 04 September 2013 - 07:29 AM
Use the rednet API. If you only want to queue events on the other computer, that's the easiest way.
#3
Posted 05 September 2013 - 12: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.
#4
Posted 05 September 2013 - 09: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.
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.
#5
Posted 05 September 2013 - 09:28 AM
Moved to Peripheral Help & Discussion.
#6
Posted 05 September 2013 - 10:44 AM
LBPHacker, on 05 September 2013 - 09:15 AM, said:
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.
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.
OP: I'm not sure that this is possible without breaking the license (i.e., using classes that aren't in the API). Sorry.
#7
Posted 05 September 2013 - 11:08 AM
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.
#8
Posted 06 September 2013 - 01: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
) Which is why I was attempting to push my messages through on the back end.
or maybe a peripheral can be server side only?
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
or maybe a peripheral can be server side only?
#9
Posted 12 September 2013 - 04:00 PM
Peripherals can be server side only. OpenPeripheral was when it was first released
#10
Posted 12 September 2013 - 08:41 PM
But OpenPeripheral didn't add any new blocks just registered existing blocks as peripherals.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











