Fixed bug caused by 045b0b88e051f7163fbef42fa0adc63a326ca186, where user could not click on nick button to get real nick to ping.

This commit is contained in:
Jammyjamjamman 2018-03-30 05:47:10 +01:00
parent 01454a32e5
commit aa46b2a8a1
No known key found for this signature in database
GPG Key ID: A5541C132A56EAB4
2 changed files with 8 additions and 5 deletions

View File

@ -997,11 +997,11 @@ namespace Glest
if (!chatManager.getEditEnabled ())
{
chatManager.switchOnEdit ();
chatManager.addText (userButtons[i]->getText () + " ");
chatManager.addText (nickList[i] + " ");
}
else
{
chatManager.addText (userButtons[i]->getText ());
chatManager.addText (nickList[i]);
}
break;
}
@ -1240,7 +1240,7 @@ namespace Glest
intToStr (__LINE__));
if (ircClient != NULL)
{
std::vector < string > nickList = ircClient->getNickList ();
nickList = ircClient->getNickList ();
if (currentIrcNick != ircClient->getNick ())
{
@ -1278,13 +1278,13 @@ namespace Glest
button->setFont (CoreData::getInstance ().getDisplayFontSmall ());
button->setFont3D (CoreData::getInstance ().
getDisplayFontSmall3D ());
if (strncmp (&nickList[i][0], "ZG_", 3) == 0) {
button->setText (nickList[i].substr(3,nickList[i].length()-7));
} else {
button->setText (nickList[i]);
}
if (strncmp (&nickList[i][0], "ZG_", 3) != 0
|| &nickList[i][0] == currentIrcNick)
{
@ -1296,6 +1296,7 @@ namespace Glest
}
userButtons.push_back (button);
}
userScrollBar.setElementCount ((int) userButtons.size ());
oldNickList = nickList;

View File

@ -170,6 +170,8 @@ namespace Glest
const char **params,
unsigned int count);
std::vector < string > nickList;
};