mirror of https://github.com/SeanOMik/znc-push.git
Fix #3: Fix compatibility with 0.207 dev builds
This commit is contained in:
parent
cb427730e4
commit
6c413a91e6
21
push.cpp
21
push.cpp
|
@ -10,12 +10,13 @@
|
|||
|
||||
#define REQUIRESSL
|
||||
|
||||
#include "znc.h"
|
||||
#include "Chan.h"
|
||||
#include "User.h"
|
||||
#include "Modules.h"
|
||||
#include <znc/znc.h>
|
||||
#include <znc/Chan.h>
|
||||
#include <znc/User.h>
|
||||
#include <znc/IRCNetwork.h>
|
||||
#include <znc/Modules.h>
|
||||
#include <znc/FileUtils.h>
|
||||
#include "time.h"
|
||||
#include "FileUtils.h"
|
||||
|
||||
#if (!defined(VERSION_MAJOR) || !defined(VERSION_MINOR) || (VERSION_MAJOR == 0 && VERSION_MINOR < 72))
|
||||
#error This module needs ZNC 0.072 or newer.
|
||||
|
@ -445,9 +446,9 @@ class CPushMod : public CModule
|
|||
{
|
||||
#ifdef PUSH_AWAY
|
||||
CString value = options["away_only"].AsLower();
|
||||
return value != "yes" || user->IsIRCAway();
|
||||
return value != "yes" || GetNetwork()->IsIRCAway();
|
||||
#else
|
||||
return true
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -458,7 +459,7 @@ class CPushMod : public CModule
|
|||
*/
|
||||
unsigned int client_count()
|
||||
{
|
||||
return user->GetClients().size();
|
||||
return user->GetUserClients().size();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -509,7 +510,7 @@ class CPushMod : public CModule
|
|||
}
|
||||
}
|
||||
|
||||
CNick nick = user->GetIRCNick();
|
||||
CNick nick = user->GetNick();
|
||||
|
||||
if (message.find(nick.GetNick()) != string::npos)
|
||||
{
|
||||
|
@ -1124,7 +1125,7 @@ class CPushMod : public CModule
|
|||
#ifdef PUSH_AWAY
|
||||
table.AddRow();
|
||||
table.SetCell("Condition", "away");
|
||||
table.SetCell("Status", user->IsIRCAway() ? "yes" : "no");
|
||||
table.SetCell("Status", GetNetwork()->IsIRCAway() ? "yes" : "no");
|
||||
#endif
|
||||
|
||||
table.AddRow();
|
||||
|
|
Loading…
Reference in New Issue