aboutsummaryrefslogtreecommitdiff
path: root/src/trinitycore/CliRunnable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/trinitycore/CliRunnable.cpp')
-rw-r--r--src/trinitycore/CliRunnable.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/trinitycore/CliRunnable.cpp b/src/trinitycore/CliRunnable.cpp
index 2a92273f764..5f1518483f5 100644
--- a/src/trinitycore/CliRunnable.cpp
+++ b/src/trinitycore/CliRunnable.cpp
@@ -36,6 +36,7 @@
#include "MapManager.h"
#include "PlayerDump.h"
#include "Player.h"
+#include "IRCClient.h"
//CliCommand and CliCommandHolder are defined in World.h to avoid cyclic deps
@@ -313,6 +314,14 @@ void CliBroadcast(char *text,pPrintf zprintf)
sWorld.SendWorldText(LANG_SYSTEMMESSAGE,textUtf8.c_str());
zprintf("Broadcasting to the world: %s\r\n",textUtf8.c_str());
+
+ 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", text), true);
+ }
+
}
/// Print the list of commands and associated description