fixed ssl.c bug when ssl backend returns IO_BLOCKED but IO engine doesn't get informe...
[ircu2.10.12-pk.git] / ircd / m_names.c
index 26666a60931417e986b8ff2b6abff781be83a153..1951922084696784a743848495bad15e328af11f 100644 (file)
@@ -141,8 +141,11 @@ void do_names(struct Client* sptr, struct Channel* chptr, int filter)
   flag = 1;
   needs_space = 0;
 
-  if (!ShowChannel(sptr, chptr)) /* Don't list private channels unless we are on them. */
+  if (!ShowChannel(sptr, chptr)) { /* Don't list private channels unless we are on them. */
+    if (filter&NAMES_EON)
+      send_reply(sptr, RPL_ENDOFNAMES, chptr->chname);
     return;
+  }
 
   /* Iterate over all channel members, and build up the list. */
 
@@ -167,7 +170,7 @@ void do_names(struct Client* sptr, struct Channel* chptr, int filter)
        if (IsInvisibleJoin(member) && member->user != sptr)
                continue;
        
-       if (!IsChanOp(member) && !HasVoice(member) && member->user != sptr && (filter & NAMES_OPS))
+       if (!IsChanOpOrHalfOp(member) && !HasVoice(member) && member->user != sptr && (filter & NAMES_OPS))
                continue;
 
     if (needs_space)
@@ -177,6 +180,8 @@ void do_names(struct Client* sptr, struct Channel* chptr, int filter)
       buf[idx++] = '!';
     else if (IsChanOp(member))
       buf[idx++] = '@';
+    else if (IsHalfOp(member))
+      buf[idx++] = '%';
     else if (HasVoice(member))
       buf[idx++] = '+';
     strcpy(buf + idx, cli_name(c2ptr));