Administrator's Toolkit VS plugin
修訂 | 1bbc1e7898722aa6ea2b805de5a49ee8a64d2e26 (tree) |
---|---|
時間 | 2019-08-26 07:33:35 |
作者 | melchior <melchior@user...> |
Commiter | melchior |
added configurable admin voice,
edited readme file,
minor version update
@@ -43,12 +43,18 @@ namespace AdminToolkit | ||
43 | 43 | /// <value>The autobackup.</value> |
44 | 44 | public bool Autobackup { get; set; } |
45 | 45 | |
46 | + /// <summary> | |
47 | + /// Admins get special underlined text chats. Distinctive! | |
48 | + /// </summary> | |
49 | + /// <value>The booming voice.</value> | |
50 | + public bool BoomingVoice { get; set; } | |
46 | 51 | |
47 | 52 | public AdminModConfig( ) |
48 | 53 | { |
49 | 54 | this.PlayerRoleRestrain = "suvisitor"; |
50 | 55 | this.PlayerRoleNormal = "suplayer"; |
51 | 56 | this.RuleRoleChangerEnabled = false; |
57 | + this.BoomingVoice = false; | |
52 | 58 | |
53 | 59 | this.BackupDelay = new TimeSpan(4, 0, 0); |
54 | 60 | this.BackupCount = 6; |
@@ -85,6 +85,7 @@ | ||
85 | 85 | <CopyToOutputDirectory>Always</CopyToOutputDirectory> |
86 | 86 | </None> |
87 | 87 | <None Include="LICENSE.txt" /> |
88 | + <None Include="readme.md" /> | |
88 | 89 | </ItemGroup> |
89 | 90 | <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> |
90 | 91 | </Project> |
\ No newline at end of file |
@@ -94,7 +94,11 @@ namespace AdminToolkit | ||
94 | 94 | this.ServerAPI.RegisterCommand(new AdminListingCommand(this.ServerAPI) ); |
95 | 95 | this.ServerAPI.RegisterCommand(new BackupCycleCommand(this.ServerAPI) ); |
96 | 96 | |
97 | - this.ServerAPI.Event.PlayerChat += BoomingVoiceOfAuthority; | |
97 | + if (CachedConfiguration.BoomingVoice) { | |
98 | + this.ServerAPI.Event.PlayerChat += BoomingVoiceOfAuthority; | |
99 | + } | |
100 | + | |
101 | + | |
98 | 102 | this.ServerAPI.Event.ServerRunPhase(EnumServerRunPhase.Shutdown, SaveConfigSettings); |
99 | 103 | } |
100 | 104 |
@@ -3,12 +3,12 @@ | ||
3 | 3 | "name": "Administrator's Toolkit mod", |
4 | 4 | "description" : "Provides misc. Admin functions;\n list admins, print & accept rules , auto-backup...", |
5 | 5 | "authors": ["Melchior", ], |
6 | - "version": "0.3.0", | |
6 | + "version": "0.3.1", | |
7 | 7 | "dependencies": { |
8 | 8 | "game": "1.10.0" |
9 | 9 | }, |
10 | 10 | "requiredonclient":false, |
11 | - "website": "http://nowebsite.nope" | |
11 | + "website": "https://osdn.net/users/melchior/pf/admintoolkit/" | |
12 | 12 | } |
13 | 13 | |
14 | 14 |
@@ -1,19 +1,22 @@ | ||
1 | 1 | |
2 | -Instructions for using the Administrator's Toolkit; | |
2 | +Instructions for using the Administrator's Toolkit (V0.3.0); | |
3 | +============================================================ | |
3 | 4 | |
4 | 5 | It provides the (server side only) commands: |
5 | 6 | |
6 | -/rules | |
7 | -/admins | |
8 | -/backups | |
7 | +* /rules | |
8 | +* /admins | |
9 | +* /backups | |
9 | 10 | |
10 | -=== RULES === | |
11 | +RULES | |
12 | +----- | |
11 | 13 | |
12 | -Server administrators should create a unicode (UTF-8) text file; | |
14 | + | |
15 | +Server administrators should create a unicode *(UTF-8)* text file; | |
13 | 16 | |
14 | 17 | (server config directory root): /Rules/rules_en.txt |
15 | 18 | |
16 | -Keep it small (1~2K) as it spools ONE-LINE-AT-A-TIME to players that have used the | |
19 | +Keep it small (1~2K) as it spools _ONE-LINE-AT-A-TIME_ to players that have used the | |
17 | 20 | '/rules' command. (CR/LF is acceptable - .NET supports either line endings) |
18 | 21 | |
19 | 22 | Any player can issue the '/rules accept' command to "Accept" whatever the rules mean; (it keeps track - they can only 'accept' once) |
@@ -22,22 +25,25 @@ This _CAN_ have an effect of changing the players role (IF the 'admintoolkit.jso | ||
22 | 25 | |
23 | 26 | See: '/ModConfig/admintoolkit.json' - |
24 | 27 | |
25 | - "PlayerRoleRestrain": "suvisitor", <<< This is the role they are 'demoted' to just-after joining; when the have *NOT* already accepted the rules. | |
26 | - "PlayerRoleNormal": "suplayer", <<< This is the role that a 'normal' player will be 'promoted' to, after using '/rules accept' | |
27 | - "RuleRoleChangerEnabled": false, <<< When 'true' players roles WILL Be CHANGED depending on IF they 'accepted' the rules (/rules just prints out the rules) | |
28 | +> "PlayerRoleRestrain": "suvisitor", <-- This is the role they are 'demoted' to just-after joining; when the have *NOT* already accepted the rules. | |
29 | +> "PlayerRoleNormal": "suplayer", <-- This is the role that a 'normal' player will be 'promoted' to, after using '/rules accept' | |
30 | +> "RuleRoleChangerEnabled": false, <-- When 'true' players roles WILL Be CHANGED depending on IF they 'accepted' the rules (/rules just prints out the rules) | |
28 | 31 | |
29 | 32 | All these roles must exist and use the 'code' name, any misconfiguration will prevent the command from working. (with error messages in the log...) |
30 | 33 | |
31 | -=== BACKUPS === | |
34 | +BACKUPS | |
35 | +------- | |
32 | 36 | |
33 | -An automatic call to the '/genbackup' command exists as a Administrator only ('controlserver' permission) function. | |
34 | 37 | |
38 | +An automatic call to the '/genbackup' command exists as a Administrator only ('controlserver' permission) function. | |
35 | 39 | By default it isn't automatically activated; |
36 | 40 | |
41 | + | |
37 | 42 | Manual triggering of the backup cycle with: |
38 | 43 | |
39 | 44 | '/backups enable' |
40 | 45 | |
46 | + | |
41 | 47 | And to stop the automatic backup process; |
42 | 48 | |
43 | 49 | '/backups disable' |
@@ -51,10 +57,12 @@ To alter the time delay: | ||
51 | 57 | |
52 | 58 | Sets the delay to 9 hours (and restarts the backup schedule IF its already active). |
53 | 59 | |
60 | + | |
54 | 61 | To inquire about the existing backups and when the last one was issued; |
55 | 62 | |
56 | 63 | '/backups stats' - will print out various information about when/if/how many, backups were made...if any. |
57 | 64 | |
65 | + | |
58 | 66 | The number of "old" backup files to keep (at least 4): |
59 | 67 | |
60 | 68 | '/backups count 10' |
@@ -62,19 +70,30 @@ The number of "old" backup files to keep (at least 4): | ||
62 | 70 | |
63 | 71 | See: '/ModConfig/admintoolkit.json' - |
64 | 72 | |
65 | - "BackupDelay": "04:00:00", <<< The time-span delay BETWEEN Starting a backup. In "HH:MM:SS" format, so to delay 3 Hours, 15 Minutes, 21 Seconds: "03:15:21" It is limited to a max of 500 HOURS. | |
66 | - "BackupCount": 6, <<< The count of backups; minimum of 4, max is uint. (billions...) to keep around. | |
67 | - "Autobackup": false <<< set to true if you want the server to automatically run the backup cycle UNATTENDED, without an admin issuing '/backups enable' | |
73 | +> "BackupDelay": "04:00:00", <-- The time-span delay BETWEEN Starting a backup. In "HH:MM:SS" format, so to delay 3 Hours, 15 Minutes, 21 Seconds: "03:15:21" It is limited to a max of 500 HOURS. | |
74 | +> "BackupCount": 6, <-- The count of backups; minimum of 4, max is uint. (billions...) to keep around. | |
75 | +> "Autobackup": false <-- set to true if you want the server to automatically run the backup cycle UNATTENDED, without an admin issuing '/backups enable' | |
68 | 76 | |
69 | 77 | |
70 | 78 | |
71 | 79 | Note; The 'admin' role needs to exist for internal use purposes, this mod will NOT function correctly without it. |
72 | 80 | |
73 | 81 | |
74 | -=== ADMINS === | |
82 | +ADMINS | |
83 | +------ | |
75 | 84 | |
76 | 85 | '/admins' |
77 | 86 | |
78 | 87 | Usable by anyone - it just prints a listing of all higher role(s) |
79 | -present (or not) on the server. | |
88 | +currently present (or not) on the server - offline admins also. | |
89 | + | |
90 | + | |
91 | + | |
92 | +BOOMING VOICE | |
93 | +------------- | |
94 | + | |
95 | +A special feature for admins; their text messages get underlined. | |
96 | + | |
97 | +edit file ('/ModConfig/admintoolkit.json' ) : | |
80 | 98 | |
99 | +> "BoomingVoice": true |