summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2016-06-05 14:16:36 +0100
committerRussell King <rmk+kernel@armlinux.org.uk>2016-06-05 17:47:56 +0100
commit634111fc07826dcf7f1f408c5186dc9f842d2a5c (patch)
treef5afb868285fb4438f4f00574f63f1ef5c0392f0 /modules
parent0a892daa10889c2c29855276c0ac34082dea6dfa (diff)
Add support for configurable initial channel modes
Diffstat (limited to 'modules')
-rw-r--r--modules/core/m_join.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/modules/core/m_join.c b/modules/core/m_join.c
index 57235c9..673e88c 100644
--- a/modules/core/m_join.c
+++ b/modules/core/m_join.c
@@ -214,26 +214,30 @@ m_join(struct Client *client_p, struct Client *source_p,
*/
if (flags & CHFL_CHANOP)
{
+ char modebuf[MODEBUFLEN];
+ char parabuf[MODEBUFLEN];
+
chptr->channelts = CurrentTime;
- chptr->mode.mode |= MODE_TOPICLIMIT;
- chptr->mode.mode |= MODE_NOPRIVMSGS;
+ chptr->mode.mode |= ConfigChannel.default_modes;
+
+ channel_modes(chptr, &me, modebuf, parabuf);
sendto_server(client_p, CAP_TS6, NOCAPS,
- ":%s SJOIN %lu %s +nt :@%s",
+ ":%s SJOIN %lu %s %s %s:@%s",
me.id, (unsigned long)chptr->channelts,
- chptr->chname, source_p->id);
+ chptr->chname, modebuf, parabuf, source_p->id);
sendto_server(client_p, NOCAPS, CAP_TS6,
- ":%s SJOIN %lu %s +nt :@%s",
+ ":%s SJOIN %lu %s %s %s:@%s",
me.name, (unsigned long)chptr->channelts,
- chptr->chname, source_p->name);
+ chptr->chname, modebuf, parabuf, source_p->name);
/*
* notify all other users on the new channel
*/
sendto_channel_local(ALL_MEMBERS, 0, chptr, ":%s!%s@%s JOIN :%s",
source_p->name, source_p->username,
source_p->host, chptr->chname);
- sendto_channel_local(ALL_MEMBERS, 0, chptr, ":%s MODE %s +nt",
- me.name, chptr->chname);
+ sendto_channel_local(ALL_MEMBERS, 0, chptr, ":%s MODE %s %s",
+ me.name, chptr->chname, modebuf);
if (source_p->away[0])
sendto_channel_local_butone(source_p, 0, CAP_AWAY_NOTIFY, chptr,
":%s!%s@%s AWAY :%s",