From 6f1c90720402415b62fb4d5e809ec7dbc1cd7f96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Blot?= Date: Tue, 26 Sep 2017 00:11:20 +0200 Subject: Implement mod communication channels (#6351) Implement network communication for channels * Implement ModChannel manager server side to route incoming messages from clients to other clients * Add signal handler switch on client & ModChannelMgr on client to handle channels * Add Lua API bindings + client packet sending + unittests * Implement server message sending * Add callback from received message handler to Lua API using registration method --- src/network/serveropcodes.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/network/serveropcodes.cpp') diff --git a/src/network/serveropcodes.cpp b/src/network/serveropcodes.cpp index 8c6d159cd..6dcf9c93a 100644 --- a/src/network/serveropcodes.cpp +++ b/src/network/serveropcodes.cpp @@ -47,9 +47,9 @@ const ToServerCommandHandler toServerCommandTable[TOSERVER_NUM_MSG_TYPES] = null_command_handler, // 0x14 null_command_handler, // 0x15 null_command_handler, // 0x16 - null_command_handler, // 0x17 - null_command_handler, // 0x18 - null_command_handler, // 0x19 + { "TOSERVER_MODCHANNEL_JOIN", TOSERVER_STATE_INGAME, &Server::handleCommand_ModChannelJoin }, // 0x17 + { "TOSERVER_MODCHANNEL_LEAVE", TOSERVER_STATE_INGAME, &Server::handleCommand_ModChannelLeave }, // 0x18 + { "TOSERVER_MODCHANNEL_MSG", TOSERVER_STATE_INGAME, &Server::handleCommand_ModChannelMsg }, // 0x19 null_command_handler, // 0x1a null_command_handler, // 0x1b null_command_handler, // 0x1c @@ -200,8 +200,8 @@ const ClientCommandFactory clientCommandFactoryTable[TOCLIENT_NUM_MSG_TYPES] = { "TOCLIENT_CLOUD_PARAMS", 0, true }, // 0x54 { "TOCLIENT_FADE_SOUND", 0, true }, // 0x55 { "TOCLIENT_UPDATE_PLAYER_LIST", 0, true }, // 0x56 - null_command_factory, - null_command_factory, + { "TOCLIENT_MODCHANNEL_MSG", 0, true}, // 0x57 + { "TOCLIENT_MODCHANNEL_SIGNAL", 0, true}, // 0x58 null_command_factory, null_command_factory, null_command_factory, -- cgit v1.2.3