]> jfr.im git - solanum.git/blobdiff - modules/core/m_join.c
A very draft version of extensions, which are adding can_join hooks for custom channe...
[solanum.git] / modules / core / m_join.c
index 911439beb7bd6ff01950ed917369b593b57edb9d..ff4750f335c70c21586231290a18f1d52ba499c4 100644 (file)
@@ -40,6 +40,7 @@
 #include "parse.h"
 #include "modules.h"
 #include "packet.h"
+#include "chmode.h"
 
 static int m_join(struct Client *, struct Client *, int, const char **);
 static int ms_join(struct Client *, struct Client *, int, const char **);
@@ -302,11 +303,18 @@ m_join(struct Client *client_p, struct Client *source_p, int parc, const char *p
                        if ((i != ERR_NEEDREGGEDNICK && i != ERR_THROTTLE && i != ERR_INVITEONLYCHAN && i != ERR_CHANNELISFULL) ||
                            (!ConfigChannel.use_forward || (chptr = check_forward(source_p, chptr, key)) == NULL))
                        {
-                               sendto_one(source_p, form_str(i), me.name, source_p->name, name);
+                               /* might be wrong, but is there any other better location for such?
+                                * see extensions/chm_operonly.c for other comments on this
+                                * -- dwr
+                                */
+                               if(i != ERR_CUSTOM)
+                                       sendto_one(source_p, form_str(i), me.name, source_p->name, name);
+
                                if(successful_join_count > 0)
                                        successful_join_count--;
                                continue;
                        }
+
                        sendto_one_numeric(source_p, ERR_LINKCHANNEL, form_str(ERR_LINKCHANNEL), name, chptr->chname);
                }