show megaglest version in irc WhoIS

This commit is contained in:
titiger
2017-03-11 23:57:44 +01:00
parent 438d37c59f
commit 2133b8fd07
3 changed files with 5 additions and 1 deletions

View File

@@ -540,6 +540,7 @@ IRCThread::IRCThread(const std::vector<string> &argv, IRCCallbackInterface *call
lastNickListUpdate = time(NULL);
wantToLeaveChannel = false;
playerName = "";
glestVersionString = "";
}
void IRCThread::disconnect() {
@@ -824,7 +825,7 @@ void IRCThread::execute() {
if(SystemFlags::VERBOSE_MODE_ENABLED || IRCThread::debugEnabled) printf ("===> IRC: Line: %d\n", __LINE__);
safeMutex.Lock();
if(irc_connect(ircSession, argv[0].c_str(), IRC_SERVER_PORT, 0, this->nick.c_str(), this->username.c_str(), "megaglest")) {
if(irc_connect(ircSession, argv[0].c_str(), IRC_SERVER_PORT, 0, this->nick.c_str(), this->username.c_str(), ("MegagGlest "+glestVersionString).c_str())) {
safeMutex.ReleaseLock();
if(SystemFlags::VERBOSE_MODE_ENABLED || IRCThread::debugEnabled) printf ("===> IRC Could not connect: %s\n", irc_strerror (irc_errno(ircSession)));
return;