summaryrefslogtreecommitdiff
path: root/src/channel.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/channel.c')
-rw-r--r--src/channel.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/channel.c b/src/channel.c
index f20b4c1..efc64d1 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -747,6 +747,9 @@ can_send(struct Channel *chptr, struct Client *source_p, struct Membership *ms)
if (chptr->mode.mode & MODE_MODERATED)
return ERR_CANNOTSENDTOCHAN;
+ if ((chptr->mode.mode & MODE_REGONLY) && !HasUMode(source_p, UMODE_REGISTERED))
+ return ERR_NEEDREGGEDNICK;
+
return CAN_SEND_NONOP;
}