Commit graph

447 commits

Author SHA1 Message Date
Killia0
154bee58f1 Typo fixes on comments/strings
My first PR contribution to TShock is spellcheck huh, frankly I don't know why but hey I could spare the time for this and caught some stuff.
2021-07-16 14:53:37 -04:00
Lucas Nicodemus
4d46e58865 Prevent users from removing default guest group
The default guest group is critical and shouldn't be removed without
either TShock doing something like automatically recreating it if it
doesn't exist, or not having a huge problem if it doesn't exist.

I chose to take the easiest path, preventing users from removing it. In
theory the message gives enough context to imply "okay, go change the
group now."

This should be a relatively small edge case but I wanted to resolve it
while I was here.
2021-06-13 01:09:03 -07:00
Quinci135
5581bf5e45 Fix torchflags
UsingBiomeTorches: Whether or not the player has the torchgod biometorches ability enabled
HappyFunTorchTime: Whether or not the player has fought the torchgod before (for logic that checks for torchgod spawning)
unlockedBiomeTorches: Whether or not the player has the torchgod biome torches ability unlocked
2021-05-23 04:48:01 -07:00
Lucas Nicodemus
68ae73ffef Warn players if bypass SSC permission is enabled
If a player has the tshock.ignore.ssc permission, odds are that they may
want to know that their data isn't being saved or not. This change
allows users to be notified if they have SSC data stored in the DB but
they aren't having it loaded due to the aforementioned permission.

This permission causes great confusion, but we can't really change it
because we would break existing setups. This is an easy change that
gives people a reason why they suddenly "have no items."

This new option can be turned off in the config file for SSC if it's not
desired.

This change also modifies some of the log messages so that it's clear
why the SSC save didn't occur for a given player.
2021-05-21 01:16:04 -07:00
stacey
62d15cf445
Add tele potion and conch perms to default 2021-05-16 20:57:26 -04:00
Chris
e80f0bfda5 Add ban ticket ID to ban messages 2021-04-19 21:48:34 +09:30
Luke
d0ce5746ea Fix mysql & sqlite ban manager migration during init
Tested with existing bans in both sqlite & mysql environments.
This is in addition to the syntax fix from earlier.
2021-04-11 21:18:37 +10:00
Lucas Nicodemus
78eab01904 Fix ban system conversion issue with MySQL
DeathCradle spotted a typo in the ban converter and identified that the
issue is likely because we used table_name in some, but not all, of the
conversion SQL.

Co-authored-by: DeathCradle <rt.luke.s@gmail.com>
2021-04-11 00:12:28 -07:00
Chris
9423febd0a Refactor for new configuration 2020-12-03 17:43:10 +10:30
Chris
ae8ab04e8a Change BanManager.Bans to a readonly dictionary
Entries to this dictionary should be added through `InsertBan` rather than directly to the dictionary
2020-12-03 14:25:38 +10:30
Chris
24a4ab885c Offload ban checking to BanManager
Remove ban immunity
2020-11-29 18:10:47 +10:30
Chris
af9957f8ec Refactoring based on suggestions 2020-11-29 16:18:09 +10:30
Chris
29170e62a6 Rename unique ID -> ticket number
Also get ban conversion to execute cleanly and clean up after itself
2020-11-29 15:17:49 +10:30
Chris
c71cf79125 Refactor 'Id' to 'TicketNumber' and extend the identifier model 2020-11-29 14:23:58 +10:30
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
Stealownz
8969ce4a94 Add Torch God's Favor to SSC
Closes #2031
2020-11-01 22:55:50 +08:00
ZakFahey
90f519a1c6 Overwrite the config if any new fields are missing 2020-08-01 10:13:04 -07:00
stacey
5b44c9dd84
Fix formatting...again 2020-06-13 10:41:02 -04:00
stacey
a345587bd0
Add spawnpets perm to trustedadmin & owner
Also fix a few formatting inconsistencies that was the result from editing on mobile
2020-06-12 19:18:44 -04:00
moisterrific
470da46511
Add new perms and move more perms to trustedadmin
Add new journey mode research perm and move all existing journey perms from owner to trustedadmin. Also added pylon tp to default and added /spawn perm to admin.
2020-06-06 00:28:21 -04:00
Patrikkk
f538ceb793 Adding EmojiHandler to handle an exploit. Adding sendemoji permission and checks.
I know, this is not something important, but I'm going through the new packets one by one and adding events developers can work with, patching exploits, and thought this could be a core permission.
2020-06-01 15:24:02 +02:00
Lucas Nicodemus
a0726ad8bb
Merge branch 'general-devel' into patch-7 2020-05-30 00:18:44 -07:00
Lucas Nicodemus
f82ab41a25
Add /sync command to alleviate door related sadness
Run /sync if your doors disappear. This will resync your local client
with the server state. For more information, please see the associated
changelog entry.
2020-05-29 21:04:48 -07:00
moisterrific
51d2d9af69
Fix error in previous change
there's no setdawn, made the mistake of looking at a prev commit instead of the most current version of permissions
2020-05-26 18:51:15 -04:00
moisterrific
2c384aaaeb
Add journey permissions to trustedadmin and owner
hope im doing this right lol
2020-05-26 17:17:01 -04:00
Lucas Nicodemus
0e711da8cc
Merge branch 'general-devel' into region-mysql 2020-05-25 00:40:08 -07:00
Zack
2b4faf4d9b
Update TShockAPI/DB/ResearchDatastore.cs
@hakusaro raised a solid point in Discord.

Co-authored-by: Lucas Nicodemus <shank@shanked.me>
2020-05-25 03:11:41 -04:00
Olink
df22a33132 Add some try/catch blocks around the sql commands. 2020-05-25 03:07:54 -04:00
Olink
56b695b80b Add initial support for Journey mode in SSC. 2020-05-25 02:24:03 -04:00
Patrikkk
5706eaf138 Fix SQL incompatibility.
This is the real fix for MySql8 compatibility, without breaking SQL.
This will not affect current databases, all that happens is that we actually escape all column names on the table creation query. This should be standarized along the whole query builder.
2020-05-24 02:02:50 +02:00
Patrikkk
e1da5aa7bc Missing backtick from RegionManager Group table.
Group is a reserved keyword in MySQL 8. Requires backtick.
Missed this from previous commit. Version 8 would error on table creation.
2020-05-20 20:25:41 +02:00
Lucas Nicodemus
35198647a1
Presumptively fix MySQL 8 compat
`Groups` is a reserved name in MySQL 8 and this should fix compat issues
with it.
2020-05-18 18:40:51 -07:00
鱼鱼
1ed95c737e pass compile; add void vault code 2020-05-17 21:38:47 +08:00
Lucas Nicodemus
70dd72443d Update copyright to 2019 again
Fixes #1658, most likely.
2019-03-29 17:16:37 -07:00
Enerdy
f5ccf925bd Logout players when their user account is removed 2018-10-15 14:33:32 +01:00
Ruby Rose
4df8a6f38f add another case to the exception message regex 2018-09-23 14:29:59 +03:00
Ivan
ec78a070a7 Move Region related code into a separate subsystem 2018-04-29 18:33:07 +02: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
332e6b2518 Remove Utils.GetGroup().
This method duplicates Groups.GetGroupByName().
2017-12-29 08:45:29 -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
Chris
cd27a981cb
Merge branch 'general-devel' into old-code 2017-12-28 01:55:22 +00:00
Lucas Nicodemus
7c1c88bc65 Remove residual evidence of noclip detection 2017-12-26 20:30:40 -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
70052d7dbb
Merge branch 'general-devel' into sql_improve 2017-12-09 21:05:16 -07:00
Lucas Nicodemus
bdabf020d2 tshock.admin.createdumps is now a default owner level permission 2017-12-09 15:58:42 -07:00
Ryozuki
1441895559
Merge branch 'general-devel' into sql_improve 2017-12-09 19:04:07 +01:00
Edgar Luque
4575792987 Formatted a bit better and moved SqlColumnException to SqlColumn.cs 2017-12-09 16:45:31 +01:00
Edgar Luque
6a6133f3f7 Add xml comments and DateTime datatype support for SQL 2017-12-09 11:35:31 +01:00
Edgar Luque
07da3d5f58 missed some more declarations 2017-12-08 01:48:08 +01:00