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

Comparing ircd-hybrid/trunk/include/channel.h (file contents):
Revision 4565 by michael, Sun Aug 24 10:27:40 2014 UTC vs.
Revision 7549 by michael, Fri Apr 22 19:29:22 2016 UTC

# Line 1 | Line 1
1   /*
2   *  ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd)
3   *
4 < *  Copyright (c) 1997-2014 ircd-hybrid development team
4 > *  Copyright (c) 1997-2016 ircd-hybrid development team
5   *
6   *  This program is free software; you can redistribute it and/or modify
7   *  it under the terms of the GNU General Public License as published by
# Line 36 | Line 36
36   #define AddMemberFlag(x, y) ((x)->flags |=  (y))
37   #define DelMemberFlag(x, y) ((x)->flags &= ~(y))
38  
39 < #define FLOOD_NOTICED           1
40 < #define JOIN_FLOOD_NOTICED      2
39 > enum
40 > {
41 >  MSG_FLOOD_NOTICED  = 0x00000001U,
42 >  JOIN_FLOOD_NOTICED = 0x00000002U
43 > };
44  
45 < #define SetFloodNoticed(x)   ((x)->flags |= FLOOD_NOTICED)
46 < #define IsSetFloodNoticed(x) ((x)->flags & FLOOD_NOTICED)
47 < #define ClearFloodNoticed(x) ((x)->flags &= ~FLOOD_NOTICED)
45 > #define SetFloodNoticed(x)   ((x)->flags |= MSG_FLOOD_NOTICED)
46 > #define IsSetFloodNoticed(x) ((x)->flags & MSG_FLOOD_NOTICED)
47 > #define ClearFloodNoticed(x) ((x)->flags &= ~MSG_FLOOD_NOTICED)
48  
49   #define SetJoinFloodNoticed(x)   ((x)->flags |= JOIN_FLOOD_NOTICED)
50   #define IsSetJoinFloodNoticed(x) ((x)->flags & JOIN_FLOOD_NOTICED)
# Line 66 | Line 69 | struct Channel
69    struct Mode mode;
70  
71    char topic[TOPICLEN + 1];
72 <  char topic_info[USERHOST_REPLYLEN];
72 >  char topic_info[NICKLEN + USERLEN + HOSTLEN + 3];
73  
74 <  time_t channelts;
75 <  time_t topic_time;
76 <  time_t last_knock;  /**< Don't allow knock to flood */
77 <  time_t last_join_time;
78 <  time_t first_received_message_time; /*!< channel flood control */
74 >  uintmax_t creationtime;
75 >  uintmax_t topic_time;
76 >  uintmax_t last_knock;  /**< Don't allow knock to flood */
77 >  uintmax_t last_invite;
78 >  uintmax_t last_join_time;
79 >  uintmax_t first_received_message_time; /*!< channel flood control */
80    unsigned int flags;
81    int received_number_of_privmsgs;
82  
# Line 85 | Line 89 | struct Channel
89  
90    float number_joined;
91  
92 <  char chname[CHANNELLEN + 1];
92 >  char name[CHANNELLEN + 1];
93 >  size_t name_len;
94   };
95  
96   /*! \brief Membership structure */
# Line 103 | Line 108 | struct Membership
108   struct Ban
109   {
110    dlink_node node;
111 <  char *name;
112 <  char *user;
113 <  char *host;
114 <  char *who;
111 >  char name[NICKLEN + 1];
112 >  char user[USERLEN + 1];
113 >  char host[HOSTLEN + 1];
114 >  char who[NICKLEN + USERLEN + HOSTLEN + 3];
115    size_t len;
116 <  time_t when;
116 >  uintmax_t when;
117    struct irc_ssaddr addr;
118    int bits;
119    int type;
120   };
121  
122 + /*! \brief Invite structure */
123 + struct Invite
124 + {
125 +  dlink_node user_node;  /**< link to client_p->connection->invited */
126 +  dlink_node chan_node;  /**< link to chptr->invites */
127 +  struct Channel *chptr;  /**< Channel pointer */
128 +  struct Client *client_p;  /**< Client pointer */
129 +  uintmax_t when;  /**< Time the invite has been created */
130 + };
131 +
132   extern dlink_list channel_list;
118 extern struct event splitmode_event;
133  
134 < extern int check_channel_name(const char *, const int);
135 < extern int can_send(struct Channel *, struct Client *, struct Membership *, const char *);
134 > extern int channel_check_name(const char *, const int);
135 > extern int can_send(struct Channel *, struct Client *, struct Membership *, const char *, int);
136   extern int is_banned(const struct Channel *, const struct Client *);
123 extern int can_join(struct Client *, struct Channel *, const char *);
137   extern int has_member_flags(const struct Membership *, const unsigned int);
138  
139   extern void channel_do_join(struct Client *, char *, char *);
140   extern void channel_do_join_0(struct Client *);
141 < extern void channel_do_part(struct Client *, char *, char *);
141 > extern void channel_do_part(struct Client *, char *, const char *);
142   extern void remove_ban(struct Ban *, dlink_list *);
143   extern void channel_init(void);
144   extern void add_user_to_channel(struct Channel *, struct Client *, unsigned int, int);
145   extern void remove_user_from_channel(struct Membership *);
146   extern void channel_member_names(struct Client *, struct Channel *, int);
147   extern void add_invite(struct Channel *, struct Client *);
148 < extern void del_invite(struct Channel *, struct Client *);
149 < extern void send_channel_modes(struct Client *, struct Channel *);
148 > extern void del_invite(struct Invite *);
149 > extern void clear_invites_channel(struct Channel *);
150 > extern void clear_invites_client(struct Client *);
151 > extern void channel_send_modes(struct Client *, struct Channel *);
152   extern void channel_modes(struct Channel *, struct Client *, char *, char *);
153   extern void check_spambot_warning(struct Client *, const char *);
154 < extern void check_splitmode(void *);
155 < extern void free_channel_list(dlink_list *);
141 < extern void destroy_channel(struct Channel *);
142 < extern void channel_set_topic(struct Channel *, const char *, const char *, time_t, int);
154 > extern void channel_free(struct Channel *);
155 > extern void channel_set_topic(struct Channel *, const char *, const char *, uintmax_t, int);
156  
157   extern const char *get_member_status(const struct Membership *, const int);
158  
159 < extern struct Channel *make_channel(const char *);
159 > extern struct Channel *channel_make(const char *);
160   extern struct Membership *find_channel_link(struct Client *, struct Channel *);
161   #endif

Diff Legend

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