]> jfr.im git - solanum.git/blobdiff - src/chmode.c
Merge pull request #53 from ShadowNinja/clarify_U+R
[solanum.git] / src / chmode.c
index 1191fe9d5c55bd66193325bdeca75eb91ba9880b..7d8073d74b21c5ef4ae13b47c25ebc190698763e 100644 (file)
@@ -2,9 +2,9 @@
  *  charybdis: A slightly useful ircd.
  *  chmode.c: channel mode management
  *
- * Copyright (C) 1990 Jarkko Oikarinen and University of Oulu, Co Center 
- * Copyright (C) 1996-2002 Hybrid Development Team 
- * Copyright (C) 2002-2005 ircd-ratbox development team 
+ * Copyright (C) 1990 Jarkko Oikarinen and University of Oulu, Co Center
+ * Copyright (C) 1996-2002 Hybrid Development Team
+ * Copyright (C) 2002-2005 ircd-ratbox development team
  * Copyright (C) 2005-2006 charybdis development team
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -42,6 +42,7 @@
 #include "s_newconf.h"
 #include "logger.h"
 #include "chmode.h"
+#include "s_assert.h"
 
 /* bitmasks for error returns, so we send once per call */
 #define SM_ERR_NOTS             0x00000001     /* No TS on channel */
@@ -81,13 +82,13 @@ construct_cflags_strings(void)
        int i;
         char *ptr = cflagsbuf;
        char *ptr2 = cflagsmyinfo;
-        
+
         *ptr = '\0';
        *ptr2 = '\0';
 
        for(i = 0; i < 256; i++)
        {
-               if( !(chmode_table[i].set_func == chm_ban) && 
+               if( !(chmode_table[i].set_func == chm_ban) &&
                        !(chmode_table[i].set_func == chm_forward) &&
                        !(chmode_table[i].set_func == chm_throttle) &&
                         !(chmode_table[i].set_func == chm_key) &&
@@ -101,7 +102,7 @@ construct_cflags_strings(void)
                {
                        chmode_flags[i] = 0;
                }
-                
+
                switch (chmode_flags[i])
                {
                    case MODE_FREETARGET:
@@ -115,14 +116,14 @@ construct_cflags_strings(void)
                            *ptr++ = (char) i;
                        }
                }
-               
+
                /* Should we leave orphaned check here? -- dwr */
                if(!(chmode_table[i].set_func == chm_nosuch) && !(chmode_table[i].set_func == chm_orphaned))
                {
                    *ptr2++ = (char) i;
                }
        }
-        
+
         *ptr++ = '\0';
        *ptr2++ = '\0';
 }
@@ -657,7 +658,7 @@ chm_orphaned(struct Client *source_p, struct Channel *chptr,
 {
        if(MyClient(source_p))
                return;
-        
+
        if((dir == MODE_ADD) && !(chptr->mode.mode & mode_type))
        {
                chptr->mode.mode |= mode_type;
@@ -1680,7 +1681,7 @@ struct ChannelMode chmode_table[256] =
 /* set_channel_mode()
  *
  * inputs      - client, source, channel, membership pointer, params
- * output      - 
+ * output      -
  * side effects - channel modes/memberships are changed, MODE is issued
  *
  * Extensively modified to be hotpluggable, 03/09/06 -- nenolod
@@ -1832,7 +1833,7 @@ set_channel_mode(struct Client *client_p, struct Client *source_p,
 /* set_channel_mlock()
  *
  * inputs      - client, source, channel, params
- * output      - 
+ * output      -
  * side effects - channel mlock is changed / MLOCK is propagated
  */
 void