Bump patchlevel; add more epoll support; assertion check in
[ircu2.10.12-pk.git] / ircd / channel.c
index fcf1d3a4e1818edce15ababf3f88a3968199be73..1912d16275899a6a9470964f39fa45e40ccb6ab8 100644 (file)
@@ -2819,7 +2819,7 @@ mode_parse_ban(struct ParseState *state, int *flag_p)
   newban->flags = ((state->dir == MODE_ADD) ? BAN_ADD : BAN_DEL)
       | (*flag_p == MODE_BAN ? 0 : BAN_EXCEPTION);
   set_ban_mask(newban, collapse(pretty_mask(t_str)));
-  ircd_strncpy(newban->who, cli_name(state->sptr), HOSTLEN);
+  ircd_strncpy(newban->who, IsUser(state->sptr) ? cli_name(state->sptr) : "*", NICKLEN);
   newban->when = TStime();
   apply_ban(&state->chptr->banlist, newban, 0);
 }
@@ -3410,10 +3410,11 @@ joinbuf_join(struct JoinBuf *jbuf, struct Channel *chan, unsigned int flags)
     /* send notification to all servers */
     if (jbuf->jb_type != JOINBUF_TYPE_CREATE && !is_local)
     {
-      if (flags & CHFL_CHANOP)
+      if (flags & CHFL_CHANOP) {
+        assert(oplevel == 0 || oplevel == 1);
         sendcmdto_serv_butone(jbuf->jb_source, CMD_JOIN, jbuf->jb_connect,
                               "%u:%H %Tu", oplevel, chan, chan->creationtime);
-      else
+      else
         sendcmdto_serv_butone(jbuf->jb_source, CMD_JOIN, jbuf->jb_connect,
                               "%H %Tu", chan, chan->creationtime);
     }