core: Fix timestamps in manual /away messages
[quassel.git] / src / core / coresession.cpp
index 43b2234..2ca9627 100644 (file)
@@ -662,15 +662,16 @@ void CoreSession::clientsDisconnected()
 
         if (identity->detachAwayEnabled() && !me->isAway()) {
             if (!identity->detachAwayReason().isEmpty())
 
         if (identity->detachAwayEnabled() && !me->isAway()) {
             if (!identity->detachAwayReason().isEmpty())
-                awayReason = formatCurrentDateTimeInString(identity->detachAwayReason());
+                awayReason = identity->detachAwayReason();
             net->setAutoAwayActive(true);
             net->setAutoAwayActive(true);
+            // Allow handleAway() to format the current date/time in the string.
             net->userInputHandler()->handleAway(BufferInfo(), awayReason);
         }
     }
 }
 
 
             net->userInputHandler()->handleAway(BufferInfo(), awayReason);
         }
     }
 }
 
 
-void CoreSession::globalAway(const QString &msg)
+void CoreSession::globalAway(const QString &msg, const bool skipFormatting)
 {
     QHash<NetworkId, CoreNetwork *>::iterator netIter = _networks.begin();
     CoreNetwork *net = 0;
 {
     QHash<NetworkId, CoreNetwork *>::iterator netIter = _networks.begin();
     CoreNetwork *net = 0;
@@ -681,7 +682,7 @@ void CoreSession::globalAway(const QString &msg)
         if (!net->isConnected())
             continue;
 
         if (!net->isConnected())
             continue;
 
-        net->userInputHandler()->issueAway(msg, false /* no force away */);
+        net->userInputHandler()->issueAway(msg, false /* no force away */, skipFormatting);
     }
 }
 
     }
 }