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

Admin API

Started by TNTeener, 25 March 2012 - 10:14 AM
TNTeener #1
Posted 25 March 2012 - 12:14 PM
Hello! I made "Admin API".

Functions
Spoiler* admin.ban() - Banning your computer.

* admin.kick() - Kick your computer.

* admin.getID() - Print your computer ID.

* admin.getLabel() - Print your computer label.

* admin.getCraftOSVersion() - Showing CraftOS Version.

How to install?

Copy folders and files in Attached zip to Computer Craft folder.
Wolvan #2
Posted 25 March 2012 - 01:16 PM
Is this for rednet? Or what?
Espen #3
Posted 25 March 2012 - 01:33 PM
No, it basically just wraps the native functions os.shutdown(), os.getComputerID(), os.getComputerLabel() and os.version().
And admin.ban() is basically just replacing the startup file, so that the computer shuts down automatically when you try to boot it.
So, not really an API with dedicated functionality, but rather some customized calls to native functions.
Also kick and ban are not initiated remotely, but locally.

@TNTeener:
Maybe you could implement these functions around a client/server architecture? This way the names of the functions would better match their intended purpose.
Wolvan #4
Posted 27 March 2012 - 05:26 PM
I could help with the remote system.
rick3333 #5
Posted 01 January 2013 - 09:09 PM
this is great for servers
Sammich Lord #6
Posted 01 January 2013 - 09:17 PM
this is great for servers
Wow, just wow. It is 2013 and you are bumping a thread from March 2012.
immibis #7
Posted 02 January 2013 - 08:03 PM
this is great for servers
Wow, just wow. It is 2013 and you are bumping a thread from March 2012.
A completely useless thread even.
AfterLifeLochie #8
Posted 02 January 2013 - 08:14 PM
Locked. For the love of sanity, please don't reply "Necromancer in the thread" or whatever - report it.