Changeset 44 for trunk/src/trinitycore/CliRunnable.cpp
- Timestamp:
- 11/19/08 13:27:40 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/trinitycore/CliRunnable.cpp
r41 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 /// \addtogroup mangosd21 /// \addtogroup Trinityd 20 22 /// @{ 21 23 /// \file … … 37 39 #include "PlayerDump.h" 38 40 #include "Player.h" 39 #include "IRCClient.h"40 41 41 42 //CliCommand and CliCommandHolder are defined in World.h to avoid cyclic deps … … 315 316 sWorld.SendWorldText(LANG_SYSTEMMESSAGE,textUtf8.c_str()); 316 317 zprintf("Broadcasting to the world: %s\r\n",textUtf8.c_str()); 317 318 if((sIRC.BOTMASK & 256) != 0)319 {320 std::string ircchan = "#";321 ircchan += sIRC._irc_chan[sIRC.anchn].c_str();322 sIRC.Send_IRC_Channel(ircchan, sIRC.MakeMsg("\00304,08\037/!\\\037\017\00304 System Message \00304,08\037/!\\\037\017 %s", "%s", text), true);323 }324 325 318 } 326 319 … … 641 634 } 642 635 643 /// Display % MaNGOSversion636 /// Display %TrinIty version 644 637 void CliVersion(char*,pPrintf zprintf) 645 638 { … … 948 941 if (!result) 949 942 { 950 zprintf(objmgr.Get MangosStringForDBCLocale(LANG_COMMAND_TELE_NOTFOUND),"\r\n");943 zprintf(objmgr.GetTrinityStringForDBCLocale(LANG_COMMAND_TELE_NOTFOUND),"\r\n"); 951 944 return; 952 945 } … … 962 955 if(!MapManager::IsValidMapCoord(mapid,x,y,z,ort)) 963 956 { 964 zprintf(objmgr.Get MangosStringForDBCLocale(LANG_INVALID_TARGET_COORD),"\r\n",x,y,mapid);957 zprintf(objmgr.GetTrinityStringForDBCLocale(LANG_INVALID_TARGET_COORD),"\r\n",x,y,mapid); 965 958 return; 966 959 } … … 972 965 if(chr->IsBeingTeleported()==true) 973 966 { 974 zprintf(objmgr.Get MangosStringForDBCLocale(LANG_IS_TELEPORTED),"\r\n",chr->GetName());967 zprintf(objmgr.GetTrinityStringForDBCLocale(LANG_IS_TELEPORTED),"\r\n",chr->GetName()); 975 968 return; 976 969 } … … 978 971 if(chr->isInFlight()) 979 972 { 980 zprintf(objmgr.Get MangosStringForDBCLocale(LANG_CHAR_IN_FLIGHT),"\r\n",chr->GetName());973 zprintf(objmgr.GetTrinityStringForDBCLocale(LANG_CHAR_IN_FLIGHT),"\r\n",chr->GetName()); 981 974 return; 982 975 } 983 976 984 zprintf(objmgr.Get MangosStringForDBCLocale(LANG_TELEPORTING_TO),"\r\n",chr->GetName(),"", location.c_str());977 zprintf(objmgr.GetTrinityStringForDBCLocale(LANG_TELEPORTING_TO),"\r\n",chr->GetName(),"", location.c_str()); 985 978 986 979 chr->SaveRecallPosition(); … … 990 983 else if (uint64 guid = objmgr.GetPlayerGUIDByName(name.c_str())) 991 984 { 992 zprintf(objmgr.Get MangosStringForDBCLocale(LANG_TELEPORTING_TO),"\r\n",name.c_str(), objmgr.GetMangosStringForDBCLocale(LANG_OFFLINE), location.c_str());985 zprintf(objmgr.GetTrinityStringForDBCLocale(LANG_TELEPORTING_TO),"\r\n",name.c_str(), objmgr.GetTrinityStringForDBCLocale(LANG_OFFLINE), location.c_str()); 993 986 Player::SavePositionInDB(mapid,x,y,z,ort,MapManager::Instance().GetZoneId(mapid,x,y),guid); 994 987 } 995 988 else 996 zprintf(objmgr.Get MangosStringForDBCLocale(LANG_NO_PLAYER),"\r\n",name.c_str());989 zprintf(objmgr.GetTrinityStringForDBCLocale(LANG_NO_PLAYER),"\r\n",name.c_str()); 997 990 } 998 991 … … 1098 1091 ///- Save players 1099 1092 ObjectAccessor::Instance().SaveAllPlayers(); 1100 zprintf( objmgr.Get MangosStringForDBCLocale(LANG_PLAYERS_SAVED) );1093 zprintf( objmgr.GetTrinityStringForDBCLocale(LANG_PLAYERS_SAVED) ); 1101 1094 1102 1095 ///- Send a message