zio fork 1.8.2b-zio13: no double space in console css_say/css_asay/css_psay
The message is taken from the first space in the command string, so it starts with a space; the player paths trimmed it, the console paths didn't.
This commit is contained in:
parent
395e513f44
commit
bbb72757e7
2 changed files with 4 additions and 4 deletions
|
|
@ -22,7 +22,7 @@ public partial class CS2_SimpleAdmin : BasePlugin, IPluginConfig<CS2_SimpleAdmin
|
||||||
public override string ModuleName => "CS2-SimpleAdmin" + (Helper.IsDebugBuild ? " (DEBUG)" : " (RELEASE)");
|
public override string ModuleName => "CS2-SimpleAdmin" + (Helper.IsDebugBuild ? " (DEBUG)" : " (RELEASE)");
|
||||||
public override string ModuleDescription => "Simple admin plugin for Counter-Strike 2 :)";
|
public override string ModuleDescription => "Simple admin plugin for Counter-Strike 2 :)";
|
||||||
public override string ModuleAuthor => "daffyy";
|
public override string ModuleAuthor => "daffyy";
|
||||||
public override string ModuleVersion => "1.8.2b-zio12";
|
public override string ModuleVersion => "1.8.2b-zio13";
|
||||||
|
|
||||||
public override void Load(bool hotReload)
|
public override void Load(bool hotReload)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ public partial class CS2_SimpleAdmin
|
||||||
if (_localizer == null) continue;
|
if (_localizer == null) continue;
|
||||||
// zio: players get ">[STAFF][RANK] name: message", like @ in team chat.
|
// zio: players get ">[STAFF][RANK] name: message", like @ in team chat.
|
||||||
player.PrintToChat(caller == null
|
player.PrintToChat(caller == null
|
||||||
? _localizer["sa_adminchat_template_admin", _localizer["sa_console"], utf8String]
|
? _localizer["sa_adminchat_template_admin", _localizer["sa_console"], utf8String.Trim()]
|
||||||
: StaffChatMessage(caller, utf8String.Trim()));
|
: StaffChatMessage(caller, utf8String.Trim()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -101,7 +101,7 @@ public partial class CS2_SimpleAdmin
|
||||||
{
|
{
|
||||||
player.SendLocalizedMessage(_localizer,
|
player.SendLocalizedMessage(_localizer,
|
||||||
"sa_adminsay_prefix",
|
"sa_adminsay_prefix",
|
||||||
utf8String.ReplaceColorTags());
|
utf8String.Trim().ReplaceColorTags()); // zio: Trim, the message starts with the space after the command
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -131,7 +131,7 @@ public partial class CS2_SimpleAdmin
|
||||||
// zio: from a player, "(PM) [RANK] name: message".
|
// zio: from a player, "(PM) [RANK] name: message".
|
||||||
var rank = caller == null ? null : Helper.GetStaffRankTag(caller);
|
var rank = caller == null ? null : Helper.GetStaffRankTag(caller);
|
||||||
var line = caller == null || _localizer == null
|
var line = caller == null || _localizer == null
|
||||||
? $"({callerName}) {utf8String}".ReplaceColorTags()
|
? $"({callerName}) {utf8String.Trim()}".ReplaceColorTags()
|
||||||
: rank == null
|
: rank == null
|
||||||
? _localizer["sa_psay_template_norank", callerName, utf8String.Trim()]
|
? _localizer["sa_psay_template_norank", callerName, utf8String.Trim()]
|
||||||
: _localizer["sa_psay_template", rank, callerName, utf8String.Trim()];
|
: _localizer["sa_psay_template", rank, callerName, utf8String.Trim()];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue