Commit graph

3730 commits

Author SHA1 Message Date
Lucas Nicodemus
09fe254f17 Change TSPlayer.FindByNameOrID to keep searching
Currently, the TSPlayer FindbyNameOrID method aborts if it finds an
"exact match" based on this criteria:

1. If the player ID is on the server, it must be the thing we're looking
   for. Therefore, return that.

2. If the case sensitive "exact match" is on the server that isn't an
   ID, that must be what we're looking for. Therefore, return that.

3. Just yolo and downcase everything and return any number of matching
   players next.

This commit changes the behavior because some players have been joining
servers with ambiguous names, like `1`. In the current system, this
player is difficult to query because they're an "ID" and therefore an
exact match will be returned even if a player name exists that matches
the criteria.

This also alleviates the issue of a case exact match falling down the
same trap. It's ambiguous enough in all of these situations that an
admin should just be using a player ID instead.`
2021-05-25 18:39:56 -07:00
quake1337
5b9e1dc871 Add WorldInfo broadcast in /worldmode 2021-05-24 10:41:18 +02:00
Quinci135
5ac48019ab
Change happyFunTorchTime from true to false
This is set to true when the player obtains the torch god's favor item
2021-05-23 17:11:06 -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
6856c867dd Use correct value to read usingBiomeTorches in GDH
This fixes a ridiculous typo in GetDataHandlers where we were setting
the UsingBiomeTorches flag based on having unlocked biome torches,
rather than actually being used. Thanks to @Arthri for the tip!
2021-05-23 03:21:56 -07:00
Lucas Nicodemus
914cdb1046
Merge pull request from GHSA-q776-cv3j-4q6m
Patch SendTileRectangle mass-griefing exploit
2021-05-22 10:55:31 -07:00
Lucas Nicodemus
9ff3036469 Version tick: 4.5.3 2021-05-22 10:54:47 -07:00
quake1337
b1820c1516 Fix spaces lol 2021-05-21 13:54:40 +02:00
quake1337
817dfe26fc Address feedback from @hakusaro about style & documentation 2021-05-21 13:13:06 +02:00
quake1337
658c714ac5 Remove old UpdateServerTileState call, as the new one supersedes it 2021-05-21 12:13:06 +02:00
quake1337
383052cb5e
Merge branch 'general-devel' into advisory-fix-1 2021-05-21 10:39:01 +02: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
quake1337
c6dad11a1c Initial patch for advisory-1.
- Remove unused fields from NetTile
- Apply data from packets selectively based on approving context.
2021-05-21 09:53:33 +02:00
Lucas Nicodemus
c9b13b493e Merge branch 'general-devel' of github.com:Pryaxis/TShock into general-devel 2021-05-20 03:32:24 -07:00
Lucas Nicodemus
39147355c1 Automatically back up the world by default
Backups run every 10 minutes for up to 4 hours of backups to prevent
against accidental data loss.
2021-05-20 03:31:37 -07:00
Lucas Nicodemus
544ba45f50
Merge pull request #2300 from moisterrific/patch-21
Change max buff limit from short to int
2021-05-20 02:40:09 -07:00
Lucas Nicodemus
94939bc050
Merge branch 'general-devel' into patch-21 2021-05-20 01:57:39 -07:00
Lucas Nicodemus
7d5901c350
Merge branch 'general-devel' into patch-22 2021-05-20 01:52:35 -07:00
Lucas Nicodemus
a3b98b5406
Merge pull request #2306 from Pryaxis/logs
Change logpath to `./tshock/logs` by default
2021-05-20 01:49:10 -07:00
Chris
6fee39ed68
Merge branch 'general-devel' into patch-22 2021-05-19 17:43:17 +09:30
stacey
62d15cf445
Add tele potion and conch perms to default 2021-05-16 20:57:26 -04:00
stacey
a1ddea4f59
Update /gbuff with the same changes
totally forgot this existed
2021-05-14 13:44:37 -04:00
stacey
a2804b6c89
Update how it looks 2021-05-14 13:23:42 -04:00
stacey
a9e8cd7ca5
update default motd to use %specifier 2021-05-14 13:00:56 -04:00
stacey
e0c9f45038
Add %specifier% to SendFileTextAsMessage 2021-05-14 12:58:16 -04:00
Chris
b754f142a1 Change logpath to ./tshock/logs by default 2021-05-14 22:08:32 +09:30
stacey
44d7bf04f8
Merge branch 'general-devel' into patch-21 2021-05-14 07:51:12 -04:00
stacey
d2a0a539f4
fix error msg 2021-05-12 22:08:10 -04:00
stacey
306e4d1ab4
fix typo
sigh
2021-05-12 21:45:06 -04:00
stacey
dacc20e9c3
Update buff command HelpText
More properly explain the command functionality
2021-05-12 21:40:44 -04:00
stacey
68c650f4fa
More minor fixes
Reverted default (when no duration is specified) buff duration to 60s, added formula instead of hard coding max duration as per Quake's recommendation, made error message more self-explanatory
2021-05-12 21:36:26 -04:00
stacey
0eadfaba52
Minor fixes 2021-05-12 15:48:38 -04:00
stacey
0d686ea80f
Change duration to actual max value in seconds 2021-05-12 15:39:11 -04:00
stacey
9418e4304f
Change max buff limit from short to int 2021-05-12 13:47:27 -04:00
stacey
b98c6aa282
fix typo
oops sorry
2021-05-12 12:35:15 -04:00
stacey
e7807f6378
improved the code 2021-05-12 12:18:53 -04:00
stacey
10318f032a
Improve HealOtherPlayer 0.2 check
Since this check is based on damage and healing amount is based on 20% of the damage, it makes more sense to skip the check if the player has ignoredamagecap (trustedadmin and higher).
2021-05-12 12:09:11 -04:00
James Puleo
b3cf5f4e43
Implement additional teleport permissions.
This adds the follows permissions to the following items:
- tshock.tp.tppotion:   Teleportation Potion
- tshock.tp.magicconch:  Magic Conch
- tshock.tp.demonconch: Demon Conch
2021-05-11 14:17:36 -04:00
Chris
d92bfc0f65
Merge branch 'general-devel' into rest-permissions 2021-04-22 16:52:55 +09:30
Chris
76ea1760fd
Merge branch 'general-devel' into pscheck 2021-04-22 13:16:40 +09:30
Lucas Nicodemus
6bb4230bc3 Remove /ungodme
With 1.4.2.2, we no longer need to offer an escape hatch due to the
underlying bug involving godmode being permanently applied to local
players now having been fixed.
2021-04-21 20:16:57 -07:00
Lucas Nicodemus
4668ab86a0 Version tick: 4.5.2 2021-04-21 19:58:36 -07:00
Lucas Nicodemus
f8c265d74c Version tick: 4.5.1 2021-04-19 10:54:12 -07:00
Chris
01fc41968d Refactor wallow command & update changelog 2021-04-19 22:04:41 +09:30
Chris
0b890f9507 Merge branch 'general-devel' of https://github.com/Pryaxis/TShock into general-devel 2021-04-19 21:48:37 +09:30
Chris
e80f0bfda5 Add ban ticket ID to ban messages 2021-04-19 21:48:34 +09:30
quake1337
663041e8b0 Fix /r against offline players.
- Offline players will no longer be valid /r targets.
2021-04-17 10:11:49 +02:00
quake1337
3e40ade0ca Added feedback to /ungodme
- The command now tells the user that the operation succeeded.
  Previously it would be a silent command, potentially leaving the user
  wondering if it worked
2021-04-16 10:18:40 +02:00
quake1337
78b72df79d Address JourneyMode Godmode issues
- Add /ungodme to allow unstucking godmode for involuntarily godmodded
  characters
- Warn player about disabling Godmode before disconnecting
- Minor change to command format to reduce code copypaste.
2021-04-16 10:14:46 +02:00
quake1337
4a28d6779f Update casing & remove using static
- god_power -> godPower
- Remove using static on GameContent.CreativePowers, instead fully
  qualify the nested class.
2021-04-16 07:01:11 +02:00