]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Rename muteban to chatban, left muteban aliases for chatban
authorDr. Jaska <drjaska83@gmail.com>
Tue, 6 Jun 2023 19:44:56 +0000 (19:44 +0000)
committerLegendaryGuard <rootuser999@gmail.com>
Tue, 6 Jun 2023 19:44:56 +0000 (19:44 +0000)
commands.cfg
qcsrc/server/client.qc
qcsrc/server/command/banning.qc
qcsrc/server/command/banning.qh
qcsrc/server/world.qc
xonotic-server.cfg

index ea4a41396fcfad5a4619661232e016c036350490..308cd0b8e281dbb3245c5c21c830d11bc69d6d6f 100644 (file)
@@ -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 ${* ?}"
 
index c037662846bb66e28b2649e221282ec018f3ee5d..ef9c43f987a6bd3cbc047a120d99997c7b14539a 100644 (file)
@@ -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);
index 933eb3c83d8e85fc59ebb825136aa0e641d968cf..c29c47c0e8aada55583752c0c9c1a66484d05190 100644 (file)
@@ -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 <client>");
                        LOG_HELP("  <client> 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 <client>");
                        LOG_HELP("  <client> 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;
                }
        }
index 6aa70c6a8028a7dcca41d5ea229c5e51f3d71424..f35e99de216046cddeeedcf29a3f0c0b89645de6 100644 (file)
@@ -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"
 
index 8b38b06fe2fe51af63cbf251d0504e4fb1827ac6..d8c44d3fb5e8515ec2c4c1b59b8163e8dbd37a6e 100644 (file)
@@ -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_");
index 6bc987f677eb37772c78ce4697b84c135383d7f3..d1cad0b12308f679d5e4b196ee9005947f36a60b 100644 (file)
@@ -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 ..."