Commit graph

58 commits

Author SHA1 Message Date
Chris
cde4cc5f04 Ban rewrite and various other adjustments 2020-11-26 17:20:19 +10:30
Chris
56de9f6684 Ban rewrite 2020-11-15 11:05:04 +10:30
Lucas Nicodemus
70dd72443d Update copyright to 2019 again
Fixes #1658, most likely.
2019-03-29 17:16:37 -07:00
Lucas Nicodemus
569b350cea Update to Pryaxis, 2018 part 2
If there's one thing I learned in this exercise, it's that letting
people add random python scripts to the repo like gpltext.py that
promise to be easier than find and replace is a bad idea.
2018-01-01 02:20:56 -07:00
Lucas Nicodemus
17d151b8f8 Move HasBanExpired to Bans.RemoveBanIfExpired().
The ban system needs a full rewrite anyway, but this move removes
something from Utils, puts it closer to its operating point, simplifies
the method, and clarifies what it actually does.
2017-12-29 08:32:45 -07:00
Lucas Nicodemus
903bd5bb75 Migrate AddBan2 calls to AddBan
No more deprecation warnings on this release #yolo
2017-12-26 20:05:52 -07:00
Lucas Nicodemus
718525904a Add remaining backbone for banning accounts (sort of)
Frontend still doesn't work properly. In particular:

1. Need a way to list bans by account name.
2. Need a way to unban by account name.
3. Really need a way to change the IP on a ban lol.

Ban system still needs to be be rebuilt fully, but at least this
doesn't necessarily character ban someone if you were going for an IP
ban.

Fixes #1412
2017-12-02 20:41:14 -07:00
Lucas Nicodemus
0edfc6834f Add technical infrastructure for adding account bans 2017-12-02 19:19:17 -07:00
White
c4a3a9fb67 Updated Copyright for 2017 2017-03-13 12:17:16 +10:30
White
3989f0e21a Ban.BanDateTime and Ban.ExpirationDateTime are now nullable, in case of bad bans.
Ban sorting now uses an IComparer<Ban> to do its dirty work.
2017-02-21 22:18:41 +10:30
White
3ec7cb1d09 Renamed Ban.DateTime to Ban.BanDateTime because System.DateTime is a thing
Ban.BanDateTime and Ban.ExpirationDateTime are now actually set
2017-02-21 21:42:50 +10:30
White
c3cffd1559 BanManager.cs now consistently uses tabs 2017-02-21 21:17:31 +10:30
White
dba89e45c8 Added sorting to ban retrieval.
Default retrieval sorts bans by the date they were added, from newest to oldest.
Progress on #1400
2017-02-21 16:40:59 +10:30
Lucas Nicodemus
678f6c7cf8
Update to Mintaka (thanks @enerdy) 2016-12-06 17:36:44 -07:00
Adilson Carvalho
49b4effe74 Changed year to 2016 on all GPL headers 2016-10-16 17:06:02 -02:00
Beau Hastings
c0771556fc Fixes #1116
Signed-off-by: Beau Hastings <beausy@gmail.com>
2015-10-07 11:42:20 -05:00
Tyler Watson
01486f7ba9 Fixed an issue preventing bans being added when a ban already existed
Fixes #1094
2015-08-21 22:58:52 +10:00
Lucas Nicodemus
d971db165c Remove several obsolete shims
No need to keep obsolete shims in for several versions of TShock
2015-02-28 20:15:56 -07:00
Lucas Nicodemus
cbce64f1eb Remove more obsolete code; fix tab/space screwup in TSPlayer 2015-02-28 19:37:06 -07:00
Lucas Nicodemus
04145a4aca Re-add EnsureExists signature to fix compat with old plugins
Fixes #862
2015-02-22 08:43:12 -07:00
Zack
f9bf470b1d Tick version and update copyright 2015-01-28 15:29:13 -05:00
Zack
fb451c6d49 Update license header for 2014 2014-07-10 21:48:33 -04:00
Zack
fee116c6df Update BanManager.cs
Fix uuid arg in constructor
2014-02-27 21:50:16 -05:00
MarioE
ebc36a5ada Add temp banning, remove /ban clear, fix temp ban check 2013-11-10 23:03:12 -05:00
Zack Piispanen
df5eb940bd Fix compat sigs ban method. 2013-10-01 19:02:21 -04:00
Zack Piispanen
931e65fd80 Fix bans. 2013-10-01 18:38:39 -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
b22457382e remove unused using statements 2013-09-17 02:24:02 -04:00
Lucas Nicodemus
ae7ab5f234 Updated copyright information to point to 2013. 2013-08-22 21:51:17 -06: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
41dbd31aac Converted all files to LF line endings 2012-02-21 15:56:34 +00:00
stevenh
2f7cb9f44e Added exception handling option to AddBan & Remove Ban
Fixed formatting of EnsureExists(table) block
2012-02-16 11:11:30 +00:00
stevenh
78cc7a6f75 Added the ability to delete a ban by name in the same way as a user 2012-02-13 22:38:04 +00:00
stevenh
0c13716b84 Removed TShock.Config.EnableBanOnUsernames check from GetBanByName so that it can be used internally for queries 2012-02-13 22:20:44 +00:00
Lucas Nicodemus
454403d495 Added /lists/bans REST endpoint - Returns a JSON list of bans 2012-02-09 22:20:36 -07:00
k0rd
7dcac918ec Added a more descriptive error message when database dlls are missing. 2012-01-20 18:45:53 -05:00
Lucas Nicodemus
bf9d0137f1 Added any missing license headers to all files 2012-01-01 03:06:48 -07:00
Lucas Nicodemus
902015b285 Remove flat file converter from ban system constructor 2012-01-01 02:56:57 -07:00
Lucas Nicodemus
c6abbfe4d2 ReSharper code reformat to match naming conventions and stuff 2011-12-30 14:38:04 -07: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
6f26cc0dc5 Fixed the query helper functions 2011-08-01 19:33:15 -04:00
Lycaonj
19df6bb009 Fixed incorrect parameter name in the Unban method (from @ip to @0) which was causing ban removals to fail. 2011-07-30 22:35:36 -05: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
3744e49592 Added a config option (default off) for banning by usernames. 2011-07-21 12:39:01 -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
77ed57a4bd PRIMARY KEY, thanks SQLite for being a FUCKING DICKBAG 2011-07-13 02:47:32 -06:00