summaryrefslogtreecommitdiff
path: root/src/server.c
diff options
context:
space:
mode:
authororoborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e>2008-06-03 21:26:17 +0000
committeroroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e>2008-06-03 21:26:17 +0000
commit2fd0c9d50f1eb83d46080fb114cba5465e8c4506 (patch)
tree69d3aef56532f0a96c5d1b9b2800167152f239ca /src/server.c
parentf18096a5c43d5cc52670c24d73d3efeebb120307 (diff)
- 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
Diffstat (limited to 'src/server.c')
-rw-r--r--src/server.c13
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 )