Example #1
0
CModule::EModRet TwitchGroupChat::OnRawMessage(CMessage &msg)
{
    if(msg.GetCommand().Equals("WHISPER"))
        msg.SetCommand("PRIVMSG");

    CString realNick = msg.GetTag("display-name").Trim_n();
    if(realNick != "")
        msg.GetNick().SetNick(realNick);

    CIRCSock *twnw = GetTwitchNetwork();
    if(twnw)
        twnw->ReadLine(msg.ToString());

    return CModule::CONTINUE;
}