Commit graph

837 commits

Author SHA1 Message Date
Lucas Nicodemus
9e91db9ea4 Removed force kick for attempting to use setup
On many servers, players are tricked into running the /auth or /setup
command to get them kicked. This is stupid. Since the system is disabled
anyway, we don't need to kick them.
2017-12-27 17:43:21 -07:00
Lucas Nicodemus
f79c6a2962 Move Utils.Kick to TSPlayer.Kick 2017-12-27 13:00:13 -07:00
Lucas Nicodemus
b613fdcda6 Remove Utils.ActivePlayers
Duplicated what an array already stored and told us, but added code and
was obscure. It predated TSPlayers existing.
2017-12-26 21:14:16 -07:00
Lucas Nicodemus
11920cde48 Move Utils.FindPlayer -> TSPlayer.FindByNameOrID.
This makes TShock more OOP like (get the matching players from the
player as opposed to getting the players from a random class that
shouldn't exist).
2017-12-26 20:53:00 -07:00
Lucas Nicodemus
8e5ee7d286 Renamed IgnoreActionsForClearingTrashCan to conform w/ changes
This just changes IgnoreActionsForClearingTrashCan to meet the
same naming scheme for the rest of the old ignore checks. For
consistency. Consistency is nice.
2017-12-20 17:33:18 -07:00
Lucas Nicodemus
4e186e7375 Replace TSPlayer.IgnoreActionsForDisabledArmor -> boolean
TSPlayer.IgnoreActionsForBannedArmor was useless because it only
stored the last armor/dye a player had. Replaced with a boolean.
2017-12-20 17:29:10 -07:00
Lucas Nicodemus
7efcfd055f Replace TSPlayer.IgnoreActionsForCheating w/ boolean
This replaces IgnoreActionsForCheating in TSPlayer with a new
IsDisabledForStackDetection field that tracks the same basic data.

The previous way we did this was storing a string as the "reason"
why a player was disabled for cheating, but it only stored the last
hacked item stack that caused the check to fail. Since we already
have OnSecondUpdate which notifies on _all_ items, we don't need
to store this info in such a useless way anyway. They'll find out
in one second what they need to remove in a more alarmist way.
2017-12-20 17:19:14 -07:00
Lucas Nicodemus
1ef28dfe0d Replace TSPlayer.IgnoreActionsForInventory => IsDisabledForSSC.
This is the first commit in a series to rewrite CheckIgnores()
into whatever its replacement becomes.

IgnoreActionsForInventory was probably used by the SSC system prior
to when we had in-game support for SSC (ergo, when we just checked
to make sure you had removed all items before joining and worked
our way up in inventory data to track it). I could be wrong about
this though.

Now, IsDisabledForSSC tracks only if a player is shut down due to
SSC, rather than a reason that gets broadcast.
2017-12-20 17:01:55 -07:00
Lucas Nicodemus
0afcf0d248 Merge remote-tracking branch 'origin/general-devel' into fragments 2017-12-17 00:45:02 -07:00
Lucas Nicodemus
b71458b293 Fix /setup not working with owner groups; update readme 2017-12-16 20:37:43 -07:00
Lucas Nicodemus
3f22c52698 Move StartInvasion() out of the TShock main class 2017-12-14 07:56:41 -07:00
Lucas Nicodemus
8451ef9fb7 Switch the "auth system" to "initial system" everywhere.
This is better verbiage. If you think about it, you never really
want the "authentication system" to shut off. Doesn't that mean
that the server doesn't authenticate people anymore?
2017-12-13 22:38:44 -07:00
Lucas Nicodemus
611fb6b418 Remove /restart command. Fixes #1454. 2017-12-11 15:45:42 -07:00
Lucas Nicodemus
2e64d65910 Modify call to Utils.Dump() from the server context to not stop 2017-12-09 16:09:53 -07:00
Lucas Nicodemus
aa2f040787 Change command /datadump to /dump-reference-data 2017-12-09 16:03:12 -07:00
Lucas Nicodemus
63179deaa5 Adds /dumpdata which dumps the permission table & ref data. 2017-12-09 15:54:51 -07:00
Edgar Luque
6589531868 Renamed TShockAPI.DB 'User' to 'UserAccount' 2017-12-08 01:38:15 +01:00
Lucas Nicodemus
0902d6f3f8
Merge branch 'general-devel' into ssc-force 2017-12-06 13:01:28 -07:00
Lucas Nicodemus
cdbc37b024 Allow /savessc to work on players that bypass ssc
Fixes #1506
2017-12-03 16:22:46 -07:00
Lucas Nicodemus
3204ef2a83 callerIsEffectiveRoot -> callerIsServerConsole in ban system
This code clarity improvement helps make the code base clearer.

Thanks @deadsurgeon42
2017-12-03 09:49:45 -07:00
Lucas Nicodemus
39733a116d Fix issue where temp bans were stored incorrectly
Bans were being stored as seconds, should be a DateTime in s format
with seconds added on to existing time.
2017-12-02 20:59:30 -07:00
Lucas Nicodemus
35c61e53f1 Remove some space left around 2017-12-02 20:45:55 -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
a429d706fa
Merge branch 'general-devel' into newer-bans 2017-12-02 18:57:15 -07:00
Lucas Nicodemus
d972f60fa0 Add /sudo command.
Usage: /sudo /command.
Works on the same basis as /su (requires tshock.su).

Replaces message that /su should be used for a one off command.
2017-12-02 17:17:20 -07:00
Lucas Nicodemus
0bbd128f13 Implement /su command & default group owner
/su elevates you to superadmin for 10 minutes.
Account creation instructions tell you to use the "owner" group.
If you fail to run a command but have the su permission, you're told
that you can override it.

Fixes #1505
2017-12-02 15:07:19 -07:00
Lucas Nicodemus
ec2a542564 Remove silly string join since snoons is right
> String.Join(" ", str1, str2) is far less clear than str1 + " " + str2
2017-12-01 23:27:51 -07:00
Lucas Nicodemus
d10c8d65f6 Removed minor comment
Turns out that ServerConsole gets a name if caller is unknown.
2017-12-01 23:20:34 -07:00
Lucas Nicodemus
9dee0aee7d Rewrote the /ban add sub command
/ban add now replaces add, addtemp, and addip.
New syntax: /ban add <target> [time] [reason]

Examples:
- /ban add Shank 10d Rewrote the ban system.
- /ban add Ash
- /ban add 127.0.0.1 5d Go work on homework.

Note that if you want to specify a reason and a permaban, you need
to use 0 (zero) as the duration.

Examples:
- /ban add Ash 0 Love ya.
- /ban add Shank 0 Hacking.

Closes #1510
2017-12-01 23:12:06 -07:00
koneko-nyan
6606c7a7b7 Merge branch 'general-devel' into patch-1 2017-10-13 09:30:08 +02:00
koneko-nyan
aaa84d1ba9 Add 'rename' sub-command to /region 2017-10-02 17:45:57 +02:00
ProfessorXZ
08e182f59e All GroupManager.RenameGroup() database calls are now done in a transaction
As pointed out by @hakusaro, in order to prevent any damage during the process all database calls need to be done in a transaction. Transactions allow us to rollback from a pending state in case something goes wrong.
2017-09-23 22:41:41 +02:00
ProfessorXZ
02806a2429 Added support for renaming groups. Fixes #1420 2017-09-21 10:51:37 +02:00
koneko-nyan
c8549db087 Update Commands.cs
(time % 1.0) * 60.0 can be equal to 59.8, then it gets rounded to undesirable 60 displayed in the time format
2017-09-19 21:00:15 +02:00
MarioE
ac8fe2a215 Remove netID handling of GiveItem, and provide a smaller overload 2017-07-15 13:32:35 -06:00
MarioE
9ad63c37a6 Fix /spawnmob not spawning negative IDs again. 2017-06-21 01:21:32 -04:00
MadMan2021
194522eaa0 Increased /butcher damage to defence fixes issue #1447 2017-05-11 23:27:56 +01:00
ZIT WANG
c161be102d Add displaying ids when sending error responses 2017-05-03 08:25:50 +08:00
ZIT WANG
f47c6505ab Add null check for English name 2017-04-22 07:34:59 +08:00
ZIT WANG
930607a142 Add Localization support
* Add EnglishLanguage type to store English texts
* Itemban now store English item name
* Command `/i` `/give` `/sm` `/tpnpc` can use both English and current language input
2017-04-21 21:58:37 +08:00
Lucas Nicodemus
2d14533172
Terraria 1.3.5 changes compile (NO GUARANTEES ON EXECUTING) 2017-04-19 18:21:34 -06:00
Lucas Nicodemus
2dee3edb3d
Replace more .names with .FullName or .Name respectively 2017-04-19 17:33:17 -06:00
Lucas Nicodemus
46c42536c9
Replace calls to Main.buffName to Lang.GetBuffName 2017-04-19 17:22:46 -06:00
White
c4a3a9fb67 Updated Copyright for 2017 2017-03-13 12:17:16 +10:30
White
51b796cf47 Updated the UpdateManager.
It now performs all its web requests asynchronously and does a better job of explaining errors it encounters without plastering red Exception messages on the console.
2017-01-06 13:30:24 +10:30
ProfessorXZ
75f639ee47 Fixes #1347 2016-12-18 13:30:16 +01:00
ProfessorXZ
7c8bf7712a Added TSPlayer.Logout() 2016-12-18 12:37:15 +01:00
White
739892a611 Added TSPlayer.KillPlayer() which uses NetMessage.SendPlayerDeath(...).
Changed /kill to use `TSPlayer.KillPlayer()`
2016-12-11 13:46:57 +10:30
Lucas Nicodemus
678f6c7cf8
Update to Mintaka (thanks @enerdy) 2016-12-06 17:36:44 -07:00
Zaicon Kiroshu
50d8b0db30 1.3.4.3 Update (API 1.26) 2016-11-19 17:05:08 -06:00