From bb15df3f3428df7cd2a4482adebcdaa6fc2f516e Mon Sep 17 00:00:00 2001 From: oroborus Date: Thu, 10 Jul 2008 11:28:59 +0000 Subject: - precisteny kod sietoveho multiplayera - moduly si mozu mosielat spravy cez sietovy protokol - opravy chyb v moduloch - oprava chyby, v textovych poliach sa zobrazuju znaky, ktore ste nestalcili - director_t* loadDirector(char *s) vracia NULL ak adresar neexistuje ( predtym sa proces zrutil ) git-svn-id: http://opensvn.csie.org/tuxanci_ng@126 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e --- src/base/proto.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'src/base/proto.c') diff --git a/src/base/proto.c b/src/base/proto.c index 052a0c4..5d1debd 100644 --- a/src/base/proto.c +++ b/src/base/proto.c @@ -16,6 +16,7 @@ #include "net_multiplayer.h" #include "checkFront.h" #include "idManager.h" +#include "modules.h" #include "protect.h" #ifndef PUBLIC_SERVER @@ -745,6 +746,47 @@ void proto_recv_chat_client(char *msg) #endif +#ifndef PUBLIC_SERVER + +void proto_send_module_client(char *msg) +{ + char out[STR_PROTO_SIZE]; + + strcpy(out, "modules "); + strcat(out, msg); + strcat(out, "\n"); + + sendServer(out); +} + +#endif + +void proto_recv_module_server(client_t *client, char *msg) +{ + recvMsgModule(msg+7); +} + +void proto_send_module_server(int type, client_t *client, char *msg) +{ + char out[STR_PROTO_SIZE]; + + strcpy(out, "module "); + strcat(out, msg); + strcat(out, "\n"); + + protoSendClient(type, client, out, CHECK_FORNT_TYPE_SIMPLE, CHECK_FRONT_ID_NONE); +} + +#ifndef PUBLIC_SERVER + +void proto_recv_module_client(char *msg) +{ + recvMsgModule(msg+7); +} + +#endif + + #ifndef PUBLIC_SERVER void proto_send_ping_client() -- cgit v1.2.3