mirror of https://github.com/SeanOMik/znc-push.git
Fix bug in replied condition
For any channel/PM where the user hasn't yet sent a message, the replied condition would always return false due to failing a `0 < 0` expression. The fix special-cases last_notification_time values of 0 to always return true.
This commit is contained in:
parent
5c5c198ab7
commit
5b24f18c37
|
@ -332,7 +332,9 @@ class CNotifoMod : public CModule
|
|||
bool replied(const CString& context)
|
||||
{
|
||||
CString value = options["replied"].AsLower();
|
||||
return value != "yes" || last_notification_time[context] < last_reply_time[context];
|
||||
return value != "yes"
|
||||
|| last_notification_time[context] == 0
|
||||
|| last_notification_time[context] < last_reply_time[context];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue