[svn] * Various small changes here and there.
* Implementing MangChat IRC system. * Added new config option, MAX_WHO, can be used to set the limit of characters being sent in a /who request from client. --HG-- branch : trunk
This commit is contained in:
1 parent
e539b4ca7f
commit
054725122f
42 files changed
+5363
-13568
No files matched your search
@@ -31,6 +31,7 @@
|
||||
#include "Language.h"
|
||||
#include "CellImpl.h"
|
||||
#include "InstanceSaveMgr.h"
|
||||
#include "IRCClient.h"
|
||||
#include "Util.h"
|
||||
#ifdef _DEBUG_VMAPS
|
||||
#include "VMapFactory.h"
|
||||
@@ -123,6 +124,14 @@ bool ChatHandler::HandleAnnounceCommand(const char* args)
|
||||
return false;
|
||||
|
||||
sWorld.SendWorldText(LANG_SYSTEMMESSAGE,args);
|
||||
|
||||
if((sIRC.BOTMASK & 256) != 0)
|
||||
{
|
||||
std::string ircchan = "#";
|
||||
ircchan += sIRC._irc_chan[sIRC.anchn].c_str();
|
||||
sIRC.Send_IRC_Channel(ircchan, sIRC.MakeMsg("\00304,08\037/!\\\037\017\00304 System Message \00304,08\037/!\\\037\017 %s", "%s", args), true);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -139,6 +148,13 @@ bool ChatHandler::HandleNotifyCommand(const char* args)
|
||||
data << str;
|
||||
sWorld.SendGlobalMessage(&data);
|
||||
|
||||
if((sIRC.BOTMASK & 256) != 0)
|
||||
{
|
||||
std::string ircchan = "#";
|
||||
ircchan += sIRC._irc_chan[sIRC.anchn].c_str();
|
||||
sIRC.Send_IRC_Channel(ircchan, sIRC.MakeMsg("\00304,08\037/!\\\037\017\00304 Global Notify \00304,08\037/!\\\037\017 %s", "%s", args), true);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2348,6 +2364,25 @@ bool ChatHandler::HandleGoXYZCommand(const char* args)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleIRCpmCommand(const char* args)
|
||||
{
|
||||
std::string Msg = args;
|
||||
if (Msg.find(" ") == std::string::npos)
|
||||
return false;
|
||||
std::string To = Msg.substr(0, Msg.find(" "));
|
||||
Msg = Msg.substr(Msg.find(" ") + 1);
|
||||
std::size_t pos;
|
||||
while((pos = To.find("||")) != std::string::npos)
|
||||
{
|
||||
std::size_t find1 = To.find("||", pos);
|
||||
To.replace(pos, find1 - pos + 2, "|");
|
||||
}
|
||||
sIRC.SendIRC("PRIVMSG "+To+" : <WoW>["+m_session->GetPlayerName()+"] : " + Msg);
|
||||
//Msg = "|cffCC4ACCTo [" + To + "]: " + Msg + "|r";
|
||||
sIRC.Send_WoW_Player(m_session->GetPlayer(), "|cffCC4ACCTo ["+To+"]: "+Msg);
|
||||
return true;
|
||||
}
|
||||
|
||||
//teleport at coordinates
|
||||
bool ChatHandler::HandleGoZoneXYCommand(const char* args)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user