Allow default privileges for new players to be set in the server config
authorCiaran Gultnieks <ciaran@ciarang.com>
Sun, 22 May 2011 22:56:57 +0000 (23:56 +0100)
committerCiaran Gultnieks <ciaran@ciarang.com>
Sun, 22 May 2011 22:56:57 +0000 (23:56 +0100)
src/server.cpp

index 5c03ea8f6ffd7a9c810cc440a01ed5f3d58890be..9b4ee1fad00143c2bbbca82b15bc3adc0900447e 100644 (file)
@@ -4185,6 +4185,9 @@ Player *Server::emergePlayer(const char *name, const char *password, u16 peer_id
                player->updateName(name);
                player->updatePassword(password);
 
+               if(g_settings.exists("default_privs"))
+                               player->privs = g_settings.getU64("default_privs");
+
                /*
                        Set player position
                */