From dbd442b9318a5cd8b749a95149f9a8f576125176 Mon Sep 17 00:00:00 2001 From: John Reese Date: Fri, 14 Jan 2011 09:48:56 -0500 Subject: [PATCH] Compact condition checking --- notifo.cpp | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/notifo.cpp b/notifo.cpp index a3e442f..1c0fe06 100644 --- a/notifo.cpp +++ b/notifo.cpp @@ -202,22 +202,9 @@ class CNotifoMod : public CModule */ bool notify_channel(const CNick& nick, const CChan& channel, const CString& message) { - if (!highlight(message)) - { - return false; - } - - if (!away_only()) - { - return false; - } - - if (!client_count_less_than()) - { - return false; - } - - return true; + return away_only() + && client_count_less_than() + && highlight(message); } /** @@ -228,12 +215,7 @@ class CNotifoMod : public CModule */ bool notify_pm(const CNick& nick) { - if (!away_only()) - { - return false; - } - - return true; + return away_only(); } protected: