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)
|
bool notify_channel(const CNick& nick, const CChan& channel, const CString& message)
|
||||||
{
|
{
|
||||||
if (!highlight(message))
|
return away_only()
|
||||||
{
|
&& client_count_less_than()
|
||||||
return false;
|
&& highlight(message);
|
||||||
}
|
|
||||||
|
|
||||||
if (!away_only())
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!client_count_less_than())
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -228,12 +215,7 @@ class CNotifoMod : public CModule
|
||||||
*/
|
*/
|
||||||
bool notify_pm(const CNick& nick)
|
bool notify_pm(const CNick& nick)
|
||||||
{
|
{
|
||||||
if (!away_only())
|
return away_only();
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
Loading…
Reference in New Issue