]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/command/sv_cmd.qc
Merge branch 'master' into Mario/q3compat_sanity
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / command / sv_cmd.qc
index 7de740bdde1049fc7b1f8c7c8e4d797ef91df4ae..f87b4cea75b470b69975b0b02d24d000cc492bab 100644 (file)
@@ -1,35 +1,30 @@
 #include "sv_cmd.qh"
-#include "_mod.qh"
 
+#include <common/constants.qh>
 #include <common/effects/all.qh>
-
-#include "banning.qh"
-#include "cmd.qh"
-#include "common.qh"
-#include "getreplies.qh"
-#include "radarmap.qh"
-
-#include "../anticheat.qh"
-#include "../campaign.qh"
-#include "../client.qh"
-#include "../player.qh"
-#include "../world.qh"
-#include "../ipban.qh"
-#include "../teamplay.qh"
-
-#include "../bot/api.qh"
-
-#include <server/mutators/_mod.qh>
 #include <common/gamemodes/_mod.qh>
-
-#include <common/constants.qh>
-#include <common/net_linked.qh>
 #include <common/mapinfo.qh>
+#include <common/monsters/sv_monsters.qh>
+#include <common/net_linked.qh>
 #include <common/notifications/all.qh>
 #include <common/teams.qh>
 #include <common/util.qh>
-
-#include <common/monsters/sv_monsters.qh>
+#include <server/anticheat.qh>
+#include <server/bot/api.qh>
+#include <server/campaign.qh>
+#include <server/client.qh>
+#include <server/command/_mod.qh>
+#include <server/command/banning.qh>
+#include <server/command/cmd.qh>
+#include <server/command/common.qh>
+#include <server/command/getreplies.qh>
+#include <server/command/radarmap.qh>
+#include <server/intermission.qh>
+#include <server/ipban.qh>
+#include <server/mutators/_mod.qh>
+#include <server/player.qh>
+#include <server/teamplay.qh>
+#include <server/world.qh>
 
 //  used by GameCommand_make_mapinfo()
 void make_mapinfo_Think(entity this)
@@ -133,8 +128,8 @@ void GameCommand_adminmsg(int request, int argc)
                                                sprint(client, strcat("\{1}\{13}^3", GetCallerName(NULL), "^7: ", admin_message, "\n"));
                                        }
 
-                                       successful = strcat(successful, (successful ? ", " : ""), playername(client, false));
-                                       LOG_TRACE("Message sent to ", playername(client, false));
+                                       successful = strcat(successful, (successful ? ", " : ""), playername(client.netname, client.team, false));
+                                       LOG_TRACE("Message sent to ", playername(client.netname, client.team, false));
                                        continue;
                                }
 
@@ -531,7 +526,7 @@ void GameCommand_defer_clear(int request, int argc)
                                if (accepted > 0)
                                {
                                        stuffcmd(client, "defer clear\n");
-                                       LOG_INFO("defer clear stuffed to ", playername(client, false));
+                                       LOG_INFO("defer clear stuffed to ", playername(client.netname, client.team, false));
                                }
                                else { LOG_INFO("defer_clear: ", GetClientErrorString(accepted, argv(1)), "."); }
 
@@ -723,7 +718,7 @@ void GameCommand_gametype(int request, int argc)
                        if (argv(1) != "")
                        {
                                string s = argv(1);
-                               Gametype t = MapInfo_Type_FromString(s, false), tsave = MapInfo_CurrentGametype();
+                               Gametype t = MapInfo_Type_FromString(s, false, false), tsave = MapInfo_CurrentGametype();
 
                                if (t)
                                {
@@ -1010,11 +1005,11 @@ void GameCommand_moveplayer(int request, int argc)
                                                        if (client.caplayer) client.caplayer = 0;
                                                        PutObserverInServer(client);
 
-                                                       successful = strcat(successful, (successful ? ", " : ""), playername(client, false));
+                                                       successful = strcat(successful, (successful ? ", " : ""), playername(client.netname, client.team, false));
                                                }
                                                else
                                                {
-                                                       LOG_INFO("Player ", ftos(GetFilteredNumber(t)), " (", playername(client, false), ") is already spectating.");
+                                                       LOG_INFO("Player ", ftos(GetFilteredNumber(t)), " (", playername(client.netname, client.team, false), ") is already spectating.");
                                                }
                                                continue;
                                        }
@@ -1034,7 +1029,7 @@ void GameCommand_moveplayer(int request, int argc)
                                                                if (team_num == client.team)  // already on the destination team
                                                                {
                                                                        // keep the forcing undone
-                                                                       LOG_INFO("Player ", ftos(GetFilteredNumber(t)), " (", playername(client, false), ") is already on the ", Team_ColoredFullName(client.team), (targets ? "^7, skipping to next player.\n" : "^7."));
+                                                                       LOG_INFO("Player ", ftos(GetFilteredNumber(t)), " (", playername(client.netname, client.team, false), ") is already on the ", Team_ColoredFullName(client.team), (targets ? "^7, skipping to next player.\n" : "^7."));
                                                                        continue;
                                                                }
                                                                else if (team_num == 0)  // auto team
@@ -1068,12 +1063,12 @@ void GameCommand_moveplayer(int request, int argc)
                                                                Player_SetForcedTeamIndex(client, TEAM_FORCE_DEFAULT);
                                                                if (MoveToTeam(client, team_id, 6))
                                                                {
-                                                                       successful = strcat(successful, (successful ? ", " : ""), playername(client, false));
-                                                                       LOG_INFO("Player ", ftos(GetFilteredNumber(t)), " (", playername(client, false), ") has been moved to the ", Team_ColoredFullName(team_id), "^7.");
+                                                                       successful = strcat(successful, (successful ? ", " : ""), playername(client.netname, client.team, false));
+                                                                       LOG_INFO("Player ", ftos(GetFilteredNumber(t)), " (", playername(client.netname, client.team, false), ") has been moved to the ", Team_ColoredFullName(team_id), "^7.");
                                                                }
                                                                else
                                                                {
-                                                                       LOG_INFO("Unable to move player ", ftos(GetFilteredNumber(t)), " (", playername(client, false), ")");
+                                                                       LOG_INFO("Unable to move player ", ftos(GetFilteredNumber(t)), " (", playername(client.netname, client.team, false), ")");
                                                                }
                                                                continue;
                                                        }