Permalink
Browse files

colloquypush: ignorenetworkservices option

  • Loading branch information...
1 parent e8697f8 commit 0566ba20ae6f5239ea81ac3e4da9bcdca0cb7be8 @wired committed Oct 29, 2010
Showing with 15 additions and 0 deletions.
  1. +3 −0 znc/AUTHORS
  2. +2 −0 znc/README
  3. +10 −0 znc/colloquy.cpp
View
3 znc/AUTHORS
@@ -9,3 +9,6 @@ Julian Jares <julian.jares@gmail.com>
Loria <Loria@Phantasia.org>
-- controlnick handling fixes
+
+adamcandy (github)
+ -- ignore network services
View
2 znc/README
@@ -14,6 +14,8 @@ Thanks to prozac we have a working znc module that pushes priv messages and hili
in IRC. This can be useful if used with
irssi (irssi_proxy) and screen_away plugin.
+ -ignorenetworkservices 0|1 - when set to 1, znc won't push messages from network services
+
To install make sure you have znc installed and configured, then run the following:
$ wget http://github.com/wired/colloquypush/raw/master/znc/colloquy.cpp
View
10 znc/colloquy.cpp
@@ -289,6 +289,7 @@ class CColloquyMod : public CModule {
m_bAttachedPush = true;
m_bSkipMessageContent = false;
m_bAwayOnlyPush = false;
+ m_bIgnoreNetworkServices = false;
LoadRegistry();
@@ -325,6 +326,8 @@ class CColloquyMod : public CModule {
m_bSkipMessageContent = sArg.ToBool();
} else if ( sArg.TrimPrefix("awayonlypush") ) {
m_bAwayOnlyPush = sArg.ToBool();
+ } else if ( sArg.TrimPrefix("ignorenetworkservices") ) {
+ m_bIgnoreNetworkServices = sArg.ToBool();
}
}
@@ -657,6 +660,12 @@ class CColloquyMod : public CModule {
}
}
+ if ( m_bIgnoreNetworkServices ) {
+ if ( sNick.Equals("NickServ") or sNick.Equals("ChanServ") or sNick.Equals("MemoServ") ) {
+ return false;
+ }
+ }
+
CString sPushMessage = sMessage;
if (m_bSkipMessageContent && !sMessage.Equals("")) {
sPushMessage = "";
@@ -804,5 +813,6 @@ class CColloquyMod : public CModule {
bool m_bAttachedPush;
bool m_bSkipMessageContent;
bool m_bAwayOnlyPush;
+ bool m_bIgnoreNetworkServices;
};
MODULEDEFS(CColloquyMod, "Push privmsgs and highlights to your iPhone via Colloquy Mobile")

0 comments on commit 0566ba2

Please sign in to comment.