From 10c8fb41ff458bf2432a0a0a43dd106e5e4d2f27 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 87e2cce..a39e979 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. @@ -494,9 +495,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 } @@ -507,7 +508,7 @@ class CPushMod : public CModule */ unsigned int client_count() { - return user->GetClients().size(); + return user->GetUserClients().size(); } /** @@ -558,7 +559,7 @@ class CPushMod : public CModule } } - CNick nick = user->GetIRCNick(); + CNick nick = user->GetNick(); if (message.find(nick.GetNick()) != string::npos) { @@ -1189,7 +1190,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();