]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/command/common.qc
Merge branch 'terencehill/menu_remove_tab_title' of git://de.git.xonotic.org/xonotic...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / command / common.qc
index eb5450252140199534f708371825b0254d946e57..0bdc6672fbf550daa7d2d66b54bdb30cf69b99d3 100644 (file)
@@ -1,5 +1,10 @@
+#include "../../common/command/command.qh"
 #include "common.qh"
+#include "../_all.qh"
 
+#include "../scores.qh"
+
+#include "../../common/notifications.qh"
 #include "../../common/counting.qh"
 
 
@@ -26,6 +31,14 @@ string GetCallerName(entity caller)
                return admin_name(); //((autocvar_sv_adminnick != "") ? autocvar_sv_adminnick : autocvar_hostname);
 }
 
+// verify that the client provided is acceptable for kicking
+float VerifyKickableEntity(entity client)
+{
+       if (!IS_REAL_CLIENT(client))
+               return CLIENT_NOT_REAL;
+       return CLIENT_ACCEPTABLE;
+}
+
 // verify that the client provided is acceptable for use
 float VerifyClientEntity(entity client, float must_be_real, float must_be_bots)
 {
@@ -40,13 +53,13 @@ float VerifyClientEntity(entity client, float must_be_real, float must_be_bots)
 }
 
 // if the client is not acceptable, return a string to be used for error messages
-string GetClientErrorString(float clienterror, string original_input)
+string GetClientErrorString_color(float clienterror, string original_input, string col)
 {
        switch(clienterror)
        {
-               case CLIENT_DOESNT_EXIST: { return strcat("Client '", original_input, "' doesn't exist"); }
-               case CLIENT_NOT_REAL: { return strcat("Client '", original_input, "' is not real"); }
-               case CLIENT_NOT_BOT: { return strcat("Client '", original_input, "' is not a bot"); }
+               case CLIENT_DOESNT_EXIST: { return strcat(col, "Client '", original_input, col, "' doesn't exist"); }
+               case CLIENT_NOT_REAL: { return strcat(col, "Client '", original_input, col, "' is not real"); }
+               case CLIENT_NOT_BOT: { return strcat(col, "Client '", original_input, col, "' is not a bot"); }
                default: { return "Incorrect usage of GetClientErrorString"; }
        }
 }