]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/miscfunctions.qc
Merge branch 'master' into mirceakitsune/sandbox
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / miscfunctions.qc
index 8b60d942bf7304c914c71bb993fd9bcf49bc52bb..2c089617277e583dbf44ab6914bcb6d9010b1431 100644 (file)
@@ -2054,7 +2054,19 @@ void print_to(entity e, string s)
 
 string uid2name(string myuid) {
        string s;
 
 string uid2name(string myuid) {
        string s;
-       s = db_get(ServerProgsDB, strcat("uid2name", myuid));
+       s = db_get(ServerProgsDB, strcat("/uid2name/", myuid));
+
+       // FIXME remove this later after 0.6 release
+       // convert old style broken records to correct style
+       if(s == "")
+       {
+               s = db_get(ServerProgsDB, strcat("uid2name", myuid));
+               if(s != "")
+               {
+                       db_put(ServerProgsDB, strcat("/uid2name/", myuid), s);
+                       db_put(ServerProgsDB, strcat("uid2name", myuid), "");
+               }
+       }
        
        if(s == "")
                s = "^1Unregistered Player";
        
        if(s == "")
                s = "^1Unregistered Player";