[smuxi: 2/3] Engine-IRC: don't show notices on shared channels for Nick/ChanServ (closes: #868)



commit e4ced9a61f46b86a203c04d1058caf9fd5e7a201
Author: Mirco Bauer <meebey meebey net>
Date:   Thu May 21 16:56:07 2015 +0200

    Engine-IRC: don't show notices on shared channels for Nick/ChanServ (closes: #868)
    
    This "show notices on shared channels" feature was introduced in #38 but became
    annoying with Nick/ChanServ which send channel welcome messages or other
    replies which then got spammed to all channels.

 src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs 
b/src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs
index 42c83a7..03a2e5d 100644
--- a/src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs
+++ b/src/Engine-IRC/Protocols/Irc/IrcProtocolManager.cs
@@ -3101,7 +3101,10 @@ namespace Smuxi.Engine
                     targetChats.Add(chat);
                 }
             }
-            if (targetChats.Count == 0 && e.Data.Nick != null) {
+            // show notice on shared channels except the sender is Nick/ChanServ
+            if (targetChats.Count == 0 && e.Data.Nick != null &&
+                String.Compare(e.Data.Nick, "NickServ", true) != 0 &&
+                String.Compare(e.Data.Nick, "ChanServ", true) != 0) {
                 // always show on server chat
                 targetChats.Add(_NetworkChat);
                 // check if we share a channel with the sender


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]