From: Dr. Jaska Date: Tue, 6 Jun 2023 19:44:56 +0000 (+0000) Subject: Rename muteban to chatban, left muteban aliases for chatban X-Git-Tag: xonotic-v0.8.6~26^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=cde1a828578994d75c4aebeb7beb4d2350688507;p=xonotic%2Fxonotic-data.pk3dir.git Rename muteban to chatban, left muteban aliases for chatban --- diff --git a/commands.cfg b/commands.cfg index ea4a41396..308cd0b8e 100644 --- a/commands.cfg +++ b/commands.cfg @@ -282,6 +282,8 @@ alias unmute "qc_cmd_sv unmute ${* ?}" // Unmute alias bans "qc_cmd_sv banlist ${* ?}" alias muteban "qc_cmd_sv mute ${* ?}" alias unmuteban "qc_cmd_sv unmute ${* ?}" +alias chatban "qc_cmd_sv mute ${* ?}" +alias unchatban "qc_cmd_sv unmute ${* ?}" @@ -297,7 +299,8 @@ alias voteban "qc_cmd_sv voteban ${* ?}" // Ban alias unvoteban "qc_cmd_sv unvoteban ${* ?}" // Remove an existing vote ban client // other aliases for muteban, playban and voteban lists -alias mutebans "g_muteban_list ${* ?}" +alias mutebans "g_chatban_list ${* ?}" +alias chatbans "g_chatban_list ${* ?}" alias playbans "g_playban_list ${* ?}" alias votebans "g_voteban_list ${* ?}" diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index c03766284..ef9c43f98 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -1192,7 +1192,7 @@ void ClientConnect(entity this) if (PlayerInList(this, autocvar_g_playban_list)) TRANSMUTE(Observer, this); - if (PlayerInList(this, autocvar_g_muteban_list)) // muteban + if (PlayerInList(this, autocvar_g_chatban_list)) // chatban CS(this).muted = true; MUTATOR_CALLHOOK(ClientConnect, this); diff --git a/qcsrc/server/command/banning.qc b/qcsrc/server/command/banning.qc index 933eb3c83..c29c47c0e 100644 --- a/qcsrc/server/command/banning.qc +++ b/qcsrc/server/command/banning.qc @@ -133,13 +133,13 @@ void BanCommand_mute(int request, int argc, string command) if (accepted > 0) { string theid = ""; - if(!PlayerInIPList(client, autocvar_g_muteban_list)) + if(!PlayerInIPList(client, autocvar_g_chatban_list)) theid = cons(theid, client.netaddress); - if(!PlayerInIDList(client, autocvar_g_muteban_list)) + if(!PlayerInIDList(client, autocvar_g_chatban_list)) theid = cons(theid, client.crypto_idfp); CS(client).muted = true; LOG_INFO(strcat("Mute-banning player ", GetCallerName(client), " (", argv(1), ").")); - cvar_set("g_muteban_list", cons(autocvar_g_muteban_list, theid)); + cvar_set("g_chatban_list", cons(autocvar_g_chatban_list, theid)); return; } @@ -156,7 +156,7 @@ void BanCommand_mute(int request, int argc, string command) { LOG_HELP("Usage:^3 sv_cmd mute "); LOG_HELP(" is the entity number or name of the player to mute."); - LOG_HELP("See also: ^2unmute, g_muteban_list^7"); + LOG_HELP("See also: ^2unmute, g_chatban_list^7"); return; } } @@ -267,14 +267,14 @@ void BanCommand_unmute(int request, int argc) if (accepted > 0) { string tmp_string = ""; - FOREACH_WORD(autocvar_g_muteban_list, it != client.netaddress, + FOREACH_WORD(autocvar_g_chatban_list, it != client.netaddress, { if(client.crypto_idfp && it == substring(client.crypto_idfp, 0, strlen(it))) continue; tmp_string = cons(tmp_string, it); }); - cvar_set("g_muteban_list", tmp_string); + cvar_set("g_chatban_list", tmp_string); LOG_INFO(strcat("Unmuting player ", GetCallerName(client), " (", original_arg, ").")); CS(client).muted = false; @@ -293,7 +293,7 @@ void BanCommand_unmute(int request, int argc) { LOG_HELP("Usage:^3 sv_cmd unmute "); LOG_HELP(" is the entity number or name of the player to unmute."); - LOG_HELP("See also: ^2mute, g_muteban_list^7"); + LOG_HELP("See also: ^2mute, g_chatban_list^7"); return; } } diff --git a/qcsrc/server/command/banning.qh b/qcsrc/server/command/banning.qh index 6aa70c6a8..f35e99de2 100644 --- a/qcsrc/server/command/banning.qh +++ b/qcsrc/server/command/banning.qh @@ -10,7 +10,7 @@ string autocvar_g_ban_sync_uri; bool autocvar_g_ban_telluser = true; string autocvar_g_banned_list; bool autocvar_g_banned_list_idmode; -string autocvar_g_muteban_list; // "List of banned players from chat" +string autocvar_g_chatban_list; // "List of banned players from chat" string autocvar_g_playban_list; // "List of banned players from playing (forced to spectate)" string autocvar_g_voteban_list; // "List of banned players from voting" diff --git a/qcsrc/server/world.qc b/qcsrc/server/world.qc index 8b38b06fe..d8c44d3fb 100644 --- a/qcsrc/server/world.qc +++ b/qcsrc/server/world.qc @@ -236,7 +236,7 @@ void cvar_changes_init() BADCVAR("timeformat"); BADCVAR("timestamps"); BADCVAR("g_require_stats"); - BADCVAR("g_muteban_list"); + BADCVAR("g_chatban_list"); BADCVAR("g_playban_list"); BADCVAR("g_voteban_list"); BADPREFIX("developer_"); diff --git a/xonotic-server.cfg b/xonotic-server.cfg index 6bc987f67..d1cad0b12 100644 --- a/xonotic-server.cfg +++ b/xonotic-server.cfg @@ -406,7 +406,7 @@ set g_ban_sync_trusted_servers_verify 0 "when set to 1, additional bans sent by set g_ban_telluser 1 "notify the banned player about it when they try to join" set g_banned_list "" "format: IP remainingtime IP remainingtime ..." set g_banned_list_idmode "1" "when set, the IP banning system always uses the ID over the IP address (so a user in a banned IP range can connect if they have a valid signed ID)" -set g_muteban_list "" "list of banned players from chat, format: IP playerkey ..." +set g_chatban_list "" "list of banned players from chat, format: IP playerkey ..." set g_playban_list "" "list of banned players from playing (forced to spectate), format: IP playerkey ..." set g_voteban_list "" "list of banned players from voting, format: IP playerkey ..."