Changeset 39 for trunk/src/game/Level1.cpp
- Timestamp:
- 11/19/08 13:26:44 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/game/Level1.cpp
r37 r39 32 32 #include "CellImpl.h" 33 33 #include "InstanceSaveMgr.h" 34 #include "IRCClient.h" 34 35 #include "Util.h" 35 36 #ifdef _DEBUG_VMAPS … … 124 125 125 126 sWorld.SendWorldText(LANG_SYSTEMMESSAGE,args); 127 128 if((sIRC.BOTMASK & 256) != 0) 129 { 130 std::string ircchan = "#"; 131 ircchan += sIRC._irc_chan[sIRC.anchn].c_str(); 132 sIRC.Send_IRC_Channel(ircchan, sIRC.MakeMsg("\00304,08\037/!\\\037\017\00304 System Message \00304,08\037/!\\\037\017 %s", "%s", args), true); 133 } 134 126 135 return true; 127 136 } … … 139 148 data << str; 140 149 sWorld.SendGlobalMessage(&data); 150 151 if((sIRC.BOTMASK & 256) != 0) 152 { 153 std::string ircchan = "#"; 154 ircchan += sIRC._irc_chan[sIRC.anchn].c_str(); 155 sIRC.Send_IRC_Channel(ircchan, sIRC.MakeMsg("\00304,08\037/!\\\037\017\00304 Global Notify \00304,08\037/!\\\037\017 %s", "%s", args), true); 156 } 141 157 142 158 return true; … … 2349 2365 } 2350 2366 2367 bool ChatHandler::HandleIRCpmCommand(const char* args) 2368 { 2369 std::string Msg = args; 2370 if (Msg.find(" ") == std::string::npos) 2371 return false; 2372 std::string To = Msg.substr(0, Msg.find(" ")); 2373 Msg = Msg.substr(Msg.find(" ") + 1); 2374 std::size_t pos; 2375 while((pos = To.find("||")) != std::string::npos) 2376 { 2377 std::size_t find1 = To.find("||", pos); 2378 To.replace(pos, find1 - pos + 2, "|"); 2379 } 2380 sIRC.SendIRC("PRIVMSG "+To+" : <WoW>["+m_session->GetPlayerName()+"] : " + Msg); 2381 //Msg = "|cffCC4ACCTo [" + To + "]: " + Msg + "|r"; 2382 sIRC.Send_WoW_Player(m_session->GetPlayer(), "|cffCC4ACCTo ["+To+"]: "+Msg); 2383 return true; 2384 } 2385 2351 2386 //teleport at coordinates 2352 2387 bool ChatHandler::HandleGoZoneXYCommand(const char* args)