mirror of https://github.com/SeanOMik/znc-push.git
Compact condition checking
This commit is contained in:
parent
307f17e493
commit
dbd442b931
26
notifo.cpp
26
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:
|
||||
|
|
Loading…
Reference in New Issue