Add timestamps for lastChannelActivity and lastSpokenTo for IrcUsers
[quassel.git] / src / common / ircuser.cpp
index 8acb678..9cb2dfa 100644 (file)
@@ -292,3 +292,14 @@ void IrcUser::removeUserModes(const QString &modes) {
   }
   emit userModesRemoved(modes);
 }
+
+void IrcUser::setLastChannelActivity(BufferId buffer, const QDateTime &time) {
+  _lastActivity[buffer] = time;
+  emit lastChannelActivityUpdated(buffer, time);
+}
+
+void IrcUser::setLastSpokenTo(BufferId buffer, const QDateTime &time) {
+  _lastSpokenTo[buffer] = time;
+  qDebug() << "last spoken to" << nick() << buffer << time;
+  emit lastSpokenToUpdated(buffer, time);
+}