]> jfr.im git - irc/gameservirc.git/blobdiff - gameserv/gameserv.cpp
Took out all #include lines from the extern.h, and changed them to forward declaratio...
[irc/gameservirc.git] / gameserv / gameserv.cpp
index 64987fa6ece76e216a9b5f930043109cf9a97f4b..30145320c24a00329d4e9d62fa19c0b6805cb674 100644 (file)
@@ -8,6 +8,7 @@
 #include "sockhelp.h"
 #include "item.h"
 #include "script.h"
+#include "toplist.h"
 
 #include <algorithm>
 #include <cctype>
@@ -33,6 +34,7 @@ Level levels[LEVELS];                 // The newest way to store monsters
 list<item*> Items;                      // The master list of items
 list<tavernItem> tavern;                // The list of items available at the tavern
 list<item*> store;                      // The list of items available at the store
+toplist myToplist;          // List of the top 10 players
 
 // Database functions
 int save_gs_dbase();
@@ -1294,6 +1296,10 @@ void do_register(char *u)
 
                  // Add the player to the list
                  players[hv].push_back(user->stats);
+
+                 // Attempt to add the player to the top list
+                 // The class takes care of pruning the user out if they don't deserve to be in the list
+                 myToplist.insertPlayer(user->stats);
                }
          else
                {