| 53 |
|
#define REG_NEED_CAP 0x00000004U /**< In middle of CAP negotiations */ |
| 54 |
|
#define REG_INIT (REG_NEED_USER|REG_NEED_NICK) |
| 55 |
|
|
| 56 |
< |
#define ID_or_name(x,client_p) ((IsCapable(client_p->from, CAP_TS6) && (x)->id[0]) ? (x)->id : (x)->name) |
| 56 |
> |
#define ID_or_name(x,client_p) ((IsServer(client_p->from) && (x)->id[0]) ? (x)->id : (x)->name) |
| 57 |
|
|
| 58 |
|
#define IsRegistered(x) ((x)->status > STAT_UNKNOWN) |
| 59 |
|
#define IsConnecting(x) ((x)->status == STAT_CONNECTING) |
| 139 |
|
|
| 140 |
|
/* umodes, settable flags */ |
| 141 |
|
#define UMODE_SERVNOTICE 0x00000001U /**< Server notices such as kill */ |
| 142 |
< |
#define UMODE_CCONN 0x00000002U /**< Client Connections */ |
| 142 |
> |
#define UMODE_CCONN 0x00000002U /**< Can see client connection notices */ |
| 143 |
|
#define UMODE_REJ 0x00000004U /**< Bot Rejections */ |
| 144 |
|
#define UMODE_SKILL 0x00000008U /**< Server Killed */ |
| 145 |
|
#define UMODE_FULL 0x00000010U /**< Full messages */ |
| 153 |
|
#define UMODE_CALLERID 0x00001000U /**< Block unless caller id's */ |
| 154 |
|
#define UMODE_SOFTCALLERID 0x00002000U /**< Block unless on common channel */ |
| 155 |
|
#define UMODE_UNAUTH 0x00004000U /**< Show unauth connects here */ |
| 156 |
< |
#define UMODE_LOCOPS 0x00008000U /**< Show locops */ |
| 156 |
> |
#define UMODE_LOCOPS 0x00008000U /**< Can see LOCOPS messages */ |
| 157 |
|
#define UMODE_DEAF 0x00010000U /**< Don't receive channel messages */ |
| 158 |
|
#define UMODE_REGISTERED 0x00020000U /**< User has identified for that nick. */ |
| 159 |
|
#define UMODE_REGONLY 0x00040000U /**< Only registered nicks may PM */ |
| 160 |
< |
#define UMODE_HIDDEN 0x00080000U /**< Operator status is hidden */ |
| 161 |
< |
#define UMODE_OPER 0x00100000U /**< Operator */ |
| 160 |
> |
#define UMODE_HIDDEN 0x00080000U /**< IRC operator status is hidden */ |
| 161 |
> |
#define UMODE_OPER 0x00100000U /**< IRC operator */ |
| 162 |
|
#define UMODE_ADMIN 0x00200000U /**< Admin on server */ |
| 163 |
|
#define UMODE_FARCONNECT 0x00400000U /**< Can see remote client connects/exits */ |
| 164 |
|
#define UMODE_HIDDENHOST 0x00800000U /**< User's host is hidden */ |
| 266 |
|
MASK_IP /**< IP is masked. 255.255.255.255 is shown instead */ |
| 267 |
|
}; |
| 268 |
|
|
| 269 |
+ |
struct ServicesTag |
| 270 |
+ |
{ |
| 271 |
+ |
dlink_node node; |
| 272 |
+ |
char *tag; |
| 273 |
+ |
unsigned int numeric; |
| 274 |
+ |
unsigned int umodes; |
| 275 |
+ |
}; |
| 276 |
+ |
|
| 277 |
|
/*! \brief Server structure */ |
| 278 |
|
struct Server |
| 279 |
|
{ |
| 397 |
|
|
| 398 |
|
dlink_list whowas; |
| 399 |
|
dlink_list channel; /**< Chain of channel pointer blocks */ |
| 400 |
+ |
dlink_list svstags; /**< List of ServicesTag items */ |
| 401 |
|
|
| 402 |
|
char away[AWAYLEN + 1]; /**< Client's AWAY message. Can be set/unset via AWAY command */ |
| 403 |
|
char name[HOSTLEN + 1]; /**< Unique name for a client nick or host */ |
| 404 |
|
char id[IDLEN + 1]; /**< Client ID, unique ID per client */ |
| 405 |
< |
char account[SVIDLEN + 1]; /**< Services account */ |
| 405 |
> |
char account[ACCOUNTLEN + 1]; /**< Services account */ |
| 406 |
|
|
| 407 |
|
/* |
| 408 |
|
* client->username is the username from ident or the USER message, |
| 448 |
|
extern dlink_list oper_list; /* our opers, duplicated in local_client_list */ |
| 449 |
|
|
| 450 |
|
extern int accept_message(struct Client *, struct Client *); |
| 451 |
< |
extern unsigned int idle_time_get(const struct Client *, const struct Client *); |
| 451 |
> |
extern unsigned int client_get_idle_time(const struct Client *, const struct Client *); |
| 452 |
|
extern struct split_nuh_item *find_accept(const char *, const char *, |
| 453 |
|
const char *, struct Client *, |
| 454 |
|
int (*)(const char *, const char *)); |
| 455 |
+ |
extern void client_attach_svstag(struct Client *, unsigned int, const char *, const char *const); |
| 456 |
+ |
extern void client_clear_svstags(struct Client *); |
| 457 |
|
extern void del_accept(struct split_nuh_item *, struct Client *); |
| 458 |
|
extern void del_all_accepts(struct Client *); |
| 459 |
|
extern void exit_client(struct Client *, const char *); |