From 6c3c55b4e524fffd7ef0ccb526af0218397996da Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Sun, 28 May 2017 09:41:11 +0200 Subject: [PATCH] Fix new user mode +Z (secureonlymsg) not working properly across server links. Reported by HeXiLeD (#4953). --- src/modules/usermodes/secureonlymsg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/usermodes/secureonlymsg.c b/src/modules/usermodes/secureonlymsg.c index 8b34e97b0..37ae3a354 100644 --- a/src/modules/usermodes/secureonlymsg.c +++ b/src/modules/usermodes/secureonlymsg.c @@ -60,7 +60,7 @@ MOD_UNLOAD(secureonlymsg) char *secureonlymsg_pre_usermsg(aClient *sptr, aClient *target, char *text, int notice) { - if (IsSecureOnlyMsg(target) && !IsServer(sptr) && !IsULine(sptr) && !IsSecure(sptr)) + if (IsSecureOnlyMsg(target) && !IsServer(sptr) && !IsULine(sptr) && !IsSecureConnect(sptr)) { if (ValidatePermissionsForPath("override:message:secureonly",sptr,target,NULL,text)) return text; /* TODO: this is actually an override */ @@ -75,7 +75,7 @@ char *secureonlymsg_pre_usermsg(aClient *sptr, aClient *target, char *text, int return NULL; /* Block the message */ } else - if (IsSecureOnlyMsg(sptr) && !IsSecure(target) && !IsULine(target)) + if (IsSecureOnlyMsg(sptr) && !IsSecureConnect(target) && !IsULine(target)) { if (ValidatePermissionsForPath("override:message:secureonly",sptr,target,NULL,text)) return text; /* TODO: this is actually an override */