From 2fd0c9d50f1eb83d46080fb114cba5465e8c4506 Mon Sep 17 00:00:00 2001 From: oroborus Date: Tue, 3 Jun 2008 21:26:17 +0000 Subject: - zaciatok podpory FR jazyka - server podporuje socre ( treb este zdokumentovat protokol ) - prelozene dve chybove hlasky pre siete - odosielam to na rychlo git-svn-id: http://opensvn.csie.org/tuxanci_ng@59 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e --- src/server.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/server.c') 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 ) -- cgit v1.2.3