]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
race/cts: store UID2Name info prefixed with "/uid2name/" not "uid2name", to not clash...
authorRudolf Polzer <divverent@xonotic.org>
Fri, 28 Oct 2011 14:15:23 +0000 (16:15 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Fri, 28 Oct 2011 14:15:23 +0000 (16:15 +0200)
qcsrc/server/cl_client.qc
qcsrc/server/miscfunctions.qc

index aaca49da62069ec0ec9cb78bbaa410c16a30a6d5..657334fe870a7b6cb681db2bbb255c731686c0d2 100644 (file)
@@ -3250,7 +3250,7 @@ void PlayerPostThink (void)
                        self.stored_netname = strzone(uid2name(self.crypto_idfp));
                if(self.stored_netname != self.netname)
                {
-                       db_put(ServerProgsDB, strcat("uid2name", self.crypto_idfp), self.netname);
+                       db_put(ServerProgsDB, strcat("/uid2name/", self.crypto_idfp), self.netname);
                        strunzone(self.stored_netname);
                        self.stored_netname = strzone(self.netname);
                }
index 8b9cfec127f529c968982e103878561476487f6e..2fe562774d0d625468b36e4333f1e9547e17a607 100644 (file)
@@ -2037,7 +2037,19 @@ void print_to(entity e, 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";