From 6c413a91e688c2fe4d7a66fc70a80614b71696ac Mon Sep 17 00:00:00 2001 From: Ed Kellett Date: Mon, 16 Jul 2012 17:43:51 -0700 Subject: [PATCH] Fix #3: Fix compatibility with 0.207 dev builds --- push.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/push.cpp b/push.cpp index 560e02d..6153496 100644 --- a/push.cpp +++ b/push.cpp @@ -10,12 +10,13 @@ #define REQUIRESSL -#include "znc.h" -#include "Chan.h" -#include "User.h" -#include "Modules.h" +#include +#include +#include +#include +#include +#include #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();