Show
Ignore:
Timestamp:
11/19/08 13:26:44 (17 years ago)
Author:
yumileroy
Message:

[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.

Original author: XTZGZoReX
Date: 2008-10-12 14:03:38-05:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/game/Level1.cpp

    r37 r39  
    3232#include "CellImpl.h" 
    3333#include "InstanceSaveMgr.h" 
     34#include "IRCClient.h" 
    3435#include "Util.h" 
    3536#ifdef _DEBUG_VMAPS 
     
    124125 
    125126    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 
    126135    return true; 
    127136} 
     
    139148    data << str; 
    140149    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    } 
    141157 
    142158    return true; 
     
    23492365} 
    23502366 
     2367bool 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 
    23512386//teleport at coordinates 
    23522387bool ChatHandler::HandleGoZoneXYCommand(const char* args)