mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-02-23 12:07:31 +00:00
1.3.4a
- Minor changes - Escape kick reason @poggu suggestion - Auto-updater for config - Using UTC time - Added expiring IP bans after x days (`ExpireOldIpBans` in config => value = days, 0 = disabled) - Added exception message to database error - Fixed? ungag/unmute/unsilence commands - Updated css version to `178` - Changed `css_adminhelp` command to use new file `admin_help.txt` as output
This commit is contained in:
@@ -55,8 +55,9 @@ namespace CS2_SimpleAdmin
|
||||
[RequiresPermissions("@css/generic")]
|
||||
public void OnAdminHelpCommand(CCSPlayerController? caller, CommandInfo command)
|
||||
{
|
||||
if (caller == null || !caller.IsValid) return;
|
||||
//if (caller == null || !caller.IsValid) return;
|
||||
|
||||
/*
|
||||
using (new WithTemporaryCulture(caller.GetLanguage()))
|
||||
{
|
||||
var splitMessage = _localizer!["sa_adminhelp"].ToString().Split(new[] { "\r\n", "\r", "\n" }, StringSplitOptions.None);
|
||||
@@ -65,6 +66,20 @@ namespace CS2_SimpleAdmin
|
||||
{
|
||||
caller.PrintToChat(Helper.ReplaceTags($" {line}"));
|
||||
}
|
||||
} */
|
||||
|
||||
string[] lines = File.ReadAllLines(ModuleDirectory + "/admin_help.txt");
|
||||
|
||||
foreach (string line in lines)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(line))
|
||||
{
|
||||
command.ReplyToCommand(" ");
|
||||
}
|
||||
else
|
||||
{
|
||||
command.ReplyToCommand(StringExtensions.ReplaceColorTags(line));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user