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:
John Reese 2011-01-26 21:09:34 -05:00
parent 5c5c198ab7
commit 5b24f18c37
1 changed files with 3 additions and 1 deletions

View File

@ -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];
}
/**