~ubuntu-branches/ubuntu/trusty/manaplus/trusty-proposed

« back to all changes in this revision

Viewing changes to src/net/tmwa/chathandler.cpp

  • Committer: Package Import Robot
  • Author(s): Patrick Matthäi
  • Date: 2014-01-10 11:00:12 UTC
  • mfrom: (1.1.17)
  • Revision ID: package-import@ubuntu.com-20140110110012-4mt9zewufrl9bbtj
Tags: 1.4.1.4-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 *  The ManaPlus Client
3
3
 *  Copyright (C) 2004-2009  The Mana World Development Team
4
4
 *  Copyright (C) 2009-2010  The Mana Developers
5
 
 *  Copyright (C) 2011-2013  The ManaPlus Developers
 
5
 *  Copyright (C) 2011-2014  The ManaPlus Developers
6
6
 *
7
7
 *  This file is part of The ManaPlus Client.
8
8
 *
107
107
    BLOCK_END("ChatHandler::handleMessage")
108
108
}
109
109
 
110
 
void ChatHandler::talk(const std::string &text,
111
 
                       const std::string &channel) const
 
110
void ChatHandler::talk(const std::string &restrict text,
 
111
                       const std::string &restrict channel) const
112
112
{
113
113
    if (!player_node)
114
114
        return;
142
142
    outMsg.writeString(mes, static_cast<int>(mes.length()));
143
143
}
144
144
 
145
 
void ChatHandler::privateMessage(const std::string &recipient,
146
 
                                 const std::string &text)
 
145
void ChatHandler::privateMessage(const std::string &restrict recipient,
 
146
                                 const std::string &restrict text)
147
147
{
148
148
    MessageOut outMsg(CMSG_CHAT_WHISPER);
149
149
    outMsg.writeInt16(static_cast<int16_t>(text.length() + 28));
193
193
    delete outMsg;
194
194
}
195
195
 
196
 
void ChatHandler::processRaw(MessageOut &outMsg, const std::string &line)
 
196
void ChatHandler::processRaw(MessageOut &restrict outMsg,
 
197
                             const std::string &restrict line)
197
198
{
198
199
    size_t pos = line.find(":");
199
200
    if (pos == std::string::npos)