added gnutls backend and moved backend code into new files
[ircu2.10.12-pk.git] / ircd / m_quit.c
index 9ca6786325ede6f5147beaccb3f1317579cd80c4..9ccc361566d6e0078a7766ad4ab7551b79c53e29 100644 (file)
 #include "channel.h"
 #include "client.h"
 #include "ircd.h"
+#include "ircd_log.h"
 #include "ircd_string.h"
 #include "struct.h"
 #include "s_misc.h"
 #include "ircd_reply.h"
 
-#include <assert.h>
+/* #include <assert.h> -- Now using assert in ircd_log.h */
 #include <string.h>
 
 /*
@@ -107,7 +108,7 @@ int m_quit(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
   if (cli_user(sptr)) {
     struct Membership* chan;
     for (chan = cli_user(sptr)->channel; chan; chan = chan->next_channel) {
-      if (!IsZombie(chan) && !member_can_send_to_channel(chan))
+        if (!IsZombie(chan) && !IsDelayedJoin(chan) && !member_can_send_to_channel(chan, 0))
         return exit_client(cptr, sptr, sptr, "Signed off");
     }
   }
@@ -119,7 +120,7 @@ int m_quit(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 
 
 /*
- * ms_quit - server message handler template
+ * ms_quit - server message handler
  *
  * parv[0] = sender prefix
  * parv[parc - 1] = comment