if (net->isMe(ircuser)) {
net->setChannelJoined(channel);
+ // Mark the message as Self
+ e->setFlag(EventManager::Self);
// FIXME use event
net->putRawLine(net->serverEncode("MODE " + channel)); // we want to know the modes of the channel we just joined, so we ask politely
}
ircUser->removeUserModes(removeModes);
if (e->network()->isMe(ircUser)) {
+ // Mark the message as Self
+ e->setFlag(EventManager::Self);
coreNetwork(e)->updatePersistentModes(addModes, removeModes);
}
}
}
+void CoreSessionEventProcessor::processIrcEventNick(IrcEvent *e)
+{
+ if (checkParamCount(e, 1)) {
+ IrcUser *ircuser = e->network()->updateNickFromMask(e->prefix());
+ if (!ircuser) {
+ qWarning() << Q_FUNC_INFO << "Unknown IrcUser!";
+ return;
+ }
+
+ if (e->network()->isMe(ircuser)) {
+ // Mark the message as Self
+ e->setFlag(EventManager::Self);
+ }
+
+ // Actual processing is handled in lateProcessIrcEventNick(), this just sets the event flag
+ }
+}
+
+
void CoreSessionEventProcessor::lateProcessIrcEventNick(IrcEvent *e)
{
if (checkParamCount(e, 1)) {
}
+void CoreSessionEventProcessor::processIrcEventPart(IrcEvent *e)
+{
+ if (checkParamCount(e, 1)) {
+ IrcUser *ircuser = e->network()->updateNickFromMask(e->prefix());
+ if (!ircuser) {
+ qWarning() << Q_FUNC_INFO<< "Unknown IrcUser!";
+ return;
+ }
+
+ if (e->network()->isMe(ircuser)) {
+ // Mark the message as Self
+ e->setFlag(EventManager::Self);
+ }
+
+ // Actual processing is handled in lateProcessIrcEventNick(), this just sets the event flag
+ }
+}
+
+
void CoreSessionEventProcessor::lateProcessIrcEventPart(IrcEvent *e)
{
if (checkParamCount(e, 1)) {
}
QString channel = e->params().at(0);
ircuser->partChannel(channel);
- if (e->network()->isMe(ircuser))
+ if (e->network()->isMe(ircuser)) {
qobject_cast<CoreNetwork *>(e->network())->setChannelParted(channel);
+ }
}
}
if (!ircuser)
return;
+ if (e->network()->isMe(ircuser)) {
+ // Mark the message as Self
+ e->setFlag(EventManager::Self);
+ }
+
QString msg;
if (e->params().count() > 0)
msg = e->params()[0];
void CoreSessionEventProcessor::processIrcEventTopic(IrcEvent *e)
{
if (checkParamCount(e, 2)) {
- e->network()->updateNickFromMask(e->prefix());
+ IrcUser *ircuser = e->network()->updateNickFromMask(e->prefix());
+
+ if (e->network()->isMe(ircuser)) {
+ // Mark the message as Self
+ e->setFlag(EventManager::Self);
+ }
+
IrcChannel *channel = e->network()->ircChannel(e->params().at(0));
if (channel)
channel->setTopic(e->params().at(1));