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

Comparing:
ircd-hybrid-7.2/include/client.h (file contents), Revision 1015 by michael, Sun Oct 25 00:08:06 2009 UTC vs.
ircd-hybrid-8/include/client.h (file contents), Revision 1159 by michael, Wed Aug 10 21:08:18 2011 UTC

# Line 105 | Line 105 | struct Client
105    time_t            firsttime;  /* time client was created */
106    time_t            since;      /* last time we parsed something */
107    time_t            tsinfo;     /* TS on the nick, SVINFO on server */
108 +  time_t            servicestamp;
109    uint64_t          flags;      /* client flags */
110  
111    unsigned int      umodes;     /* opers, normal users subset */
112    unsigned int      hopcount;   /* number of servers to this 0 = local */
113    unsigned int      status;     /* Client type */
114    unsigned int      handler;    /* Handler index */
114  unsigned int      serial;     /* used to enforce 1 send per nick */
115  
116    dlink_list        channel;   /* chain of channel pointer blocks */
117  
# Line 143 | Line 143 | struct Client
143     * gcos field in /etc/passwd but anything can go here.
144     */
145    char              info[REALLEN + 1]; /* Free form additional client info */
146  char              client_host[HOSTLEN + 1];
147  char              client_server[HOSTLEN + 1];
146  
147 <  /* client->sockhost contains the ip address gotten from the socket as a
147 >  /*
148 >   * client->sockhost contains the ip address gotten from the socket as a
149     * string, this field should be considered read-only once the connection
150     * has been made. (set in s_bsd.c only)
151     */
# Line 160 | Line 159 | struct LocalUser
159     * The following fields are allocated only for local clients
160     * (directly connected to *this* server with a socket.
161     */
162 <  dlink_node        lclient_node;
164 <
162 >  dlink_node   lclient_node;
163  
164 +  char         client_host[HOSTLEN + 1];
165 +  char         client_server[HOSTLEN + 1];
166  
167    unsigned int registration;
168    unsigned int cap_client;    /* Client capabilities (from us) */
# Line 171 | Line 171 | struct LocalUser
171    unsigned int operflags;     /* oper priv flags */
172    unsigned int random_ping;
173  
174 +  unsigned int serial;     /* used to enforce 1 send per nick */
175  
176    /* Anti flooding part, all because of lamers... */
177    time_t       last_knock;    /* time of last knock */
# Line 302 | Line 303 | struct LocalUser
303   * ts stuff
304   */
305   #define TS_CURRENT      6       /* current TS protocol version */
306 < #ifdef TS5_ONLY
306 < #define TS_MIN          5
307 < #else
308 < #define TS_MIN          3       /* minimum supported TS protocol version */
309 < #endif
306 > #define TS_MIN          5       /* minimum supported TS protocol version */
307   #define TS_DOESTS       0x20000000
308   #define DoesTS(x)       ((x)->tsinfo == TS_DOESTS)
309  
# Line 314 | Line 311 | struct LocalUser
311  
312   #define CAP_MULTI_PREFIX  0x00000001
313  
314 + #define HasCap(x, y) ((x)->localClient->cap_active & (y))
315 +
316   /* housekeeping flags */
317   #define FLAGS_PINGSENT      0x0000000000000001 /* Unreplied ping sent                      */
318   #define FLAGS_DEADSOCKET    0x0000000000000002 /* Local socket is dead--Exiting soon       */
# Line 348 | Line 347 | struct LocalUser
347   #define FLAGS_PINGWARNING   0x0000000040000000 /* unreplied ping warning already sent      */
348   #define FLAGS_FINISHED_AUTH 0x0000000080000000 /* Client has been released from auth       */
349   #define FLAGS_FLOOD_NOTICED 0x0000000100000000
350 + #define FLAGS_SERVICE       0x0000000200000000 /* Client/server is a network service       */
351  
352  
353   /* umodes, settable flags */
# Line 370 | Line 370 | struct LocalUser
370   #define UMODE_LOCOPS       0x00010000 /* show locops */
371   #define UMODE_DEAF         0x00020000 /* don't receive channel messages */
372   #define UMODE_CCONN_FULL   0x00040000 /* add unused fields to connection monitoring */
373 + #define UMODE_REGISTERED   0x00080000 /* User has identified for that nick. */
374  
375   /* user information flags, only settable by remote mode or local oper */
376   #define UMODE_OPER         0x40000000 /* Operator */
# Line 377 | Line 378 | struct LocalUser
378  
379   #define UMODE_ALL          UMODE_SERVNOTICE
380  
381 + #define HasUMode(x, y) ((x)->umodes &   (y))
382 + #define AddUMode(x, y) ((x)->umodes |=  (y))
383 + #define DelUMode(x, y) ((x)->umodes &= ~(y))
384 +
385   #define SEND_UMODES  (UMODE_INVISIBLE | UMODE_OPER | UMODE_WALLOP | \
386 <                      UMODE_ADMIN)
386 >                      UMODE_REGISTERED | UMODE_ADMIN)
387 >
388 >
389  
390  
391   /* oper priv flags */
# Line 499 | Line 506 | struct LocalUser
506   #define SetPingCookie(x)        ((x)->flags |= FLAGS_PING_COOKIE)
507   #define IsHidden(x)             ((x)->flags &  FLAGS_HIDDEN)
508   #define SetHidden(x)            ((x)->flags |= FLAGS_HIDDEN)
509 + #define IsService(x)            ((x)->flags &  FLAGS_SERVICE)
510 + #define SetService(x)           ((x)->flags |= FLAGS_SERVICE)
511  
512   #define IsSendqBlocked(x)       ((x)->flags &  FLAGS_BLOCKED)
513   #define SetSendqBlocked(x)      ((x)->flags |= FLAGS_BLOCKED)
# Line 560 | Line 569 | extern void free_exited_clients(void);
569   extern struct Client *make_client(struct Client *);
570   extern struct Client *find_chasing(struct Client *, struct Client *, const char *, int *);
571   extern struct Client *find_person(const struct Client *const, const char *);
572 < extern const char *get_client_name(struct Client *, int);
572 > extern const char *get_client_name(const struct Client *, int);
573  
574   #endif /* INCLUDED_client_h */

Diff Legend

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