make sure ZG users enter the correct IRC channel

This commit is contained in:
andy5995
2018-01-13 23:13:20 -06:00
parent f8c6babf8b
commit cc3d7c6f5d

View File

@@ -34,7 +34,7 @@ namespace Glest{ namespace Game{
DisplayMessageFunction MenuStateMasterserver::pCB_DisplayMessage = NULL;
static string IRC_SERVER = "irc.freenode.net";
static string IRC_CHANNEL = "#megaglest-lobby";
static string IRC_CHANNEL = "#zetaglest-lobby";
// =====================================================
// class MenuStateMasterserver
@@ -256,7 +256,7 @@ MenuStateMasterserver::MenuStateMasterserver(Program *program, MainMenu *mainMen
int randomNickId = rand() % 999;
string netPlayerName=Config::getInstance().getString("NetPlayerName",Socket::getHostName().c_str());
string ircname=netPlayerName.substr(0,9);
snprintf(szIRCNick,80,"MG_%s_%d",ircname.c_str(),randomNickId);
snprintf(szIRCNick,80,"ZG_%s_%d",ircname.c_str(),randomNickId);
normalizeNick(szIRCNick);
currentIrcNick=ircname;
@@ -858,7 +858,7 @@ void MenuStateMasterserver::update() {
button->setFont(CoreData::getInstance().getDisplayFontSmall());
button->setFont3D(CoreData::getInstance().getDisplayFontSmall3D());
button->setText(nickList[i]);
if(strncmp(&nickList[i][0],"MG_",3) != 0 || &nickList[i][0] == currentIrcNick) {
if(strncmp(&nickList[i][0],"ZG_",3) != 0 || &nickList[i][0] == currentIrcNick) {
button->setEnabled(false);
button->setEditable(false);
button->setCustomTexture(CoreData::getInstance().getCustomTexture());