From c0f8576bbd4cfa5b4f0c13cad90c3b516e0efb43 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 29 Aug 2006 19:12:05 +0000 Subject: auto-set +s when +n is set (as +n requires +s) - allow +n to be 'set twice' allowing for snomask change without removal of +ns Add default snomask chars git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5063 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modes/umode_n.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/modes') diff --git a/src/modes/umode_n.cpp b/src/modes/umode_n.cpp index 7bb8dbbf0..f2c838454 100644 --- a/src/modes/umode_n.cpp +++ b/src/modes/umode_n.cpp @@ -18,6 +18,12 @@ ModeAction ModeUserServerNoticeMask::OnModeChange(userrec* source, userrec* dest if (adding) { parameter = dest->ProcessNoticeMasks(parameter.c_str()); + dest->modes[UM_SNOMASK] = true; + if (!dest->modes[UM_SERVERNOTICE]) + { + const char* newmodes[] = { dest->nick, "+s" }; + ServerInstance->Modes->Process(newmodes, 2, source, true); + } return MODEACTION_ALLOW; } else if (dest->modes[UM_SNOMASK] != false) -- cgit v1.2.3