Author: Kev <klmitch@mit.edu>
[ircu2.10.12-pk.git] / ircd / m_join.c
index 91d04d34489f06ed94fc68b669514c5eac5a8606..d1408d9cf135e87129e9fd4a37984829fe5a1d61 100644 (file)
@@ -200,7 +200,10 @@ int m_join(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
       if (MyConnect(sptr))
       {
 #ifdef BADCHAN
-        if (bad_channel(name) && !IsAnOper(sptr))
+       struct Gline *gline;
+
+        if ((gline = gline_find(name, GLINE_BADCHAN)) &&
+           GlineIsActive(gline) && !IsAnOper(sptr))
         {
           sendto_one(sptr, err_str(ERR_BADCHANNAME), me.name, parv[0], name);
           continue;
@@ -625,7 +628,10 @@ int m_join(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
       if (MyConnect(sptr))
       {
 #ifdef BADCHAN
-        if (bad_channel(name) && !IsAnOper(sptr))
+       struct Gline *gline;
+
+        if ((gline = gline_find(name, GLINE_BADCHAN)) &&
+           GlineIsActive(gline) && !IsAnOper(sptr))
         {
           sendto_one(sptr, err_str(ERR_BADCHANNAME), me.name, parv[0], name);
           continue;