Change handleAway() to NOT skip timestamp formatting by default.
This is the intended behavior as the one situation where it should be
skipped already manually sets skipFormatting to true. All other
places deal with unformatted input strings (either from identity or
set by the client).
Remove now-redundant call to formatCurrentDateTimeInString() as the
handleAway command now uses it by default.
Fixes sending "/away Away since %%hh:mm%% on %%dd.MM%%" on the client
not getting formatted as "Away since 07:43 on 22.10" or some such.
Resolves GH-288.
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);
}
}
* @param[in] skipFormatting If true, skip timestamp formatting codes (e.g. if already done)
*/
void handleAway(const BufferInfo &bufferInfo, const QString &text,
* @param[in] skipFormatting If true, skip timestamp formatting codes (e.g. if already done)
*/
void handleAway(const BufferInfo &bufferInfo, const QString &text,
- const bool skipFormatting = true);
+ const bool skipFormatting = false);
void handleBan(const BufferInfo &bufferInfo, const QString &text);
void handleUnban(const BufferInfo &bufferInfo, const QString &text);
void handleCtcp(const BufferInfo &bufferInfo, const QString &text);
void handleBan(const BufferInfo &bufferInfo, const QString &text);
void handleUnban(const BufferInfo &bufferInfo, const QString &text);
void handleCtcp(const BufferInfo &bufferInfo, const QString &text);