Commit graph

1024 commits

Author SHA1 Message Date
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
Lucas Nicodemus
1328d71fdc Merge pull request #1317 from DogooFalchion/motd
Update MotD file parsing to convert color formats into smart text.
2016-10-23 19:27:52 -06:00
Lucas Nicodemus
6344051678
Change verbiage slightly on some /uploadssc messages 2016-10-23 19:02:44 -06:00
Hussein Farran
7d323f253a Merge pull request #1321 from DogooFalchion/ssc_join_inv
Enable user to upload their data from when they join as SSC
2016-10-23 20:58:40 -04:00
DogooFalchion
49a0cc0cc5 Add permission for uploading other's SSC data. Allow this to run from console. Allow command to upload remote user's data. 2016-10-23 19:59:57 -04:00
DogooFalchion
f1ce158efd Implement logic to store the data of a player when they join, and allow for a command to be run that will upload that data in place of their existing SSC data. 2016-10-23 18:11:44 -04:00
Lucas Nicodemus
28cd87cea0
Add 'stop' command alias for 'off' and 'exit' 2016-10-23 04:38:25 -06:00
Lucas Nicodemus
c905a086d1
Remove commented out "updateplugins" command that does nothing. 2016-10-23 04:34:26 -06:00
DogooFalchion
31794b6a27 ShowFileToUser shouldn't assume the file is in the TShock folder. Use the file path variables where we can. Use smart text instead of removing color parsing. 2016-10-22 19:01:27 -04:00
DogooFalchion
6242a54603 Update references to MOTD to point to the variable, instead of having magic strings. 2016-10-22 17:37:00 -04:00
Rodrigo
78a4185152 Merge pull request #1312 from Simon311/general-devel
Add /accountinfo, fix offline bans exploit, fix #1309 more
2016-10-18 18:59:13 +01:00
Simon
186bb70186 Add /accountinfo, fix offline bans exploit, fix #1309 more 2016-10-18 09:50:10 +03:00
Adilson Carvalho
49b4effe74 Changed year to 2016 on all GPL headers 2016-10-16 17:06:02 -02:00
Simon
60a8362e27 Add ToLower() back 2016-10-16 12:42:05 +03:00