ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/branches/8.2.x/include/channel_mode.h
(Generate patch)

Comparing:
ircd-hybrid/trunk/include/channel_mode.h (file contents), Revision 3150 by michael, Fri Mar 14 14:11:34 2014 UTC vs.
ircd-hybrid/branches/8.2.x/include/channel_mode.h (file contents), Revision 4101 by michael, Sun Jun 29 19:35:16 2014 UTC

# Line 44 | Line 44 | enum
44    CHACCESS_NOTONCHAN = -1,
45    CHACCESS_PEON      =  0,
46    CHACCESS_HALFOP    =  1,
47 <  CHACCESS_CHANOP    =  2
47 >  CHACCESS_CHANOP    =  2,
48 >  CHACCESS_REMOTE    =  3
49   };
50  
51   /* can_send results */
# Line 57 | Line 58 | enum
58  
59  
60   /* Channel related flags */
61 < #define CHFL_CHANOP     0x0001 /* Channel operator   */
62 < #define CHFL_HALFOP     0x0002 /* Channel half op    */
63 < #define CHFL_VOICE      0x0004 /* the power to speak */
64 < #define CHFL_DEOPPED    0x0008 /* deopped by us, modes need to be bounced */
65 < #define CHFL_BAN        0x0010 /* ban channel flag */
66 < #define CHFL_EXCEPTION  0x0020 /* exception to ban channel flag */
66 < #define CHFL_INVEX      0x0040
61 > #define CHFL_CHANOP     0x0001U  /* Channel operator   */
62 > #define CHFL_HALFOP     0x0002U  /* Channel half op    */
63 > #define CHFL_VOICE      0x0004U  /* the power to speak */
64 > #define CHFL_BAN        0x0008U  /* ban channel flag */
65 > #define CHFL_EXCEPTION  0x0010U  /* exception to ban channel flag */
66 > #define CHFL_INVEX      0x0020U
67  
68   /* channel modes ONLY */
69 < #define MODE_PRIVATE    0x0001
70 < #define MODE_SECRET     0x0002
71 < #define MODE_MODERATED  0x0004
72 < #define MODE_TOPICLIMIT 0x0008
73 < #define MODE_INVITEONLY 0x0010
74 < #define MODE_NOPRIVMSGS 0x0020
75 < #define MODE_SSLONLY    0x0040
76 < #define MODE_OPERONLY   0x0080
77 < #define MODE_REGISTERED 0x0100 /* Channel has been registered with ChanServ */
78 < #define MODE_REGONLY    0x0200
79 < #define MODE_NOCTRL     0x0400
80 < #define MODE_MODREG     0x0800
69 > #define MODE_PRIVATE    0x0001U  /**< */
70 > #define MODE_SECRET     0x0002U  /**< Channel does not show up on NAMES or LIST */
71 > #define MODE_MODERATED  0x0004U  /**< Users without +v/h/o cannot send text to the channel */
72 > #define MODE_TOPICLIMIT 0x0008U  /**< Only chanops can change the topic */
73 > #define MODE_INVITEONLY 0x0010U  /**< Only invited usersmay join this channel */
74 > #define MODE_NOPRIVMSGS 0x0020U  /**< Users must be in the channel to send text to it */
75 > #define MODE_SSLONLY    0x0040U  /**< Prevents anyone who isn't connected via SSL/TLS from joining the channel */
76 > #define MODE_OPERONLY   0x0080U  /**< Prevents anyone who hasn't obtained IRC operator status from joining the channel */
77 > #define MODE_REGISTERED 0x0100U  /**< Channel has been registered with ChanServ */
78 > #define MODE_REGONLY    0x0200U  /**< Only registered clients may join a channel with that mode set */
79 > #define MODE_NOCTRL     0x0400U  /**< Prevents users from sending messages containing control codes to the channel */
80 > #define MODE_MODREG     0x0800U  /**< Unregistered/unidentified clients cannot send text to the channel */
81  
82   /* cache flags for silence on ban */
83 < #define CHFL_BAN_CHECKED  0x0080
84 < #define CHFL_BAN_SILENCED 0x0100
83 > #define CHFL_BAN_CHECKED  0x0080U
84 > #define CHFL_BAN_SILENCED 0x0100U
85  
86   /* name invisible */
87   #define SecretChannel(x)        (((x)->mode.mode & MODE_SECRET))
88   #define PubChannel(x)           (((x)->mode.mode & (MODE_PRIVATE | MODE_SECRET)) == 0)
89 < /* knock is forbidden, halfops can't kick/deop other halfops.
90 < * +pi means paranoid and will generate notices on each invite */
89 > /* knock is forbidden, halfops can't kick/deop other halfops. */
90   #define PrivateChannel(x)       (((x)->mode.mode & MODE_PRIVATE))
91  
92 + struct ChannelMode
93 + {
94 +  void (*func)(struct Client *,
95 +               struct Channel *, int, int *, char **,
96 +               int *, int, int, char, unsigned int);
97 +  unsigned int d;
98 + };
99 +
100   struct ChModeChange
101   {
102    char letter;
# Line 97 | Line 104 | struct ChModeChange
104    const char *id;
105    int dir;
106    int mems;
100  struct Client *client;
107   };
108  
109   struct mode_letter
# Line 107 | Line 113 | struct mode_letter
113   };
114  
115   extern const struct mode_letter chan_modes[];
116 + extern const struct ChannelMode ModeTable[];
117  
118   extern int add_id(struct Client *, struct Channel *, char *, unsigned int);
119   extern void set_channel_mode(struct Client *, struct Channel *,

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)