diff options
Diffstat (limited to 'src/server.c')
| -rw-r--r-- | src/server.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/server.c b/src/server.c index ab45fef..8777e7a 100644 --- a/src/server.c +++ b/src/server.c @@ -27,6 +27,7 @@ #ifdef PUBLIC_SERVER #include "publicServer.h" +#include "heightScore.h" #endif #ifdef SUPPORT_NET_UNIX_UDP @@ -282,8 +283,12 @@ void destroyClient(client_t *p) destroyBuffer(p->buffer); destroyCheckFront(p->listCheck); + if( p->tux != NULL ) { +#ifdef PUBLIC_SERVER + addPlayerInHighScore(p->tux->name, p->tux->score); +#endif index = searchListItem(getCurrentArena()->listTux, p->tux); delListItem(getCurrentArena()->listTux, index, destroyTux); } @@ -486,6 +491,14 @@ static void eventClientBuffer(client_t *client) continue; } +#ifdef PUBLIC_SERVER + if( strncmp(line, "list", 4) == 0 ) + { + proto_recv_listscore_server(client, line); + continue; + } +#endif + if( client->tux != NULL ) { if( strncmp(line, "event", 5) == 0 ) |