]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge admin_name with GetCallerName
authorMario <mario@smbclan.net>
Sat, 18 Mar 2017 12:05:03 +0000 (22:05 +1000)
committerMario <mario@smbclan.net>
Sat, 18 Mar 2017 12:05:03 +0000 (22:05 +1000)
qcsrc/server/command/common.qc
qcsrc/server/command/sv_cmd.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/miscfunctions.qh

index e331482fc1a351e7bd4ad2f9cbec417b5462ae3e..9f3a200dac51a17e0e8af00956644b5d5fdd42fd 100644 (file)
@@ -25,7 +25,7 @@ string GetCommandPrefix(entity caller)
 string GetCallerName(entity caller)
 {
        if (caller) return playername(caller, false);
-       else return admin_name();  // ((autocvar_sv_adminnick != "") ? autocvar_sv_adminnick : autocvar_hostname);
+       else return ((autocvar_sv_adminnick != "") ? autocvar_sv_adminnick : "SERVER ADMIN"); // autocvar_hostname
 }
 
 // verify that the client provided is acceptable for kicking
index 81dc7772595ab6efa0cd65d687ba6d79c233061a..c403e28f1b4263ed1e5f966e840a482956fdba79 100644 (file)
@@ -134,8 +134,8 @@ void GameCommand_adminmsg(float request, float argc)
                                        }
                                        else
                                        {
-                                               centerprint(client, strcat("^3", admin_name(), ":\n^7", admin_message));
-                                               sprint(client, strcat("\{1}\{13}^3", admin_name(), "^7: ", admin_message, "\n"));
+                                               centerprint(client, strcat("^3", GetCallerName(NULL), ":\n^7", admin_message));
+                                               sprint(client, strcat("\{1}\{13}^3", GetCallerName(NULL), "^7: ", admin_message, "\n"));
                                        }
 
                                        successful = strcat(successful, (successful ? ", " : ""), playername(client, false));
index e91a7c219df52b9411280841ad22a995b477fee0..afa6d1044d0df10203217bee9d8020e35c077eb2 100644 (file)
@@ -61,15 +61,6 @@ void WarpZone_crosshair_trace(entity pl)
 }
 
 
-string admin_name()
-{
-       if(autocvar_sv_adminnick != "")
-               return autocvar_sv_adminnick;
-       else
-               return "SERVER ADMIN";
-}
-
-
 void GameLogEcho(string s)
 {
     string fn;
index 730a528b9021e3c730d0e8ce599f6be19c3233b1..4cc3bc3de955482fb70b40988b8a7c586ab463c4 100644 (file)
@@ -32,8 +32,6 @@ float cvar_normal(string n)
 entity eliminatedPlayers;
 void EliminatedPlayers_Init(float(entity) isEliminated_func);
 
-string admin_name();
-
 void write_recordmarker(entity pl, float tstart, float dt);
 
 void play2all(string samp);