]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - src/supported.c
Fix a small warning.
[irc/rqf/shadowircd.git] / src / supported.c
index 14cee916bc979bb5ce54f4b533268462dea34dc4..abeb60cf38784db4736594728ee79701470ddf3c 100644 (file)
@@ -28,7 +28,6 @@
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  *
- *  $Id: supported.c 3568 2007-09-09 18:59:08Z jilles $
  */
 
 /* From the old supported.h which is
@@ -116,7 +115,7 @@ change_isupport(const char *name, const char *(*func)(const void *), const void
 {
        rb_dlink_node *ptr;
        struct isupportitem *item;
-       const void *oldvalue;
+       const void *oldvalue = NULL;
 
        RB_DLINK_FOREACH(ptr, isupportlist.head)
        {
@@ -236,10 +235,12 @@ isupport_chanmodes(const void *ptr)
 {
        static char result[80];
 
-       rb_snprintf(result, sizeof result, "%s%sbq,k,%slj,%s",
+       rb_snprintf(result, sizeof result, "%s%sb%s,k,%sl%s,%s",
                        ConfigChannel.use_except ? "e" : "",
                        ConfigChannel.use_invex ? "I" : "",
+                       strcasecmp(ConfigChannel.disabledmodes, "q") ? "" : "q",
                        ConfigChannel.use_forward ? "f" : "",
+                       strcasecmp(ConfigChannel.disabledmodes, "j") ? "" : "j",
                        cflagsbuf);
        return result;
 }
@@ -267,9 +268,9 @@ isupport_prefix(const void *ptr)
        static char result[11];
 
        rb_snprintf(result, sizeof result, "(%so%sv)%s@%s+",
-                       ConfigChannel.use_owner ? "a" : "",
+                       ConfigChannel.use_admin ? "a" : "",
                        ConfigChannel.use_halfop ? "h" : "",
-                       ConfigChannel.use_owner ? "!" : "",
+                       ConfigChannel.use_admin ? "!" : "",
                        ConfigChannel.use_halfop ? "%" : "");
        return result;
 }