mirror of https://github.com/SeanOMik/znc-push.git
Remove legacy version handling
This commit is contained in:
parent
6c413a91e6
commit
894448ca6f
17
push.cpp
17
push.cpp
|
@ -18,15 +18,6 @@
|
|||
#include <znc/FileUtils.h>
|
||||
#include "time.h"
|
||||
|
||||
#if (!defined(VERSION_MAJOR) || !defined(VERSION_MINOR) || (VERSION_MAJOR == 0 && VERSION_MINOR < 72))
|
||||
#error This module needs ZNC 0.072 or newer.
|
||||
#endif
|
||||
|
||||
// Handle versions of ZNC older than 0.090 by disabling the away_only condition
|
||||
#if VERSION_MAJOR == 0 && VERSION_MINOR >= 90
|
||||
#define PUSH_AWAY
|
||||
#endif
|
||||
|
||||
// Forward declaration
|
||||
class CPushMod;
|
||||
|
||||
|
@ -121,9 +112,7 @@ class CPushMod : public CModule
|
|||
defaults["query_conditions"] = "all";
|
||||
|
||||
// Notification conditions
|
||||
#ifdef PUSH_AWAY
|
||||
defaults["away_only"] = "no";
|
||||
#endif
|
||||
defaults["client_count_less_than"] = "0";
|
||||
defaults["highlight"] = "";
|
||||
defaults["idle"] = "0";
|
||||
|
@ -444,12 +433,8 @@ class CPushMod : public CModule
|
|||
*/
|
||||
bool away_only()
|
||||
{
|
||||
#ifdef PUSH_AWAY
|
||||
CString value = options["away_only"].AsLower();
|
||||
return value != "yes" || GetNetwork()->IsIRCAway();
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1122,11 +1107,9 @@ class CPushMod : public CModule
|
|||
table.AddColumn("Condition");
|
||||
table.AddColumn("Status");
|
||||
|
||||
#ifdef PUSH_AWAY
|
||||
table.AddRow();
|
||||
table.SetCell("Condition", "away");
|
||||
table.SetCell("Status", GetNetwork()->IsIRCAway() ? "yes" : "no");
|
||||
#endif
|
||||
|
||||
table.AddRow();
|
||||
table.SetCell("Condition", "client_count");
|
||||
|
|
Loading…
Reference in New Issue