Fix typo in "gtrace criteria" help entry.
[srvx.git] / src / proto-common.c
index abb3a91cd74491dc560b70362e753f860d3efab4..f681a6ab1f86de7a87c56f1b5de346993d5e3ffa 100644 (file)
@@ -274,7 +274,7 @@ close_socket(void)
         replay_connected = 0;
         socket_destroyed(socket_io_fd);
     } else {
-        ioset_close(socket_io_fd, 1);
+        ioset_close(socket_io_fd, 3);
         socket_io_fd = NULL;
     }
 }
@@ -439,9 +439,8 @@ privmsg_chan_helper(struct chanNode *cn, void *data)
     if ((mn = GetUserMode(cn, pd->user)))
         mn->idle_since = now;
 
-    /* Never send a NOTICE to a channel to one of the services */
-    if (!pd->is_notice && cf->func
-        && ((cn->modes & MODE_REGISTERED) || GetUserMode(cn, cf->service)))
+    if (cf->func && !pd->is_notice
+        && (GetUserMode(cn, cf->service) && !IsDeaf(cf->service)))
         cf->func(pd->user, cn, pd->text+1, cf->service);
 
     /* This catches *all* text sent to the channel that the services server sees */