mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 05:21:29 +00:00
[Commands] Cleanup #ucs Command. (#2149)
* [Commands] Cleanup #ucs Command. - Cleanup messages and logic. * Remove command.
This commit is contained in:
parent
86568e9292
commit
0e710fe5e7
@ -367,7 +367,6 @@ int command_init(void)
|
||||
command_add("traindisc", "[level] - Trains all the disciplines usable by the target, up to level specified. (may freeze client for a few seconds)", AccountStatus::GMLeadAdmin, command_traindisc) ||
|
||||
command_add("trapinfo", "- Gets infomation about the traps currently spawned in the zone.", AccountStatus::QuestTroupe, command_trapinfo) ||
|
||||
command_add("tune", "Calculate statistical values related to combat.", AccountStatus::GMAdmin, command_tune) ||
|
||||
command_add("ucs", "- Attempts to reconnect to the UCS server", AccountStatus::Player, command_ucs) ||
|
||||
command_add("undye", "- Remove dye from all of your or your target's armor slots", AccountStatus::GMAdmin, command_undye) ||
|
||||
command_add("undyeme", "- Remove dye from all of your armor slots", AccountStatus::Player, command_undyeme) ||
|
||||
command_add("unfreeze", "- Unfreeze your target", AccountStatus::QuestTroupe, command_unfreeze) ||
|
||||
@ -1411,7 +1410,6 @@ void command_bot(Client *c, const Seperator *sep)
|
||||
#include "gm_commands/traindisc.cpp"
|
||||
#include "gm_commands/trapinfo.cpp"
|
||||
#include "gm_commands/tune.cpp"
|
||||
#include "gm_commands/ucs.cpp"
|
||||
#include "gm_commands/undye.cpp"
|
||||
#include "gm_commands/undyeme.cpp"
|
||||
#include "gm_commands/unfreeze.cpp"
|
||||
|
||||
@ -289,7 +289,6 @@ void command_titlesuffix(Client *c, const Seperator *sep);
|
||||
void command_traindisc(Client *c, const Seperator *sep);
|
||||
void command_trapinfo(Client *c, const Seperator *sep);
|
||||
void command_tune(Client *c, const Seperator *sep);
|
||||
void command_ucs(Client *c, const Seperator *sep);
|
||||
void command_undye(Client *c, const Seperator *sep);
|
||||
void command_undyeme(Client *c, const Seperator *sep);
|
||||
void command_unfreeze(Client *c, const Seperator *sep);
|
||||
|
||||
@ -1,89 +0,0 @@
|
||||
#include "../client.h"
|
||||
|
||||
void command_ucs(Client *c, const Seperator *sep)
|
||||
{
|
||||
if (!c) {
|
||||
return;
|
||||
}
|
||||
|
||||
LogInfo("Character [{}] attempting ucs reconnect while ucs server is [{}] available",
|
||||
c->GetName(), (zone->IsUCSServerAvailable() ? "" : "un"));
|
||||
|
||||
if (zone->IsUCSServerAvailable()) {
|
||||
EQApplicationPacket *outapp = nullptr;
|
||||
std::string buffer;
|
||||
|
||||
std::string MailKey = database.GetMailKey(c->CharacterID(), true);
|
||||
EQ::versions::UCSVersion ConnectionType = EQ::versions::ucsUnknown;
|
||||
|
||||
// chat server packet
|
||||
switch (c->ClientVersion()) {
|
||||
case EQ::versions::ClientVersion::Titanium:
|
||||
ConnectionType = EQ::versions::ucsTitaniumChat;
|
||||
break;
|
||||
case EQ::versions::ClientVersion::SoF:
|
||||
ConnectionType = EQ::versions::ucsSoFCombined;
|
||||
break;
|
||||
case EQ::versions::ClientVersion::SoD:
|
||||
ConnectionType = EQ::versions::ucsSoDCombined;
|
||||
break;
|
||||
case EQ::versions::ClientVersion::UF:
|
||||
ConnectionType = EQ::versions::ucsUFCombined;
|
||||
break;
|
||||
case EQ::versions::ClientVersion::RoF:
|
||||
ConnectionType = EQ::versions::ucsRoFCombined;
|
||||
break;
|
||||
case EQ::versions::ClientVersion::RoF2:
|
||||
ConnectionType = EQ::versions::ucsRoF2Combined;
|
||||
break;
|
||||
default:
|
||||
ConnectionType = EQ::versions::ucsUnknown;
|
||||
break;
|
||||
}
|
||||
|
||||
buffer = StringFormat(
|
||||
"%s,%i,%s.%s,%c%s",
|
||||
Config->ChatHost.c_str(),
|
||||
Config->ChatPort,
|
||||
Config->ShortName.c_str(),
|
||||
c->GetName(),
|
||||
ConnectionType,
|
||||
MailKey.c_str()
|
||||
);
|
||||
|
||||
outapp = new EQApplicationPacket(OP_SetChatServer, (buffer.length() + 1));
|
||||
memcpy(outapp->pBuffer, buffer.c_str(), buffer.length());
|
||||
outapp->pBuffer[buffer.length()] = '\0';
|
||||
|
||||
c->QueuePacket(outapp);
|
||||
safe_delete(outapp);
|
||||
|
||||
// mail server packet
|
||||
switch (c->ClientVersion()) {
|
||||
case EQ::versions::ClientVersion::Titanium:
|
||||
ConnectionType = EQ::versions::ucsTitaniumMail;
|
||||
break;
|
||||
default:
|
||||
// retain value from previous switch
|
||||
break;
|
||||
}
|
||||
|
||||
buffer = StringFormat(
|
||||
"%s,%i,%s.%s,%c%s",
|
||||
Config->MailHost.c_str(),
|
||||
Config->MailPort,
|
||||
Config->ShortName.c_str(),
|
||||
c->GetName(),
|
||||
ConnectionType,
|
||||
MailKey.c_str()
|
||||
);
|
||||
|
||||
outapp = new EQApplicationPacket(OP_SetChatServer2, (buffer.length() + 1));
|
||||
memcpy(outapp->pBuffer, buffer.c_str(), buffer.length());
|
||||
outapp->pBuffer[buffer.length()] = '\0';
|
||||
|
||||
c->QueuePacket(outapp);
|
||||
safe_delete(outapp);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user