keep in sync with OGN upstream (SVN-319)
[ircu2.10.12-pk.git] / ircd / m_svsjoin.c
index f79e4cc271ec5afdb6e9825d699b30244e006fe1..c3fa556f8fd9697fd6c6337089dc84f2e89f76c9 100644 (file)
@@ -78,8 +78,8 @@ int m_svsjoin(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
     joinbuf_init(&join, acptr, acptr, JOINBUF_TYPE_JOIN, 0, 0);
     joinbuf_init(&create, acptr, acptr, JOINBUF_TYPE_CREATE, 0, TStime());
 
-    flags = (chptr->users == 0) ? CHFL_CHANOP : CHFL_DEOPPED;
-    if(chptr) joinbuf_join(&join, chptr, flags);
+    flags = (chptr->users == 0) ? CHFL_CHANOP | CHFL_CHANNEL_MANAGER : CHFL_DEOPPED;
+    if(chptr->users) joinbuf_join(&join, chptr, flags);
     else joinbuf_join(&create, chptr, flags);
 
     /* Send information to the user. */