Merge pull request #259 from AwesomeAim/changepass_order
Ensure /changepass always has arg 0 as the password
This commit is contained in:
commit
eab5c992f3
@ -270,18 +270,16 @@ void AOClient::cmdLogout(int argc, QStringList argv)
|
|||||||
void AOClient::cmdChangePassword(int argc, QStringList argv)
|
void AOClient::cmdChangePassword(int argc, QStringList argv)
|
||||||
{
|
{
|
||||||
QString l_username;
|
QString l_username;
|
||||||
QString l_password;
|
QString l_password = argv[0];
|
||||||
if (argc == 1) {
|
if (argc == 1) {
|
||||||
if (m_moderator_name.isEmpty()) {
|
if (m_moderator_name.isEmpty()) {
|
||||||
sendServerMessage("You are not logged in.");
|
sendServerMessage("You are not logged in.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
l_username = m_moderator_name;
|
l_username = m_moderator_name;
|
||||||
l_password = argv[0];
|
|
||||||
}
|
}
|
||||||
else if (argc == 2 && checkAuth(ACLFlags.value("SUPER"))) {
|
else if (argc == 2 && checkAuth(ACLFlags.value("SUPER"))) {
|
||||||
l_username = argv[0];
|
l_username = argv[1];
|
||||||
l_password = argv[1];
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
sendServerMessage("Invalid command syntax.");
|
sendServerMessage("Invalid command syntax.");
|
||||||
|
Loading…
Reference in New Issue
Block a user