Changeset 44 for trunk/src/trinitycore/Master.cpp
- Timestamp:
- 11/19/08 13:27:40 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/trinitycore/Master.cpp
r39 r44 1 1 /* 2 * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> 2 * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> 3 * 4 * Thanks to the original authors: MaNGOS <http://www.mangosproject.org/> 3 5 * 4 6 * This program is free software; you can redistribute it and/or modify … … 9 11 * This program is distributed in the hope that it will be useful, 10 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 14 * GNU General Public License for more details. 13 15 * 14 16 * You should have received a copy of the GNU General Public License 15 17 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 19 */ 18 20 19 21 /** \file 20 \ingroup mangosd22 \ingroup Trinityd 21 23 */ 22 24 … … 39 41 #include "ScriptCalls.h" 40 42 #include "Util.h" 41 #include "IRCClient.h"42 43 43 44 #include "sockets/TcpSocket.h" … … 156 157 ipaddr_t raip; 157 158 if (!Utility::u2ip (stringip, raip)) 158 sLog.outError (" MaNGOSRA can not bind to ip %s", stringip.c_str ());159 sLog.outError ("Trinity RA can not bind to ip %s", stringip.c_str ()); 159 160 else if (RAListenSocket.Bind (raip, raport)) 160 sLog.outError (" MaNGOSRA can not bind to port %d on %s", raport, stringip.c_str ());161 sLog.outError ("Trinity RA can not bind to port %d on %s", raport, stringip.c_str ()); 161 162 else 162 163 { … … 228 229 return 1; 229 230 230 ///- Load IRC Config (need DB for gm levels, AutoBroadcast uses world timers)231 sIRC.LoadConfig(sIRC.CfgFile);232 233 231 ///- Initialize the World 234 232 sWorld.SetInitialWorldSettings(); … … 243 241 // set server online 244 242 loginDatabase.PExecute("UPDATE realmlist SET color = 0, population = 0 WHERE id = '%d'",realmID); 245 246 // Create table: has_logged_in_before - used for certain custom options247 sLog.outBasic("ImpConfig: Creating/Checking table 'has_logged_in_before'...");248 CharacterDatabase.PExecute("CREATE TABLE IF NOT EXISTS `has_logged_in_before` (`guid` int(11) unsigned NOT NULL default '0', PRIMARY KEY (`guid`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='ImpConfig check';");249 sLog.outBasic("ImpConfig: Done...");250 243 251 244 #ifdef WIN32 … … 278 271 if(!curAff ) 279 272 { 280 sLog.outError("Processors marked in UseProcessors bitmask (hex) %x not accessible for mangosd. Accessible processors bitmask (hex): %x",Aff,appAff);273 sLog.outError("Processors marked in UseProcessors bitmask (hex) %x not accessible for Trinityd. Accessible processors bitmask (hex): %x",Aff,appAff); 281 274 } 282 275 else … … 299 292 sLog.outString("TrinityCore process priority class set to HIGH"); 300 293 else 301 sLog.outError("ERROR: Can't set mangosd process priority class.");294 sLog.outError("ERROR: Can't set Trinityd process priority class."); 302 295 sLog.outString(); 303 296 } … … 313 306 uint32 numLoops = (sConfig.GetIntDefault( "MaxPingTime", 30 ) * (MINUTE * 1000000 / socketSelecttime)); 314 307 uint32 loopCounter = 0; 315 316 // Start up IRC bot317 ZThread::Thread irc(new IRCClient);318 irc.setPriority ((ZThread::Priority )2);319 320 321 308 322 309 ///- Start up freeze catcher thread