mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-02 20:56:37 +00:00
[Commands] Cleanup #ban, #ipban, #flag, #kick, #setlsinfo, and #setpass Commands. (#2104)
* [Commands] Cleanup #ban, #ipban, #flag, and #kick Commands. - Cleanup messages and logic. - Add ServerFlagUpdate_Struct for flag updates. * Add #setlsinfo and #setpass to cleanup. * Update setlsinfo.cpp * Update database.cpp * Update database.cpp * Update command.cpp
This commit is contained in:
+2
-2
@@ -490,7 +490,7 @@ bool Client::HandleSendLoginInfoPacket(const EQApplicationPacket *app)
|
||||
if (!is_player_zoning) {
|
||||
SendExpansionInfo();
|
||||
SendCharInfo();
|
||||
database.LoginIP(cle->AccountID(), long2ip(GetIP()).c_str());
|
||||
database.LoginIP(cle->AccountID(), long2ip(GetIP()));
|
||||
}
|
||||
|
||||
cle->SetIP(GetIP());
|
||||
@@ -997,7 +997,7 @@ bool Client::HandlePacket(const EQApplicationPacket *app) {
|
||||
|
||||
// Voidd: Anti-GM Account hack, Checks source ip against valid GM Account IP Addresses
|
||||
if (RuleB(World, GMAccountIPList) && GetAdmin() >= (RuleI(World, MinGMAntiHackStatus))) {
|
||||
if(!database.CheckGMIPs(long2ip(GetIP()).c_str(), GetAccountID())) {
|
||||
if(!database.CheckGMIPs(long2ip(GetIP()), GetAccountID())) {
|
||||
LogInfo("GM Account not permited from source address [{}] and accountid [{}]", long2ip(GetIP()).c_str(), GetAccountID());
|
||||
eqs->Close();
|
||||
}
|
||||
|
||||
+3
-4
@@ -752,15 +752,14 @@ void ConsoleSetPass(
|
||||
connection->SendLine("Format: setpass accountname password");
|
||||
}
|
||||
else {
|
||||
std::string prefix = "eqemu";
|
||||
std::string prefix = "eqemu";
|
||||
std::string raw_user = "";
|
||||
|
||||
ParseAccountString(args[0], raw_user, prefix);
|
||||
|
||||
int16 tmpstatus = 0;
|
||||
uint32 tmpid = database.GetAccountIDByName(raw_user.c_str(), prefix.c_str(), &tmpstatus);
|
||||
auto account_id = database.GetAccountIDByName(raw_user, prefix);
|
||||
|
||||
if (!tmpid) {
|
||||
if (!account_id) {
|
||||
connection->SendLine("Error: Account not found");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user