From 1c6ab97d9fdeccbee8e63b701bbacc517b6a0096 Mon Sep 17 00:00:00 2001 From: Keiran Smith Date: Sat, 3 Nov 2012 13:27:46 +0000 Subject: [PATCH 1/3] Update to ZNC 1.0 --- znc-infobot.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/znc-infobot.spec b/znc-infobot.spec index 37f1105..7f730f8 100644 --- a/znc-infobot.spec +++ b/znc-infobot.spec @@ -1,7 +1,7 @@ Summary: infobot module for ZNC IRC Bouncer Name: znc-infobot -Version: 0.206 -Release: 2%{?dist} +Version: 1.0-0.1.alpha1 +Release: 1%{?dist} License: GPLv2 Group: System Environment/Daemons URL: http://znc-msvc.googlecode.com @@ -38,6 +38,9 @@ mv infobot.so %{buildroot}%{_libdir}/znc/ %{_libdir}/znc/infobot.so %changelog +* Sun Jul 22 2012 Fedora Release Engineering - 1.0-0.1.alpha1-1 +- Rebuild for 1.0 + * Sun Jul 22 2012 Fedora Release Engineering - 0.206-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild From f454f5761f22e9976c60e99ab2f77516d9935b11 Mon Sep 17 00:00:00 2001 From: Keiran Smith Date: Sat, 3 Nov 2012 13:28:54 +0000 Subject: [PATCH 2/3] Update to ZNC 1.0 --- znc-infobot.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/znc-infobot.spec b/znc-infobot.spec index 7f730f8..bdcfa7f 100644 --- a/znc-infobot.spec +++ b/znc-infobot.spec @@ -1,7 +1,7 @@ Summary: infobot module for ZNC IRC Bouncer Name: znc-infobot -Version: 1.0-0.1.alpha1 -Release: 1%{?dist} +Version: 1.0 +Release: 0.1.alpha1%{?dist} License: GPLv2 Group: System Environment/Daemons URL: http://znc-msvc.googlecode.com @@ -38,7 +38,7 @@ mv infobot.so %{buildroot}%{_libdir}/znc/ %{_libdir}/znc/infobot.so %changelog -* Sun Jul 22 2012 Fedora Release Engineering - 1.0-0.1.alpha1-1 +* Sun Jul 22 2012 Fedora Release Engineering - 1.0-0.1.alpha1 - Rebuild for 1.0 * Sun Jul 22 2012 Fedora Release Engineering - 0.206-2 From d0a1a037f511fbe961a8d7764cac9987aeb376ea Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Wed, 28 Nov 2012 11:19:04 -0500 Subject: [PATCH 3/3] fix compile against znc 1.0 --- znc-infobot-1.0-znc1.patch | 44 ++++++++++++++++++++++++++++++++++++++ znc-infobot.spec | 13 +++++++---- 2 files changed, 53 insertions(+), 4 deletions(-) create mode 100644 znc-infobot-1.0-znc1.patch diff --git a/znc-infobot-1.0-znc1.patch b/znc-infobot-1.0-znc1.patch new file mode 100644 index 0000000..0db13a7 --- /dev/null +++ b/znc-infobot-1.0-znc1.patch @@ -0,0 +1,44 @@ +diff -up znc-infobot-0.202/infobot.cpp.znc1 znc-infobot-0.202/infobot.cpp +--- znc-infobot-0.202/infobot.cpp.znc1 2012-11-28 10:48:03.703592940 -0500 ++++ znc-infobot-0.202/infobot.cpp 2012-11-28 11:06:55.221609919 -0500 +@@ -14,6 +14,7 @@ + #include "znc.h" + #include "Chan.h" + #include "Modules.h" ++#include "IRCNetwork.h" + #include "User.h" + + #include +@@ -25,9 +26,9 @@ + + using namespace pcrecpp; + +-typedef map TEnabledChanMap; +-typedef map TColorsEnabledMap; +-typedef map TTriggerCharMap; ++typedef std::map TEnabledChanMap; ++typedef std::map TColorsEnabledMap; ++typedef std::map TTriggerCharMap; + + class CInfoBotModule : public CModule + { +@@ -1203,8 +1204,8 @@ void CInfoBotModule::SendMessage(const C + sText.Replace("%CLO%", ""); + } + +- m_pUser->PutIRC("PRIVMSG " + sSendTo + " :" + sText); +- m_pUser->PutUser(":" + m_pUser->GetIRCNick().GetNickMask() + " PRIVMSG " + sSendTo + " :" + sText); ++ m_pNetwork->PutIRC("PRIVMSG " + sSendTo + " :" + sText); ++ m_pNetwork->PutUser(":" + m_pNetwork->GetIRCNick().GetNickMask() + " PRIVMSG " + sSendTo + " :" + sText); + } + + void CInfoBotModule::OnModCommand(const CString& sCommand) +@@ -1484,7 +1485,7 @@ CInfoBotModule::EModRet CInfoBotModule:: + { + if(!sTarget.empty() && !isalnum(sTarget[0])) + { +- CheckLineForTrigger(sMessage, sTarget.AsLower(), m_pUser->GetIRCNick().GetNick()); ++ CheckLineForTrigger(sMessage, sTarget.AsLower(), m_pNetwork->GetIRCNick().GetNick()); + } + return CONTINUE; + } diff --git a/znc-infobot.spec b/znc-infobot.spec index bdcfa7f..bfb427c 100644 --- a/znc-infobot.spec +++ b/znc-infobot.spec @@ -1,12 +1,13 @@ Summary: infobot module for ZNC IRC Bouncer Name: znc-infobot Version: 1.0 -Release: 0.1.alpha1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Daemons URL: http://znc-msvc.googlecode.com Source0: znc-infobot-0.204.tar.gz # Had to generate tar.gz manually download source file : http://znc-msvc.googlecode.com/svn/trunk/flakes/infobot.cpp +Patch0: znc-infobot-1.0-znc1.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: znc = %{version} @@ -22,9 +23,10 @@ channels with a multitude of bot commands %prep %setup -q -n %{name}-0.202 +%patch0 -p1 -b .znc1 %build -LIBS="-lpcrecpp -lpcre" znc-buildmod infobot.cpp +LIBS="-lpcrecpp -lpcre" INCLUDES="-I/usr/include/znc" znc-buildmod infobot.cpp %install mkdir -p %{buildroot}%{_libdir}/znc/ @@ -38,8 +40,11 @@ mv infobot.so %{buildroot}%{_libdir}/znc/ %{_libdir}/znc/infobot.so %changelog -* Sun Jul 22 2012 Fedora Release Engineering - 1.0-0.1.alpha1 -- Rebuild for 1.0 +* Wed Nov 28 2012 Tom Callaway - 1.0-2 +- it lives! + +* Tue Nov 13 2012 Nick Bebout - 1.0-1 +- Rebuild for znc 1.0 * Sun Jul 22 2012 Fedora Release Engineering - 0.206-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild