ircclient:remove unneeded join and leave message

This commit is contained in:
andy5995 2018-09-22 13:27:54 -05:00
parent 801e8e0314
commit 3143d0c7b6
No known key found for this signature in database
GPG Key ID: 06BFEC9B82603CAF
2 changed files with 24 additions and 3 deletions

View File

@ -772,12 +772,23 @@ namespace Glest {
"In [%s::%s Line: %d]\n", "In [%s::%s Line: %d]\n",
extractFileFromDirectoryPath(__FILE__). extractFileFromDirectoryPath(__FILE__).
c_str(), __FUNCTION__, __LINE__); c_str(), __FUNCTION__, __LINE__);
// code to execute when someone leaves the lobby
if (ircClient != NULL && ircClient->isConnected() == true if (ircClient != NULL && ircClient->isConnected() == true
&& ircClient->getHasJoinedChannel() == true) { && ircClient->getHasJoinedChannel() == true) {
ircClient->SendIRCCmdMessage(IRC_CHANNEL, /* The discord-irc bot<https://github.com/reactiflux/discord-irc>
" has left the lobby"); * already prints this message because
* it's sent using NOTICE or whatever from IRC directly
*
* The only reason it would be useful is to provide an extra alert
* to users in the channel on IRC, if they have extra notifications
* enabled
*
ircClient->SendIRCCmdMessage(IRC_CHANNEL, " has left the lobby");
*/
sleep(30); sleep(30);
} }
cleanup(); cleanup();
if (SystemFlags::getSystemSettingType(SystemFlags::debugSystem). if (SystemFlags::getSystemSettingType(SystemFlags::debugSystem).

View File

@ -176,10 +176,20 @@ namespace Shared {
if (SystemFlags::VERBOSE_MODE_ENABLED || IRCThread::debugEnabled) printf("===> IRC: Line: %d\n", __LINE__); if (SystemFlags::VERBOSE_MODE_ENABLED || IRCThread::debugEnabled) printf("===> IRC: Line: %d\n", __LINE__);
//irc_cmd_msg (session, params[0], "ZG Bot says hello!"); // code to execute when someone joins the lobby can be put here.
ctx->setHasJoinedChannel(true); ctx->setHasJoinedChannel(true);
/* The discord-irc bot<https://github.com/reactiflux/discord-irc>
* already prints this message because
* it's sent using NOTICE or whatever from IRC directly
*
* The only reason it would be useful is to provide an extra alert
* to users in the channel on IRC, if they have extra notifications
* enabled
*
const char *announceJoin = { "has joined" }; const char *announceJoin = { "has joined" };
irc_cmd_msg(session, "#zetaglest-lobby", announceJoin); irc_cmd_msg(session, "#zetaglest-lobby", announceJoin);
*/
if (SystemFlags::VERBOSE_MODE_ENABLED || IRCThread::debugEnabled) printf("===> IRC: Line: %d\n", __LINE__); if (SystemFlags::VERBOSE_MODE_ENABLED || IRCThread::debugEnabled) printf("===> IRC: Line: %d\n", __LINE__);