summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-11-13 23:01:53 +0300
committerAndrei Karas <akaras@inbox.ru>2015-11-13 23:02:53 +0300
commitcd7e273322d9648be6c005fd2930a6037149a357 (patch)
treeda429361f7c1ddc5e3c4500684a4b25dee36406b
parent3f87e3c0f191d72c3295955736a057430b3ab661 (diff)
downloadmanaverse-cd7e273322d9648be6c005fd2930a6037149a357.tar.gz
manaverse-cd7e273322d9648be6c005fd2930a6037149a357.tar.bz2
manaverse-cd7e273322d9648be6c005fd2930a6037149a357.tar.xz
manaverse-cd7e273322d9648be6c005fd2930a6037149a357.zip
Remove manaserv related RegistrationOptions.
-rw-r--r--src/CMakeLists.txt1
-rw-r--r--src/Makefile.am1
-rw-r--r--src/gui/windows/charselectdialog.cpp28
-rw-r--r--src/gui/windows/charselectdialog.h2
-rw-r--r--src/gui/windows/registerdialog.cpp9
-rw-r--r--src/net/ea/loginhandler.h5
-rw-r--r--src/net/eathena/loginhandler.cpp8
-rw-r--r--src/net/eathena/loginhandler.h2
-rw-r--r--src/net/loginhandler.h5
-rw-r--r--src/net/registrationoptions.h40
-rw-r--r--src/net/tmwa/loginhandler.cpp5
-rw-r--r--src/net/tmwa/loginhandler.h2
12 files changed, 3 insertions, 105 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index c44faad51..12ccfb432 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -562,7 +562,6 @@ SET(SRCS
enums/net/storesearchtype.h
net/pethandler.h
net/playerhandler.h
- net/registrationoptions.h
net/sdltcpnet.cpp
net/sdltcpnet.h
net/serverfeatures.h
diff --git a/src/Makefile.am b/src/Makefile.am
index 86315260c..fc1dd6114 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1200,7 +1200,6 @@ manaplus_SOURCES += main.cpp \
net/playerhandler.h \
net/questhandler.h \
net/recvpacketdefine.h \
- net/registrationoptions.h \
net/serverfeatures.h \
net/serverinfo.h \
net/skillhandler.h \
diff --git a/src/gui/windows/charselectdialog.cpp b/src/gui/windows/charselectdialog.cpp
index 476cd50b9..65d7d19f6 100644
--- a/src/gui/windows/charselectdialog.cpp
+++ b/src/gui/windows/charselectdialog.cpp
@@ -49,7 +49,6 @@
#include "net/charserverhandler.h"
#include "net/logindata.h"
#include "net/loginhandler.h"
-#include "net/registrationoptions.h"
#include "net/serverfeatures.h"
#include "debug.h"
@@ -72,8 +71,6 @@ CharSelectDialog::CharSelectDialog(LoginData &data) :
// TRANSLATORS: char select dialog. button.
mChangePasswordButton(new Button(this, _("Password"),
"change_password", this)),
- mUnregisterButton(nullptr),
- mChangeEmailButton(nullptr),
// TRANSLATORS: char select dialog. button.
mPlayButton(new Button(this, _("Play"), "use", this)),
// TRANSLATORS: char select dialog. button.
@@ -94,35 +91,14 @@ CharSelectDialog::CharSelectDialog(LoginData &data) :
setCloseButton(true);
setFocusable(true);
- const int optionalActions = loginHandler->supportedOptionalActions();
-
ContainerPlacer placer;
placer = getPlacer(0, 0);
placer(0, 0, mSwitchLoginButton);
int n = 1;
- if (optionalActions & Net::RegistrationOptions::Unregister)
- {
- // TRANSLATORS: char select dialog. button.
- mUnregisterButton = new Button(this, _("Unregister"),
- "unregister", this);
- placer(n, 0, mUnregisterButton);
- n ++;
- }
-
placer(n, 0, mChangePasswordButton);
n ++;
-
- if (optionalActions & Net::RegistrationOptions::ChangeEmail)
- {
- // TRANSLATORS: char select dialog. button.
- mChangeEmailButton = new Button(this, _("Change Email"),
- "change_email", this);
- placer(n, 0, mChangeEmailButton);
- n ++;
- }
-
placer(n, 0, mDeleteButton);
n ++;
if (serverFeatures->haveCharRename())
@@ -555,10 +531,6 @@ void CharSelectDialog::setLocked(const bool locked)
mSwitchLoginButton->setEnabled(!locked);
if (mChangePasswordButton)
mChangePasswordButton->setEnabled(!locked);
- if (mUnregisterButton)
- mUnregisterButton->setEnabled(!locked);
- if (mChangeEmailButton)
- mChangeEmailButton->setEnabled(!locked);
mPlayButton->setEnabled(!locked);
if (mDeleteButton)
mDeleteButton->setEnabled(!locked);
diff --git a/src/gui/windows/charselectdialog.h b/src/gui/windows/charselectdialog.h
index 39df750ac..7cb496f14 100644
--- a/src/gui/windows/charselectdialog.h
+++ b/src/gui/windows/charselectdialog.h
@@ -118,8 +118,6 @@ class CharSelectDialog final : public Window,
Button *mSwitchLoginButton A_NONNULLPOINTER;
Button *mChangePasswordButton A_NONNULLPOINTER;
- Button *mUnregisterButton;
- Button *mChangeEmailButton;
Button *mPlayButton A_NONNULLPOINTER;
Button *mInfoButton A_NONNULLPOINTER;
Button *mDeleteButton A_NONNULLPOINTER;
diff --git a/src/gui/windows/registerdialog.cpp b/src/gui/windows/registerdialog.cpp
index 06a47c6b5..d3deaeb5e 100644
--- a/src/gui/windows/registerdialog.cpp
+++ b/src/gui/windows/registerdialog.cpp
@@ -38,7 +38,6 @@
#include "net/logindata.h"
#include "net/loginhandler.h"
-#include "net/registrationoptions.h"
#include "net/serverfeatures.h"
#include "utils/delete2.h"
@@ -67,9 +66,6 @@ RegisterDialog::RegisterDialog(LoginData &data) :
{
setCloseButton(true);
- const int optionalActions = loginHandler->
- supportedOptionalActions();
-
// TRANSLATORS: register dialog. label.
Label *const userLabel = new Label(this, _("Name:"));
// TRANSLATORS: register dialog. label.
@@ -89,7 +85,8 @@ RegisterDialog::RegisterDialog(LoginData &data) :
int row = 3;
- if (optionalActions & Net::RegistrationOptions::SetGenderOnRegister)
+ // for future usage flag
+ if (true)
{
// TRANSLATORS: register dialog. button.
mMaleButton = new RadioButton(this, _("Male"), "sex", true);
@@ -112,7 +109,7 @@ RegisterDialog::RegisterDialog(LoginData &data) :
row++;
}
- if (optionalActions & Net::RegistrationOptions::SetEmailOnRegister)
+ if (serverFeatures->haveEmailOnRegister())
{
// TRANSLATORS: register dialog. label.
Label *const emailLabel = new Label(this, _("Email:"));
diff --git a/src/net/ea/loginhandler.h b/src/net/ea/loginhandler.h
index b4a36a4fa..fb9003473 100644
--- a/src/net/ea/loginhandler.h
+++ b/src/net/ea/loginhandler.h
@@ -25,8 +25,6 @@
#include "net/loginhandler.h"
-#include "net/registrationoptions.h"
-
class LoginData;
struct Token;
@@ -41,9 +39,6 @@ class LoginHandler notfinal : public Net::LoginHandler
virtual ~LoginHandler();
- int supportedOptionalActions() const override A_WARN_UNUSED
- { return Net::RegistrationOptions::SetGenderOnRegister; }
-
bool isRegistrationEnabled() const override final A_WARN_UNUSED;
void getRegistrationDetails() const override final;
diff --git a/src/net/eathena/loginhandler.cpp b/src/net/eathena/loginhandler.cpp
index 71bf67245..a50b0dc4a 100644
--- a/src/net/eathena/loginhandler.cpp
+++ b/src/net/eathena/loginhandler.cpp
@@ -130,14 +130,6 @@ void LoginHandler::sendVersion() const
generalHandler->flushSend();
}
-int LoginHandler::supportedOptionalActions() const
-{
- return serverFeatures->haveEmailOnRegister()
- ? Net::RegistrationOptions::SetEmailOnRegister
- | Net::RegistrationOptions::SetGenderOnRegister
- : Net::RegistrationOptions::SetGenderOnRegister;
-}
-
void LoginHandler::ping() const
{
createOutPacket(CMSG_LOGIN_PING);
diff --git a/src/net/eathena/loginhandler.h b/src/net/eathena/loginhandler.h
index b400c8dd5..990622450 100644
--- a/src/net/eathena/loginhandler.h
+++ b/src/net/eathena/loginhandler.h
@@ -54,8 +54,6 @@ class LoginHandler final : public Ea::LoginHandler
ServerInfo *getCharServer() const override final A_WARN_UNUSED;
- int supportedOptionalActions() const override final A_WARN_UNUSED;
-
void ping() const override final;
private:
diff --git a/src/net/loginhandler.h b/src/net/loginhandler.h
index 47979ca65..47bf6e554 100644
--- a/src/net/loginhandler.h
+++ b/src/net/loginhandler.h
@@ -46,11 +46,6 @@ class LoginHandler notfinal
virtual void disconnect() = 0;
- /**
- * @see OptionalAction
- */
- virtual int supportedOptionalActions() const A_WARN_UNUSED = 0;
-
virtual bool isRegistrationEnabled() const A_WARN_UNUSED = 0;
virtual void getRegistrationDetails() const = 0;
diff --git a/src/net/registrationoptions.h b/src/net/registrationoptions.h
deleted file mode 100644
index 99078e0ad..000000000
--- a/src/net/registrationoptions.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * The ManaPlus Client
- * Copyright (C) 2009 The Mana World Development Team
- * Copyright (C) 2009-2010 The Mana Developers
- * Copyright (C) 2011-2015 The ManaPlus Developers
- *
- * This file is part of The ManaPlus Client.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef NET_REGISTRATIONOPTIONS_H
-#define NET_REGISTRATIONOPTIONS_H
-
-namespace Net
-{
- namespace RegistrationOptions
- {
- enum
- {
- Unregister = 0x1,
- ChangeEmail = 0x2,
- SetEmailOnRegister = 0x4,
- SetGenderOnRegister = 0x8
- };
- }
-} // namespace Net
-
-#endif // NET_REGISTRATIONOPTIONS_H
diff --git a/src/net/tmwa/loginhandler.cpp b/src/net/tmwa/loginhandler.cpp
index 5a8aaf6c6..878499df6 100644
--- a/src/net/tmwa/loginhandler.cpp
+++ b/src/net/tmwa/loginhandler.cpp
@@ -125,11 +125,6 @@ void LoginHandler::requestUpdateHosts()
{
}
-int LoginHandler::supportedOptionalActions() const
-{
- return Net::RegistrationOptions::SetGenderOnRegister;
-}
-
void LoginHandler::sendVersion() const
{
}
diff --git a/src/net/tmwa/loginhandler.h b/src/net/tmwa/loginhandler.h
index e22e5c2bf..0f7adec48 100644
--- a/src/net/tmwa/loginhandler.h
+++ b/src/net/tmwa/loginhandler.h
@@ -43,8 +43,6 @@ class LoginHandler final : public Ea::LoginHandler
void disconnect() override final;
- int supportedOptionalActions() const override final A_WARN_UNUSED;
-
unsigned int getMaxPasswordLength() const override final A_WARN_UNUSED
{ return 24; }