Core/Commands: Allow to search for other account/characters from a selected player without having to write the ip as argument (By Bizzy)
This commit is contained in:
@@ -731,7 +731,7 @@ this method is called when group is inserted, or player / group is removed from
|
|||||||
it must be called after fully adding the members of a group to ensure group joining
|
it must be called after fully adding the members of a group to ensure group joining
|
||||||
should be called from Battleground::RemovePlayer function in some cases
|
should be called from Battleground::RemovePlayer function in some cases
|
||||||
*/
|
*/
|
||||||
void BattlegroundQueue::BattlegroundQueueUpdate(uint32 diff, BattlegroundTypeId bgTypeId, BattlegroundBracketId bracket_id, uint8 arenaType, bool isRated, uint32 arenaRating)
|
void BattlegroundQueue::BattlegroundQueueUpdate(uint32 /*diff*/, BattlegroundTypeId bgTypeId, BattlegroundBracketId bracket_id, uint8 arenaType, bool isRated, uint32 arenaRating)
|
||||||
{
|
{
|
||||||
//if no players in queue - do nothing
|
//if no players in queue - do nothing
|
||||||
if (m_QueuedGroups[bracket_id][BG_QUEUE_PREMADE_ALLIANCE].empty() &&
|
if (m_QueuedGroups[bracket_id][BG_QUEUE_PREMADE_ALLIANCE].empty() &&
|
||||||
|
|||||||
@@ -707,13 +707,25 @@ bool ChatHandler::HandleCombatStopCommand(const char* args)
|
|||||||
|
|
||||||
bool ChatHandler::HandleLookupPlayerIpCommand(const char* args)
|
bool ChatHandler::HandleLookupPlayerIpCommand(const char* args)
|
||||||
{
|
{
|
||||||
|
std::string ip;
|
||||||
|
int32 limit;
|
||||||
|
char* limit_str;
|
||||||
|
|
||||||
|
Player *chr = getSelectedPlayer();
|
||||||
|
if (chr == NULL)
|
||||||
|
{
|
||||||
if (!*args)
|
if (!*args)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
std::string ip = strtok ((char*)args, " ");
|
ip = strtok ((char*)args, " ");
|
||||||
char* limit_str = strtok (NULL, " ");
|
limit_str = strtok (NULL, " ");
|
||||||
int32 limit = limit_str ? atoi (limit_str) : -1;
|
limit = limit_str ? atoi (limit_str) : -1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ip = chr->GetSession()->GetRemoteAddress();
|
||||||
|
limit = -1;
|
||||||
|
}
|
||||||
|
|
||||||
LoginDatabase.EscapeString(ip);
|
LoginDatabase.EscapeString(ip);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user