summaryrefslogtreecommitdiff
path: root/src/modes
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-29 19:12:05 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-29 19:12:05 +0000
commitc0f8576bbd4cfa5b4f0c13cad90c3b516e0efb43 (patch)
treedf3f254c8d802b4cb373ec92f078f6b3950674ae /src/modes
parentb9e99da4dafd836e995970216835cefe3716a01a (diff)
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
Diffstat (limited to 'src/modes')
-rw-r--r--src/modes/umode_n.cpp6
1 files changed, 6 insertions, 0 deletions
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)