Zack Piispanen
05c127f20c
Add dumping of RestHandlers, to sorta maybe create a little documentation on a system we've never documented.
2015-04-04 01:40:30 -04:00
Lucas Nicodemus
cbce64f1eb
Remove more obsolete code; fix tab/space screwup in TSPlayer
2015-02-28 19:37:06 -07:00
Zack
68afd6fcc6
Make sure to write the correct number of bytes, as UTF8 can and most likely will be more than one byte per char.
...
Fixes #863
2015-02-22 16:07:59 -05:00
Zack
f8a513d9da
Change output of REST to UTF8, which is what Terraria uses behind the scenes. Also changed content type to include the encoding. Fixes #858
2015-02-21 19:00:57 -05:00
Zack
f9bf470b1d
Tick version and update copyright
2015-01-28 15:29:13 -05:00
Zack Piispanen
c29f01b959
Add new rest endpoint /v3/players/read to read the players inventory, armor, and dyes. Armor contains both armor and accessories, as well as vanity. Dyes contain all 8 dye slots. Closes #835
2014-09-09 04:03:31 -04:00
Zack
62108ecd63
Allow rest request handlers access to the request object itself, to allow the plugin more information on who is making the request. Refactored the args for Rest commands to just one delegate, that takes a RestRequestArgs which has verbs, params, request, and tokenData.
2014-08-23 16:08:18 -04:00
MarioE
1293b8a3f9
Merge pull request #828 from Ijwu/general-devel
...
Bugfix in /v2/world/butcher endpoint
2014-07-20 20:33:48 -04:00
Ijwu
5463adfce8
Bugfix in /v2/world/butcher endpoint
...
killfriendly parameter now does something.
2014-07-20 20:20:42 -04:00
Zack
fb451c6d49
Update license header for 2014
2014-07-10 21:48:33 -04:00
Zack
915e791406
Initial work to move all Server Side Character code to its own module.
2014-07-10 21:09:32 -04:00
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
811a98bb4c
Added Config option for Rest spam.
2013-10-01 01:06:41 -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
MarioE
e1531ab675
Overhauled permissions.
...
Overhauled permissions to use permission nodes, and separated some
permissions into smaller ones (such as cfg into tshock.cfg.maxspawns,
tshock.cfg.spawnrate, etc),
2013-09-23 18:53:36 -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
ef584c62d7
Added Application tokens that can never be deleted, and are loaded either by the command line arg, or the list in the config file. Other plugins can easily add their own tokens into the dictionary as well, however, I believe the config file approach works best for transparency to the user.
...
Currently, this is an extremely complex looking field in the config file now. I don't think we should add a placeholder tho as servers wouldn't realize they had a rest token there. Perhaps when we do a dump of the config file, someone can add the format for this field.
Closes #520
2013-09-17 18:44:58 -04:00
Zack Piispanen
b22457382e
remove unused using statements
2013-09-17 02:24:02 -04:00
Zack Piispanen
225668fcdd
Some small rest improvements. Use newest TServer binary.
2013-09-16 00:09:29 -04:00
Lucas Nicodemus
dd05c524ec
Merge branch 'master' into general-devel
2013-09-15 15:24:15 -06: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
abeddd4c07
Minor improvements.
2013-08-02 13:01:17 +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
4d95b5594e
-Added REST endpoint "/v2/token/destroy/all"
...
-Added command "/rest destroytokens", "/rest listusers"
2013-07-27 20:57:55 +02:00
CoderCow
d9ff9a6ac5
REST resolves the user's group on each request now.
2013-07-27 20:01:48 +02:00
CoderCow
125884cc4d
Fixed broken build due to last commit.
2013-07-26 00:28:49 +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
Scavenger3
074d3142dd
[Rest] Add support for jsonp
2012-11-25 22:26:01 +10: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