Commit graph

75 commits

Author SHA1 Message Date
Laurens de Voogd
7c7f6007b7 Changed version to serverversion 2014-06-25 00:28:51 +02:00
Laurens de Voogd
28fd3bbc56 Removed the space between tshock and version
Because Endimmion told me to
2014-06-25 00:27:03 +02:00
Laurens de Voogd
bf60e34b18 Added TShock version 2014-06-25 00:24:20 +02:00
Laurens de Voogd
59ebe35650 Added server version 2014-06-17 17:37:53 +02:00
MarioE
8c4401219c Fix /status if using old REST model 2013-11-11 11:50:11 -05:00
Zack Piispanen
ec9cb09cd8 REST status or v2/server/status now checks for a permission to display ips to the caller. The only way to get this enabled is to use securetokenendpoint config option.
Refactored a tsplayer method.
2013-10-19 22:13:09 -04:00
Zack Piispanen
e246183108 Add prefix, suffix, color to group command.
Fix stupid chat color getter returning the hex color.
2013-10-02 17:47:16 -04:00
Zidonuke Ghost
0d351778a7 Initial server side character system implementation. 2013-10-01 06:22:08 -04:00
Zidonuke Ghost
b2a8198bb1 Client UUID Implementation: Bans and User Auth.
Send ServerSideCharacter flag if set in WorldInfo.
2013-10-01 04:35:49 -04:00
Zack Piispanen
038b2c027d Added Registered field to user db.
Set all those time based fields to use UtcNow, sortable
2013-09-30 20:32:43 -04:00
Zack Piispanen
856def83b3 Added basic framework for allowing for ban durations and banning admin.
Added BanningUser, Date(of ban), and Expiration to the db
On join, Expiration is checked, if ban is expired we remove it and the user is allowed on.
When running the ban command, your UAN is used as the banning user, and the date is that moment, with no expiration.
#531
2013-09-22 16:04:12 -04:00
Zack Piispanen
7c0bcceb9f Added LastAccessed time field and KnownIPs field to the user database. This resulted in some changes everywhere, such as new logic with default groups. Apparently, somehow, the ip based stuff worked even though no ips were set to properly grab the user group. The wrong group was being assigned to new users resulting in a player with 0 permissions. This is now fixed. 2013-09-21 20:57:14 -04:00
Zack Piispanen
ba42fb08df Removed ip address from users, as well as changed /user add syntax to be '/user add username password group' instead of colon bullshit. 2013-09-21 17:11:22 -04:00
Zack Piispanen
225668fcdd Some small rest improvements. Use newest TServer binary. 2013-09-16 00:09:29 -04:00
Lucas Nicodemus
ae7ab5f234 Updated copyright information to point to 2013. 2013-08-22 21:51:17 -06:00
Lucas Nicodemus
9470e20423 Line ending normalization to CRLF (Windows) 2013-08-22 21:17:32 -06:00
CoderCow
f8fbe9b5da Added config setting "RestUseNewPermissionModel" to allow switching between the REST permission models for backward compatibility. 2013-08-02 13:01:22 +02:00
CoderCow
0f34aa03e8 Moved all new REST endpoints to "/v3"as "/v2" was incompatible. 2013-08-02 13:01:12 +02:00
CoderCow
9a40c81b49 Fixed all REST endpoints to use RestObjects instead of Dictionaries. 2013-08-02 13:01:06 +02:00
CoderCow
d9ff9a6ac5 REST resolves the user's group on each request now. 2013-07-27 20:01:48 +02:00
CoderCow
72939c8876 Split REST permissions from Permissions into RestPermissions class. 2013-07-26 00:20:45 +02:00
CoderCow
580010c478 -Added "/v2/server/rules" and "/v2/server/motd" endpoints.
-Minor REST fixes.
2013-07-25 23:58:53 +02:00
CoderCow
aebc21c20a Minor REST improvements. 2013-07-25 23:37:29 +02:00
CoderCow
0ea83746cf -Added REST per-endpoint permissions.
-Added REST endpoint "/v2/server/restart".
-Added REST endpoint "/v2/server/reload".
-Added REST endpoint "/v3/server/rawcmd", will output all returned lines as an array instead.
-Added "uptime", "serverpassword", "rules/ServerSideInventory" fields to REST endpoint "/v2/server/status".
-REST requests are now logged.
-Endpoint "/v2/server/rawcmd" does now check whether the user has the sufficient permission to execute the command.
-Fixed Config.EnableTokenEndpointAuthentication not working properly before.
-Removed obsolete "api" permission (only "restapi" now).
2013-07-25 19:52:12 +02:00
MarioE
53008daacb Fixed storing chat colors incorrectly, and prefix/suffix resets 2012-06-08 21:36:34 -04:00
Deathmax
c803edd8a8 Remove redundant servername config options 2012-05-30 10:05:40 +08:00
Lucas Nicodemus
d9a53cda30 REST & console window title report port correctly
Fixes #443
2012-05-26 11:59:31 -06:00
Lucas Nicodemus
8ecabb7f2e All TShock methods calling the obsolete ForceKick function now use the new one
Subnote: fixes an issue where players would be reported as kicked to the
ingame console.
2012-05-26 09:50:15 -06:00
Lucas Nicodemus
8d5cdf04a8 Update copyright to reflect actual year date. 2012-04-24 12:45:46 -06:00
stevenh
41dbd31aac Converted all files to LF line endings 2012-02-21 15:56:34 +00:00
stevenh
d34199b17d Refactored server stop and world save operations fixing race conditions so as to ensure operations always happen in a predicable order. This fixes output not appearing in the console / log for example. This adds TShock.Utils.StopServer method used by IGA, rcon and the RestAPI.
Fixed console title set not working

Optimised command line parsing

Made Utils a singleton to enforce the fact that only one copy should ever exist

Added name to /v2/user/read output as users can be found by id
2012-02-20 22:31:16 +00:00
stevenh
4c09e7b66f Potential fix for #390 fixing the return of group.Permissions listing permissions as negated permissions
Added TotalPermissions method to get the combined total permissions as used for HasPermissions
Added totalpermissions to output of /v2/group/read output in RestAPI
2012-02-20 10:58:46 +00:00
stevenh
dee2c1a9f4 Refactored output processing to always return RestObject's
Refactored method names to be consistent with function e.g. Off -> ServerOff

Added new endpoints:-
/v2/server/status - Status query including player and rules matching common query tool requirements such as qstat. The json returned uses native types e.g. int's where possible
/v2/groups/list - Lists groups
/v2/groups/read - Query group detail
/v2/groups/destroy - Remove a group
/v2/groups/create - Create a group
/v2/players/list - Lists players including basic details
/v2/users/create - Create a user
/v2/users/list - Lists users basic user details applying a filter if specified.

Refactored missing parameter and error handling to use common utility methods RestError, RestMissingParam which ensures consistency across all functions and protects against null object references

Removed maxplayers from /status to ensure 100% compatibility, this and more details can be found in the new end point /v2/server/status

Protected against null names in user/activelist

Refactored variable checks to use string.IsNullOrWhiteSpace where applicable to capture errors early in the RestAPI

Added the ability to location users by "id" matching the underlying API.

Refactored locating players, bans & users to utility methods to ensure consitency across the api and eliminate duplicate code making for easier maintainence

NOTE: Duplicate and invalid DB entries currently can still be made if the DB format hasn't been updated to with missing unique and not null constaints

Removed { RequiresToken = true } from RestCommand constructors as this is the default anyway.

Optimised function calls so that tests are processed sequentially avoiding unnessasary operations in failure cases

Cleaned up formatting ensuring consistent line endings, indentation and single line if layout

Fixed ServerCommand duplicate key issue for multi line returns, now uses a single "response" string with embeded newlines

Fixed PlayerKill output using verb instead of parameters for "from" option
2012-02-16 12:03:08 +00:00
Lucas Nicodemus
6cb6e19f23 REST endpoint /lists/bans is now /v2/lists/bans
Added REST endpoint /v2/lists/players - JSON list of players
Deprecated REST endpoint /lists/players
2012-02-09 22:43:54 -07:00
Lucas Nicodemus
454403d495 Added /lists/bans REST endpoint - Returns a JSON list of bans 2012-02-09 22:20:36 -07:00
Lucas Nicodemus
5cdd537ebd /v2/players/kick no longer 500s if a player name isn't specified.
Fixes #361
2012-02-09 21:48:37 -07:00
Lucas Nicodemus
ee20946cdd REST endpoint /v2/users/activelist now null checks and works with 0 players.
Fixes #362
2012-02-09 21:43:35 -07:00
k0rd
16b3e51b4b (REST) add max slots to /status 2012-02-08 00:56:45 -05:00
Darkvengance aka Sildaekar
550e6b3685 Removed deperecated Rest API endpoints and updated UserListV2 method 2012-01-31 04:50:20 -06:00
Lucas Nicodemus
e17f56fae0 Added new REST endpoints:
- /v2/world/save
 -- Saves the world
 - /v2/world/autosave/state/{bool}
 -- Changes the autosave state of the server

TSHOCKPLUGINS-12
2012-01-07 14:15:08 -07:00
Deathmax
9297f2ef0d Add REST endpoint
v2 users list - tab-delimited
2012-01-07 19:34:27 +08:00
Deathmax
714746ab6c TSHOCKPLUGINS-9 #close fixed Fixed.
Workaround for REST meteor null reference exception crash. Requires an initializer for genRand if using any WorldGen methods in the future.
2012-01-06 21:58:51 +08:00
Lucas Nicodemus
d8e92e5ed0 Fixed 'shank forgot how to assign variables to an array' error on several rest calls. 2012-01-02 22:52:23 -07:00
Lucas Nicodemus
e8acdb0b96 Fixing some silly mistakes. 2012-01-02 22:39:04 -07:00
Lucas Nicodemus
be29a2cfcf Merge branch 'general-devel' of github.com:TShock/TShock into general-devel 2012-01-02 22:15:08 -07:00
Lucas Nicodemus
b8e4dffd74 Add new REST endpoint:
- /v2/server/rawcmd

Takes parameters:
 - cmd

Commands have to start with /, some commands aren't written properly, and may not return any more output than a status code.
2012-01-02 22:14:30 -07:00
Zack Piispanen
f82f05064a Added stack count to /v2/player/read 2012-01-02 16:42:55 -05:00
Lucas Nicodemus
f04b9d7a6d Remove test commit 2012-01-02 02:12:45 -07:00
Lucas Nicodemus
a7cc75082e Test commit 2012-01-02 02:11:49 -07:00
Lucas Nicodemus
4f07567eeb Add REST endpoints:
- /v2/players/mute
 - /v2/players/unmute
2012-01-02 02:07:19 -07:00