From 054725122f1ef534063ffcbc54b25e167ec3ed9c Mon Sep 17 00:00:00 2001 From: XTZGZoReX Date: Sun, 12 Oct 2008 14:03:38 -0500 Subject: [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 --- src/trinitycore/Master.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/trinitycore/Master.cpp') diff --git a/src/trinitycore/Master.cpp b/src/trinitycore/Master.cpp index ee42f16b87a..216a48c59c0 100644 --- a/src/trinitycore/Master.cpp +++ b/src/trinitycore/Master.cpp @@ -38,6 +38,7 @@ #include "RASocket.h" #include "ScriptCalls.h" #include "Util.h" +#include "IRCClient.h" #include "sockets/TcpSocket.h" #include "sockets/Utility.h" @@ -226,6 +227,9 @@ int Master::Run() if (!_StartDB()) return 1; + ///- Load IRC Config (need DB for gm levels, AutoBroadcast uses world timers) + sIRC.LoadConfig(sIRC.CfgFile); + ///- Initialize the World sWorld.SetInitialWorldSettings(); @@ -309,6 +313,12 @@ int Master::Run() uint32 numLoops = (sConfig.GetIntDefault( "MaxPingTime", 30 ) * (MINUTE * 1000000 / socketSelecttime)); uint32 loopCounter = 0; + // Start up IRC bot + ZThread::Thread irc(new IRCClient); + irc.setPriority ((ZThread::Priority )2); + + + ///- Start up freeze catcher thread uint32 freeze_delay = sConfig.GetIntDefault("MaxCoreStuckTime", 0); if(freeze_delay) -- cgit v1.2.3