Commit graph

56 commits

Author SHA1 Message Date
CoderCow
b828299a1c -Improved group loading from the database:
--TShock will now attempt to load any available valid group data even if there are invalid records and will also report proper errors / warnings.
--"superadmin" is now a reserved group name.
--Groups with parents causing infinite parent loops, invaild parents, or parenting theirselfes will have their parent group reset.
--Double definitions of groups with the same name are no longer allowed.
--Group instances are now tried to be preserved instead of being recreated during a reload of the group data.

-Added command "/group parent" to get and set the parent of groups.
-REST Endpoint "/v2/groups/create" will no longer allow creating groups having theirselfes as parent.
-REST Endpoint "/v2/groups/update" will no longer allow setting a group's parent to theirself or setting a parent group resulting in an infinite parent loop.
-This commit should fix #482.
2013-08-02 13:00:45 +02:00
MarioE
5b032f277d Match the god damned existing tab format 2012-08-20 10:33:54 -04:00
MarioE
53008daacb Fixed storing chat colors incorrectly, and prefix/suffix resets 2012-06-08 21:36:34 -04:00
MarioE
b85bed52d2 That should be all of it 2012-06-04 21:28:47 -04:00
Lucas Nicodemus
8d5cdf04a8 Update copyright to reflect actual year date. 2012-04-24 12:45:46 -06:00
stevenh
b6b5a2f1ca Added compatibiliy shims for old method signatures without which existing compiled plugins will error with missing method ...
This fixes #410
2012-02-24 11:37:43 +00:00
stevenh
098363a9cc Fixed internal object and DB inconsitencies for modified default groups
Fixed console errors for failed parent dependencies of default groups that already exist caused by fb11729547 consistency fixes

Made GroupManager.groups readonly to discourage overwriting it. Could still do with better encapsulation to prevent consistency problems if modified externally.

Added UpdateGroup method to GroupManager

Refactored Group handling of permissions and chatcolor to prevent inconsistent data
Notably:-
* AddPermission now does the right thing when passed the string "!permission"
* Converted ChatColor from method to getter / setter

Added RemovePermission to Group

Refactored GroupManager Permissions handling to ensure consistent data between DB and internal objects

Removed redundent AddGroup method in preference to a default value on the main method

Correct some tabs vs spaces

Added ParentName helper to Group

Fixed inverted parameters to error "Invalid parent {0} for group {1}"
2012-02-16 11:23:39 +00:00
stevenh
fb11729547 Added IEnumerable support to GroupManager to facilitate RestAPI listing groups
Added optional exceptions parameter to AddGroup and DeleteGroup to faciliate RestAPI group manipulation. This changes the behaviour of these methods to throw an exception on error instead of returning an error string.
Corrected internal lists from being updated in failed DB updates in DeleteGroup and AddGroup
Added doc for chatcolor on AddGroup
2012-02-13 22:23:01 +00:00
Lucas Nicodemus
bf9d0137f1 Added any missing license headers to all files 2012-01-01 03:06:48 -07:00
Lucas Nicodemus
2ac5ea929b Remove yet another flat file converter from yet another constructor 2012-01-01 02:55:54 -07:00
Lucas Nicodemus
c6abbfe4d2 ReSharper code reformat to match naming conventions and stuff 2011-12-30 14:38:04 -07:00
Zidonuke
b9a8fdf891 Quick fixes 2011-12-29 02:16:45 -05:00
Zidonuke
b7d84d6855 Implemented guest group config and default group. 2011-12-29 00:38:22 -05:00
Natrim
aa0642c64a added some useful permissions
(canregister,canlogin,canchangepassword,canpartychat,cantalkinthird,candisplayplaying)
2011-12-28 10:00:46 +01:00
Zidonuke
8cf298ad85 Save player data on backups
Server Side Inventory security improvements, blocking trashcan and "banks" items
CovertCorruption is now more thorough.
PvP Modes, normal, always, disabled now configurable
Initial group prefix/suffix implementation
Range checks reworked, Killing ice blocks now ignored for ice rod.
Adding a NPC name to item banlist will block it from spawning
Added configs to disable snowballs and clown bombs from npcs.
2011-12-22 17:32:51 -05:00
Zidonuke
c06bf2fe2e Break off from older commands and systems, move to more recent configurations.
Cheating detection no longer kicks, instead uses new system to block actions, and notifies user to fix the issue instead.
2011-12-20 22:41:49 -05:00
Zidonuke
82fb69f9d4 Random Improvements and Fixes 2011-12-20 03:31:47 -05:00
Lucas Nicodemus
8514140ca7 As per High's complaining, holocaust against the Tools class (now Utils)
Plugin developers: You really need to change to reference this.
2011-12-01 23:24:02 -07:00
Zack Piispanen
56beeb446a Fixed modgroup to actually update the local( ram ) copies of the groups. Also set it up to properly delete from a group. 2011-11-26 00:28:46 -05:00
high
920fabaa7e Fixed TSDEV-117
Conflicts:

	TShockAPI/Properties/AssemblyInfo.cs
2011-09-03 15:16:36 -04:00
high
f90b530531 Parents now implemented correctly as a separate column.
Negate permissions now work again.
2011-08-17 17:19:56 -04:00
high
7e3a38c5c1 Typo 2011-08-08 19:59:37 -04:00
high
1a801b268c All managers now use querybuilder for creating tables to make for easy changes. 2011-08-03 19:55:23 -04:00
high
423a33325a Finished:
-sqlite altering
-implemented mysql
Todo:
-Merge SqlTableCreator into the querybuilders or make it static
-Make all the managers use the querybuilder for making tables. (See GroupManager.cs for an example)
-Implement more datatypes (see TypesAsStrings in IQueryBuilder.cs)
2011-08-03 18:37:42 -04:00
high
4bab43466c Adding classes to make querying between sqlite/mysql easier 2011-08-03 02:52:44 -04:00
Twitchy
f95fdf5085 Fix group inheritance 2011-08-01 16:46:42 +12:00
Deathmax
75f3d3c046 out of range check when reading chat colors. 2011-07-31 22:56:44 +08:00
Deathmax
279b8ef9e2 Load chat colours into groups. 2011-07-31 22:09:29 +08:00
Twitchy
5ff8680ccb Adds chat colors to player groups. 2011-07-31 23:36:21 +12:00
Twitchy
0438d0ffce Fix OrderBy removal 2011-07-31 16:11:58 +12:00
Twitchy
917865cab5 OrderBy... Bye bye. DBTool fixes 2011-07-29 12:21:28 +12:00
Lucas Nicodemus
37146adb4c Resharper code cleanup, including:
- Optimized using statements
 - Removal of redundant code
2011-07-26 23:37:06 -06:00
high
57a2d082ef Added query function for easier queries.
Normalized method names in GroupManager.cs
2011-07-24 10:12:18 -04:00
Lucas Nicodemus
5c59ebf71a Merge remote-tracking branch 'remotes/origin/general-devel'
Conflicts:
	TShockAPI/Commands.cs
	TShockAPI/DB/GroupManager.cs
	TShockAPI/DB/RegionManager.cs
	TShockAPI/Properties/AssemblyInfo.cs
	Terraria.sln
2011-07-23 17:25:20 -06:00
high
a49269cc0c Create save path first 2011-07-23 00:50:30 -04:00
Zack Piispanen
727ae2322b Added new commands to allow users in game to create, delete, modify groups.
Added new methods to create, delete, modify groups.

Uhhh....dunno why RegionManager.cs was conflicted.

Added permission for accessing group commands
2011-07-22 23:14:56 -04:00
high
85dac355be Cleaned up the adding of default groups 2011-07-22 21:46:14 -04:00
Zack Piispanen
987d9e793b fixed useless query for being useless. Added in code that checks the list of groups and not the db itself.
TSDEV-49
2011-07-22 17:33:59 -04:00
Lucas Nicodemus
91c1430f3c Not using OrderBy as much anymore. 2011-07-21 15:03:52 -06:00
Lucas Nicodemus
b98614946d Changed every instance of Main.worldID.ToString() to Main.worldName. You broke backwards compatibility with all other warp and region files by doing that. 2011-07-21 15:03:15 -06:00
Zack Piispanen
3ce6de9e20 Merge branch 'master' of github.com:TShock/TShock
Conflicts:
	TShockAPI/Group.cs
	TShockAPI/TShock.cs
2011-07-20 20:58:26 -04:00
Zack Piispanen
cfcc0e7276 groups work, with inheritance, still need to remove order by 2011-07-20 20:55:49 -04:00
Lucas Nicodemus
8fa45f4aae Attempting to fix permissions 2011-07-19 20:36:15 -06:00
Zack Piispanen
f08b94c8f8 Bans and Groups now convert from txt to db items.
Just put bans.txt and groups.txt in the tShock folder( where they already exist i believe ) and run the server.  It moves the files to tShock/old_configs in case you want to keep them.
2011-07-17 15:17:28 -04:00
Lucas Nicodemus
e684ecd289 Added vip group 2011-07-16 21:58:48 -06:00
Lucas Nicodemus
4ca7a9aeec Default permissions are fixed 2011-07-16 18:49:26 -06:00
Lucas Nicodemus
77ed57a4bd PRIMARY KEY, thanks SQLite for being a FUCKING DICKBAG 2011-07-13 02:47:32 -06:00
Lucas Nicodemus
2608ca0779 We want PRIMARY keys, not UNIQUE keys, because UNIQUE without PRIMARY means absolute BULLSHIT. 2011-07-13 02:42:06 -06:00
Lucas Nicodemus
cbc6bd2751 Fixed a lot of database stuff. 2011-07-12 21:30:55 -06:00
Twitchy
eda5cfc10d Fixes SQL not working correctly. and saving 2011-07-12 22:47:36 +12:00