summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/socialwindow.cpp6
-rw-r--r--src/gui/socialwindow.h1
-rw-r--r--src/net/tmwa/loginhandler.cpp2
3 files changed, 8 insertions, 1 deletions
diff --git a/src/gui/socialwindow.cpp b/src/gui/socialwindow.cpp
index a81117a6..953d347a 100644
--- a/src/gui/socialwindow.cpp
+++ b/src/gui/socialwindow.cpp
@@ -357,11 +357,13 @@ SocialWindow::SocialWindow() :
mCreateButton = new Button(_("Create"), "create", this);
mInviteButton = new Button(_("Invite"), "invite", this);
mLeaveButton = new Button(_("Leave"), "leave", this);
+ mRefreshButton = new Button(_("Refresh"), "refresh", this);
mTabs = new TabbedArea;
place(0, 0, mCreateButton);
place(1, 0, mInviteButton);
place(2, 0, mLeaveButton);
+ place(3, 0, mRefreshButton);
place(0, 1, mTabs, 4, 4);
widgetResized(nullptr);
@@ -518,6 +520,10 @@ void SocialWindow::action(const gcn::ActionEvent &event)
{
static_cast<SocialTab*>(mTabs->getSelectedTab())->leave();
}
+ else if (event.getId() == "refresh")
+ {
+ Net::getPlayerListHandler()->refreshList();
+ }
else if (event.getId() == "create guild")
{
std::string name = mGuildCreateDialog->getText();
diff --git a/src/gui/socialwindow.h b/src/gui/socialwindow.h
index 29c21f98..9db8f020 100644
--- a/src/gui/socialwindow.h
+++ b/src/gui/socialwindow.h
@@ -98,6 +98,7 @@ protected:
Button *mCreateButton;
Button *mInviteButton;
Button *mLeaveButton;
+ Button *mRefreshButton;
TabbedArea *mTabs;
};
diff --git a/src/net/tmwa/loginhandler.cpp b/src/net/tmwa/loginhandler.cpp
index 8ee5e102..24bc9ab2 100644
--- a/src/net/tmwa/loginhandler.cpp
+++ b/src/net/tmwa/loginhandler.cpp
@@ -321,7 +321,7 @@ void LoginHandler::sendLoginRegister(const std::string &username,
const std::string &password)
{
MessageOut outMsg(CMSG_LOGIN_REGISTER);
- outMsg.writeInt32(6); // client version
+ outMsg.writeInt32(8); // client version
outMsg.writeString(username, 24);
outMsg.writeString(password, 24);