Anope IRC Services  Version 1.8
services.h
Go to the documentation of this file.
1 /*
2  *
3  * (C) 2003-2014 Anope Team
4  * Contact us at team@anope.org
5  *
6  * Please read COPYING and README for further details.
7  *
8  * Based on the original code of Epona by Lara.
9  * Based on the original code of Services by Andy Church.
10  *
11  *
12  */
13 
14 #ifndef SERVICES_H
15 #define SERVICES_H
16 
17 /*************************************************************************/
18 
19 #include "sysconf.h"
20 #include "config.h"
21 
22 #ifndef MAX_CMD_HASH
23 #define MAX_CMD_HASH 1024
24 #endif
25 
26 /* Some Linux boxes (or maybe glibc includes) require this for the
27  * prototype of strsignal(). */
28 #ifndef _GNU_SOURCE
29 #define _GNU_SOURCE
30 #endif
31 
32 /* Some SUN fixs */
33 #ifdef __sun
34 /* Solaris specific code, types that do not exist in Solaris'
35  * sys/types.h
36  **/
37 #undef u_int8_t
38 #undef u_int16_t
39 #undef u_int32_t
40 #undef u_int_64_t
41 #define u_int8_t uint8_t
42 #define u_int16_t uint16_t
43 #define u_int32_t uint32_t
44 #define u_int64_t uint64_t
45 
46 #ifndef INADDR_NONE
47 #define INADDR_NONE (-1)
48 #endif
49 
50 #endif
51 
52 
53 #include <stdarg.h>
54 #include <stdio.h>
55 #include <stdlib.h>
56 #include <string.h>
57 
58 /* Windows does not have:
59  * unistd.h, grp.h,
60  * netdb.h, netinet/in.h,
61  * sys/socket.h, sys/time.h
62  * Windows requires:
63  * winsock.h
64  * -- codemastr
65  */
66 
67 #ifndef _WIN32
68 #include <unistd.h>
69 #endif
70 
71 #include <signal.h>
72 #include <time.h>
73 #include <errno.h>
74 
75 #ifndef _WIN32
76 #include <grp.h>
77 #endif
78 
79 #include <limits.h>
80 
81 #ifndef _WIN32
82 #include <netdb.h>
83 #include <netinet/in.h>
84 #include <arpa/inet.h>
85 #include <sys/socket.h>
86 #else
87 #include <winsock.h>
88 #include <windows.h>
89 #endif
90 #define h_addr h_addr_list[0] /* for backwards compatability, see man gethostbyname */
91 
92 #include <sys/stat.h> /* for umask() on some systems */
93 #include <sys/types.h>
94 
95 #ifndef _WIN32
96 #include <sys/time.h>
97 #endif
98 
99 #ifdef _WIN32
100 #include <sys/timeb.h>
101 #include <direct.h>
102 #include <io.h>
103 #endif
104 
105 #include <fcntl.h>
106 
107 #ifndef _WIN32
108 #ifdef HAVE_BACKTRACE
109 #include <execinfo.h>
110 #endif
111 #endif
112 
113 #ifndef _WIN32
114 #include <dirent.h>
115 #endif
116 
117 #ifdef _WIN32
118 /* VS2008 hates having this define before its own */
119 #define vsnprintf _vsnprintf
120 #endif
121 
122 #ifdef USE_RDB
123 # define MAX_SQL_BUF 4096
124 #endif
125 
126 #ifdef USE_MYSQL
127 # define MYSQL_WARNING 2
128 # define MYSQL_ERROR 4
129 # define MYSQL_DEFAULT_PORT 3306
130 #ifdef MYSQL_HEADER_PREFIX
131 # include <mysql/mysql.h>
132 # include <mysql/errmsg.h>
133 #else
134 # include <mysql.h>
135 # include <errmsg.h>
136 #endif
137 #endif
138 
139 #if HAVE_STRINGS_H
140 # include <strings.h>
141 #endif
142 
143 #if HAVE_SYS_SELECT_H
144 # include <sys/select.h>
145 #endif
146 
147 #include "sockets.h"
148 
149 #ifndef va_copy
150 # ifdef __va_copy
151 # define VA_COPY(DEST,SRC) __va_copy((DEST),(SRC))
152 # else
153 # define VA_COPY(DEST, SRC) memcpy ((&DEST), (&SRC), sizeof(va_list))
154 # endif
155 #else
156 # ifdef HAVE_VA_LIST_AS_ARRAY
157 # define VA_COPY(DEST,SRC) (*(DEST) = *(SRC))
158 # else
159 # define VA_COPY(DEST, SRC) va_copy(DEST, SRC)
160 # endif
161 #endif
162 
163 #ifdef _AIX
164 /* Some AIX boxes seem to have bogus includes that don't have these
165  * prototypes. */
166 extern int strcasecmp(const char *, const char *);
167 extern int strncasecmp(const char *, const char *, size_t);
168 # if 0 /* These break on some AIX boxes (4.3.1 reported). */
169 extern int gettimeofday(struct timeval *, struct timezone *);
170 extern int socket(int, int, int);
171 extern int bind(int, struct sockaddr *, int);
172 extern int connect(int, struct sockaddr *, int);
173 extern int shutdown(int, int);
174 # endif
175 # undef FD_ZERO
176 # define FD_ZERO(p) memset((p), 0, sizeof(*(p)))
177 #endif /* _AIX */
178 
179 /* Alias stricmp/strnicmp to strcasecmp/strncasecmp if we have the latter
180  * but not the former. */
181 #if !HAVE_STRICMP && HAVE_STRCASECMP
182 # define stricmp strcasecmp
183 # define strnicmp strncasecmp
184 #endif
185 
186 /* We have our own versions of toupper()/tolower(). */
187 #include <ctype.h>
188 #undef tolower
189 #undef toupper
190 #define tolower tolower_
191 #define toupper toupper_
192 
193 /* We also have our own encrypt(). */
194 #define encrypt encrypt_
195 
196 
197 #ifdef __WINS__
198 #ifndef BKCHECK
199 #define BKCHECK
200  extern "C" void __pfnBkCheck() {}
201 #endif
202 #endif
203 
204 
205 #if INTTYPE_WORKAROUND
206 # undef int16
207 # undef int32
208 #endif
209 
210 
211 /* Miscellaneous definitions. */
212 #include "defs.h"
213 #include "slist.h"
214 #include "events.h"
215 
216 /*************************************************************************/
217 
218 typedef struct server_ Server;
219 typedef struct user_ User;
220 typedef struct channel_ Channel;
221 typedef struct c_elist EList;
222 typedef struct c_elist_entry Entry;
223 typedef struct ModuleData_ ModuleData; /* ModuleData struct */
224 typedef struct memo_ Memo;
225 typedef struct nickrequest_ NickRequest;
226 typedef struct nickalias_ NickAlias;
227 typedef struct nickcore_ NickCore;
228 typedef struct botinfo_ BotInfo;
229 typedef struct chaninfo_ ChannelInfo;
230 typedef struct badword_ BadWord;
231 typedef struct bandata_ BanData;
232 typedef struct userdata_ UserData;
233 typedef struct mailinfo_ MailInfo;
234 typedef struct akill_ Akill;
235 typedef struct sxline_ SXLine;
236 typedef struct hostcore_ HostCore;
237 typedef struct newsitem_ NewsItem;
238 typedef struct exception_ Exception;
239 typedef struct cbmode_ CBMode;
240 typedef struct cbmodeinfo_ CBModeInfo;
241 typedef struct cmmode_ CMMode;
242 typedef struct csmode_ CSMode;
243 typedef struct cumode_ CUMode;
244 typedef struct csmodeutil_ CSModeUtil;
245 typedef struct session_ Session;
246 typedef struct uid_ Uid;
247 
248 /*************************************************************************/
249 
250 /* Windows defines a boolean type as an
251  * unsigned char. It does however need
252  * true/false. -- codemastr
253  */
254 #ifndef _WIN32
255 typedef enum { false, true } boolean;
256 #else
257  #ifndef true
258  #define true 1
259  #endif
260  #ifndef false
261  #define false 0
262  #endif
263 #endif /* _WIN32 */
264 
265 /*************************************************************************/
266 
267 /* Protocol tweaks */
268 
269 /* If the IRCd supports TS6 / p10 and it s being used, this selects the uid instead of the nick.. */
270 #define GET_USER(u) ((ircd->p10 || (UseTS6 && ircd->ts6)) ? (u->uid ? u->uid : u->nick) : u->nick)
271 #define GET_BOT(bot) ((ircd->p10 || (UseTS6 && ircd->ts6)) ? (find_uid(bot) ? find_uid(bot)->uid : bot) : bot)
272 
273 typedef struct ircdvars_ IRCDVar;
274 typedef struct ircdcapab_ IRCDCAPAB;
275 
276 struct ircdvars_ {
277  char *name; /* Name of the ChanServ command */
278  char *nickservmode; /* Mode used by NickServ */
279  char *chanservmode; /* Mode used by ChanServ */
280  char *memoservmode; /* Mode used by MemoServ */
281  char *hostservmode; /* Mode used by HostServ */
282  char *operservmode; /* Mode used by OperServ */
283  char *botservmode; /* Mode used by BotServ */
284  char *helpservmode; /* Mode used by HelpServ */
285  char *devnullmode; /* Mode used by Dev/Null */
286  char *globalmode; /* Mode used by Global */
287  char *nickservaliasmode; /* Mode used by NickServ Alias */
288  char *chanservaliasmode; /* Mode used by ChanServ Alias */
289  char *memoservaliasmode; /* Mode used by MemoServ Alias */
290  char *hostservaliasmode; /* Mode used by HostServ Alias */
291  char *operservaliasmode; /* Mode used by OperServ Alias */
292  char *botservaliasmode; /* Mode used by BotServ Alias */
293  char *helpservaliasmode; /* Mode used by HelpServ Alias */
294  char *devnullvaliasmode; /* Mode used by Dev/Null Alias */
295  char *globalaliasmode; /* Mode used by Global Alias */
296  char *botserv_bot_mode; /* Mode used by BotServ Bots */
297  int max_symbols; /* Chan Max Symbols */
298  char *modestoremove; /* Channel Modes to remove */
299  char *botchanumode; /* Modes set when botserv joins a channel */
300  int svsnick; /* Supports SVSNICK */
301  int vhost; /* Supports vhost */
302  int owner; /* Supports Owner */
303  char *ownerset; /* Mode to set for owner */
304  char *ownerunset; /* Mode to unset for a owner */
305  char *adminset; /* Mode to set for admin */
306  char *adminunset; /* Mode to unset for admin */
307  char *modeonreg; /* Mode on Register */
308  char *rootmodeonid; /* Mode on ID for ROOTS */
309  char *adminmodeonid; /* Mode on ID for ADMINS */
310  char *opermodeonid; /* Mode on ID for OPERS */
311  char *modeonunreg; /* Mode on Unregister */
312  char *modeonnick; /* Mode on nick change */
313  int sgline; /* Supports SGline */
314  int sqline; /* Supports SQline */
315  int szline; /* Supports SZline */
316  int halfop; /* Supports HalfOp */
317  int numservargs; /* Number of Server Args */
318  int join2set; /* Join 2 Set Modes */
319  int join2msg; /* Join 2 Message */
320  int except; /* exception +e */
321  int topictsforward; /* TS on Topics Forward */
322  int topictsbackward; /* TS on Topics Backward */
323  uint32 protectedumode; /* What is the Protected Umode */
324  int admin; /* Has Admin */
325  int chansqline; /* Supports Channel Sqlines */
326  int quitonkill; /* IRCD sends QUIT when kill */
327  int svsmode_unban; /* svsmode can be used to unban
328  * Note the core no longer uses
329  * this because it can lead to
330  * users gaining other users IPs.
331  * It is kept for API compatability.
332  */
333  int protect; /* Has protect modes */
334  int reversekickcheck; /* Can reverse ban check */
335  int chanreg; /* channel mode +r for register */
336  uint32 regmode; /* Mode to use for +r */
337  int vident; /* Supports vidents */
338  int svshold; /* Supports svshold */
339  int tsonmode; /* Timestamp on mode changes */
340  int nickip; /* Sends IP on NICK */
341  int omode; /* On the fly o:lines */
342  int umode; /* change user modes */
343  int nickvhost; /* Users vhost sent during NICK */
344  int chgreal; /* Change RealName */
345  uint32 noknock; /* Channel Mode for no knock */
346  uint32 adminmode; /* Admin Only Channel Mode */
347  uint32 defmlock; /* Default mlock modes */
348  uint32 vhostmode; /* Vhost mode */
349  int fmode; /* +f */
350  int Lmode; /* +L */
351  uint32 chan_fmode; /* Mode */
352  uint32 chan_lmode; /* Mode */
353  int check_nick_id; /* On nick change check if they could be identified */
354  int knock_needs_i; /* Check if we needed +i when setting NOKNOCK */
355  char *chanmodes; /* If the ircd sends CHANMODE in CAPAB this is where we store it */
356  int token; /* Does Anope support the tokens for the ircd */
357  int tokencaseless; /* TOKEN are not case senstive - most its Unreal that is case senstive */
358  int sjb64; /* Base 64 encode TIMESTAMP */
359  int invitemode; /* +I */
360  int sjoinbanchar; /* use single quotes to define it */
361  int sjoinexchar; /* use single quotes to define it */
362  int sjoininvchar; /* use single quotes to define it */
363  int svsmode_ucmode; /* Can remove User Channel Modes with SVSMODE */
365  char *vhostchar; /* char used for vhosting */
366  int ts6; /* ircd is TS6 */
367  int supporthelper; /* +h helper umodes */
368  int p10; /* ircd is P10 */
369  char *nickchars; /* character set */
370  int sync; /* reports sync state */
371  int cidrchanbei; /* channel bans/excepts/invites support CIDR (syntax: +b *!*@192.168.0.0/15)
372  * 0 for no support, 1 for strict cidr support, anything else
373  * for ircd specific support (nefarious only cares about first /mask) */
374  int jmode; /* +j join throttle */
375  uint32 chan_jmode; /* Mode */
376  int delay_cl_intro; /*Delay client introduction till after receiving CAPAB. */
377 };
378 
379 struct ircdcapab_ {
411 };
412 
413 /* tiny struct needed for P10 and other UID servers so we can track
414  services UID
415 */
416 struct uid_ {
418  char nick[NICKMAX];
419  char *uid;
420 };
421 
422 /*************************************************************************/
423 /* Config Details */
424 /*************************************************************************/
425 
426 #define MAXPARAMS 8
427 
428 /* Configuration directives */
429 
430 typedef struct {
431  char *name;
432  struct {
433  int type; /* PARAM_* below */
434  int flags; /* Same */
435  void *ptr; /* Pointer to where to store the value */
436  } params[MAXPARAMS];
437 } Directive;
438 
439 #define PARAM_NONE 0
440 #define PARAM_INT 1
441 #define PARAM_POSINT 2 /* Positive integer only */
442 #define PARAM_PORT 3 /* 1..65535 only */
443 #define PARAM_STRING 4
444 #define PARAM_TIME 5
445 #define PARAM_STRING_ARRAY 6 /* Array of string */
446 #define PARAM_SET -1 /* Not a real parameter; just set the
447  * given integer variable to 1 */
448 #define PARAM_DEPRECATED -2 /* Set for deprecated directives; `ptr'
449  * is a function pointer to call */
450 
451 /* Flags: */
452 #define PARAM_OPTIONAL 0x01
453 #define PARAM_FULLONLY 0x02 /* Directive only allowed if !STREAMLINED */
454 #define PARAM_RELOAD 0x04 /* Directive is reloadable */
455 
456 /*************************************************************************/
457 
458 /* File version for each database. Was one version for all before but was
459  changed so they are now easier to maintain. =) */
460 
461 #define BOT_VERSION 10
462 #define CHAN_VERSION 16
463 #define EXCEPTION_VERSION 9
464 #define NEWS_VERSION 9
465 #define NICK_VERSION 14
466 #define PRE_NICK_VERSION 2
467 #define OPER_VERSION 13
468 #define HELP_VERSION 1
469 #define HOST_VERSION 3
470 
471 /*************************************************************************/
472 
473 
478 struct ModuleData_ {
479  char *moduleName; /* Which module we belong to */
480  char *key; /* The key */
481  char *value; /* The Value */
482  ModuleData *next; /* The next ModuleData record */
483 };
484 
485  /*************************************************************************/
486 
487 /* Memo info structures. Since both nicknames and channels can have memos,
488  * we encapsulate memo data in a MemoList to make it easier to handle. */
489 
490 struct memo_ {
491  uint32 number; /* Index number -- not necessarily array position! */
493  time_t time; /* When it was sent */
495  char *text;
496  ModuleData *moduleData; /* Module saved data attached to the Memo */
497 #ifdef USE_MYSQL
498  uint32 id; /* Database ID; see mysql.c */
499 #else
500  uint32 notused; /* ABI compat with no mysql */
501 #endif
502 };
503 
504 typedef struct {
505  int16 memocount, memomax;
507 } MemoInfo;
508 
509 /*************************************************************************/
510 
511 /* NickServ nickname structures. */
512 
513 
514 struct nickrequest_ {
516  char *nick;
517  char *passcode;
519  char *email;
520  time_t requested;
521  time_t lastmail; /* Unsaved */
522 };
523 
524 struct nickalias_ {
526  char *nick; /* Nickname */
527  char *last_quit; /* Last quit message */
528  char *last_realname; /* Last realname */
529  char *last_usermask; /* Last usermask */
530  time_t time_registered; /* When the nick was registered */
531  time_t last_seen; /* When it was seen online for the last time */
532  uint16 status; /* See NS_* below */
533  NickCore *nc; /* I'm an alias of this */
534  /* Not saved */
535  ModuleData *moduleData; /* Module saved data attached to the nick alias */
536  User *u; /* Current online user that has me */
537 };
538 
539 struct nickcore_ {
541 
542  char *display; /* How the nick is displayed */
543  char pass[PASSMAX]; /* Password of the nicks */
544  char *email; /* E-mail associated to the nick */
545  char *greet; /* Greet associated to the nick */
546  uint32 icq; /* ICQ # associated to the nick */
547  char *url; /* URL associated to the nick */
548  uint32 flags; /* See NI_* below */
549  uint16 language; /* Language selected by nickname owner (LANG_*) */
550  uint16 accesscount; /* # of entries */
551  char **access; /* Array of strings */
553  uint16 channelcount; /* Number of channels currently registered */
554  uint16 channelmax; /* Maximum number of channels allowed */
555 
556  /* Unsaved data */
557  ModuleData *moduleData; /* Module saved data attached to the NickCore */
558  time_t lastmail; /* Last time this nick record got a mail */
559  SList aliases; /* List of aliases */
560 };
561 
562 
563 /*************************************************************************/
564 
565 /* Bot info structures. Note that since there won't be many bots,
566  * they're not in a hash list.
567  * --lara
568  */
569 
570 struct botinfo_ {
572 
573  char *nick; /* Nickname of the bot */
574  char *user; /* Its user name */
575  char *host; /* Its hostname */
576  char *real; /* Its real name */
577  int16 flags; /* Bot flags -- see BI_* below */
578  time_t created; /* Birth date ;) */
579  int16 chancount; /* Number of channels that use the bot. */
580  /* Dynamic data */
581  time_t lastmsg; /* Last time we said something */
582 };
583 
584 
585 
586 /* Channel info structures. Stored similarly to the nicks, except that
587  * the second character of the channel name, not the first, is used to
588  * determine the list. (Hashing based on the first character of the name
589  * wouldn't get very far. ;) ) */
590 
591 /* Access levels for users. */
592 typedef struct {
593  uint16 in_use; /* 1 if this entry is in use, else 0 */
595  NickCore *nc; /* Guaranteed to be non-NULL if in use, NULL if not */
596  time_t last_seen;
597 } ChanAccess;
598 
599 /* Note that these two levels also serve as exclusive boundaries for valid
600  * access levels. ACCESS_FOUNDER may be assumed to be strictly greater
601  * than any valid access level, and ACCESS_INVALID may be assumed to be
602  * strictly less than any valid access level. Also read below.
603  */
604 #define ACCESS_FOUNDER 10000 /* Numeric level indicating founder access */
605 #define ACCESS_INVALID -10000 /* Used in levels[] for disabled settings */
606 /* There is one exception to the above access levels: SuperAdmins will have
607  * access level 10001. This level is never stored, however; it is only used
608  * in comparison and to let SuperAdmins win from founders where needed
609  */
610 #define ACCESS_SUPERADMIN 10001
611 
612 /* Levels for xOP */
613 
614 #define ACCESS_VOP 3
615 #define ACCESS_HOP 4
616 #define ACCESS_AOP 5
617 #define ACCESS_SOP 10
618 
619 /* AutoKick data. */
620 typedef struct {
621  int16 in_use; /* Always 0 if not in use */
622  int16 is_nick; /* 1 if a regged nickname, 0 if a nick!user@host mask */
624  union {
625  char *mask; /* Guaranteed to be non-NULL if in use, NULL if not */
626  NickCore *nc; /* Same */
627  } u;
628  char *reason;
629 
630  char *creator;
631  time_t addtime;
632 } AutoKick;
633 
634 #define AK_USED 0x0001
635 #define AK_ISNICK 0x0002
636 #define AK_STUCK 0x0004
637 
638 /* Structure used to contain bad words. */
639 
640 struct badword_ {
642  char *word;
643  uint16 type; /* BW_* below */
644 };
645 
646 #define BW_ANY 0
647 #define BW_SINGLE 1
648 #define BW_START 2
649 #define BW_END 3
650 
651 
652 struct chaninfo_ {
654  char name[CHANMAX];
656  NickCore *successor; /* Who gets the channel if the founder
657  * nick is dropped or expires */
659  char *desc;
660  char *url;
661  char *email;
662 
664  time_t last_used;
665  char *last_topic; /* Last topic on the channel */
666  char last_topic_setter[NICKMAX]; /* Who set the last topic */
667  time_t last_topic_time; /* When the last topic was set */
668 
669  uint32 flags; /* See below */
670  char *forbidby;
672 
674  int16 *levels; /* Access levels for commands */
675 
677  ChanAccess *access; /* List of authorized users */
679  AutoKick *akick; /* List of users to kickban */
680 
681  uint32 mlock_on, mlock_off; /* See channel modes below */
682  uint32 mlock_limit; /* 0 if no limit */
683  char *mlock_key; /* NULL if no key */
684  char *mlock_flood; /* NULL if no +f */
685  char *mlock_redirect; /* NULL if no +L */
686  char *mlock_throttle; /* NULL if no +j */
687 
688  char *entry_message; /* Notice sent on entering channel */
689 
691 
692  struct channel_ *c; /* Pointer to channel record (if *
693  * channel is currently in use) */
694 
695  ModuleData *moduleData; /* Module saved data attached to the ChannelInfo */
696 
697  /* For BotServ */
698 
699  BotInfo *bi; /* Bot used on this channel */
700  uint32 botflags; /* BS_* below */
701  int16 *ttb; /* Times to ban for each kicker */
702 
704  BadWord *badwords; /* For BADWORDS kicker */
705  int16 capsmin, capspercent; /* For CAPS kicker */
706  int16 floodlines, floodsecs; /* For FLOOD kicker */
707  int16 repeattimes; /* For REPEAT kicker */
708 };
709 
710 /* Retain topic even after last person leaves channel */
711 #define CI_KEEPTOPIC 0x00000001
712 /* Don't allow non-authorized users to be opped */
713 #define CI_SECUREOPS 0x00000002
714 /* Hide channel from ChanServ LIST command */
715 #define CI_PRIVATE 0x00000004
716 /* Topic can only be changed by SET TOPIC */
717 #define CI_TOPICLOCK 0x00000008
718 /* Those not allowed ops are kickbanned */
719 #define CI_RESTRICTED 0x00000010
720 /* Don't allow ChanServ and BotServ commands to do bad things to bigger levels */
721 #define CI_PEACE 0x00000020
722 /* Don't allow any privileges unless a user is IDENTIFY'd with NickServ */
723 #define CI_SECURE 0x00000040
724 /* Don't allow the channel to be registered or used */
725 #define CI_VERBOTEN 0x00000080
726 /* Channel password is encrypted */
727 #define CI_ENCRYPTEDPW 0x00000100
728 /* Channel does not expire */
729 #define CI_NO_EXPIRE 0x00000200
730 /* Channel memo limit may not be changed */
731 #define CI_MEMO_HARDMAX 0x00000400
732 /* Send notice to channel on use of OP/DEOP */
733 #define CI_OPNOTICE 0x00000800
734 /* Stricter control of channel founder status */
735 #define CI_SECUREFOUNDER 0x00001000
736 /* Always sign kicks */
737 #define CI_SIGNKICK 0x00002000
738 /* Sign kicks if level is < than the one defined by the SIGNKICK level */
739 #define CI_SIGNKICK_LEVEL 0x00004000
740 /* Use the xOP lists */
741 #define CI_XOP 0x00008000
742 /* Channel is suspended */
743 #define CI_SUSPENDED 0x00010000
744 
745 /* TEMPORARY - ChanServ is on the channel. */
746 #define CI_INHABIT 0x80000000
747 
748 /* Indices for cmd_access[]: */
749 #define CA_INVITE 0
750 #define CA_AKICK 1
751 #define CA_SET 2 /* but not FOUNDER or PASSWORD */
752 #define CA_UNBAN 3
753 #define CA_AUTOOP 4
754 #define CA_AUTODEOP 5 /* Maximum, not minimum */
755 #define CA_AUTOVOICE 6
756 #define CA_OPDEOP 7 /* ChanServ commands OP and DEOP */
757 #define CA_ACCESS_LIST 8
758 #define CA_CLEAR 9
759 #define CA_NOJOIN 10 /* Maximum */
760 #define CA_ACCESS_CHANGE 11
761 #define CA_MEMO 12
762 #define CA_ASSIGN 13 /* BotServ ASSIGN command */
763 #define CA_BADWORDS 14 /* BotServ BADWORDS command */
764 #define CA_NOKICK 15 /* Not kicked by the bot */
765 #define CA_FANTASIA 16
766 #define CA_SAY 17
767 #define CA_GREET 18
768 #define CA_VOICEME 19
769 #define CA_VOICE 20
770 #define CA_GETKEY 21
771 #define CA_AUTOHALFOP 22
772 #define CA_AUTOPROTECT 23
773 #define CA_OPDEOPME 24
774 #define CA_HALFOPME 25
775 #define CA_HALFOP 26
776 #define CA_PROTECTME 27
777 #define CA_PROTECT 28
778 #define CA_KICKME 29
779 #define CA_KICK 30
780 #define CA_SIGNKICK 31
781 /* #define CA_AUTOADMIN 32
782 #define CA_ADMINME 33
783 #define CA_ADMIN 34 */
784  /* Why are these commented out and not removed? -GD */
785 #define CA_BANME 32
786 #define CA_BAN 33
787 #define CA_TOPIC 34
788 #define CA_INFO 35
789 
790 #define CA_SIZE 36
791 
792 /* BotServ SET flags */
793 #define BS_DONTKICKOPS 0x00000001
794 #define BS_DONTKICKVOICES 0x00000002
795 #define BS_FANTASY 0x00000004
796 #define BS_SYMBIOSIS 0x00000008
797 #define BS_GREET 0x00000010
798 #define BS_NOBOT 0x00000020
799 
800 /* BotServ Kickers flags */
801 #define BS_KICK_BOLDS 0x80000000
802 #define BS_KICK_COLORS 0x40000000
803 #define BS_KICK_REVERSES 0x20000000
804 #define BS_KICK_UNDERLINES 0x10000000
805 #define BS_KICK_BADWORDS 0x08000000
806 #define BS_KICK_CAPS 0x04000000
807 #define BS_KICK_FLOOD 0x02000000
808 #define BS_KICK_REPEAT 0x01000000
809 
810 /* Indices for TTB (Times To Ban) */
811 #define TTB_BOLDS 0
812 #define TTB_COLORS 1
813 #define TTB_REVERSES 2
814 #define TTB_UNDERLINES 3
815 #define TTB_BADWORDS 4
816 #define TTB_CAPS 5
817 #define TTB_FLOOD 6
818 #define TTB_REPEAT 7
819 #define TTB_SIZE 8
820 
821 /*************************************************************************/
822 
823 /* ChanServ mode utilities commands */
824 
825 struct csmodeutil_ {
826  char *name; /* Name of the ChanServ command */
827  char *bsname; /* Name of the BotServ fantasy command */
828  char *mode; /* Mode (ie. +o) */
829  int32 notice; /* Notice flag (for the damn OPNOTICE) */
830  int level; /* Level required to use the command */
831  int levelself; /* Level required to use the command for himself */
832 };
833 
834 typedef struct {
835  int what;
836  char *name;
837  int desc;
838 } LevelInfo;
839 
840 
841 /*************************************************************************/
842 
843 /* Server data */
844 
845 typedef enum {
846  SSYNC_UNKNOWN = 0, /* We can't get the sync state */
847  SSYNC_IN_PROGRESS = 1, /* Sync is currently in progress */
848  SSYNC_DONE = 2 /* We're in sync */
849 } SyncState;
850 
851 struct server_ {
853 
854  char *name; /* Server name */
855  uint16 hops; /* Hops between services and server */
856  char *desc; /* Server description */
857  uint16 flags; /* Some info flags, as defined below */
858  char *suid; /* Server Univeral ID */
859  SyncState sync; /* Server sync state (see above) */
860 
861  Server *links; /* Linked list head for linked servers */
862  Server *uplink; /* Server which pretends to be the uplink */
863 };
864 
865 #define SERVER_ISME 0x0001
866 #define SERVER_JUPED 0x0002
867 #define SERVER_ISUPLINK 0x0004
868 
869 /*************************************************************************/
870 
871 /* Online user and channel data. */
872 struct user_ {
874 
875  char nick[NICKMAX];
876 
877  char *username; /* ident */
878  char *host; /* User's real hostname */
879  char *hostip; /* User's IP number */
880  char *vhost; /* User's virtual hostname */
881  char *chost; /* User's cloaked hostname */
882  char *vident; /* User's virtual ident */
883  char *realname; /* Realname */
884  Server *server; /* Server user is connected to */
885  char *nickTrack; /* Nick Tracking */
886  time_t timestamp; /* Timestamp of the nick */
887  time_t my_signon; /* When did _we_ see the user? */
888  uint32 svid; /* Services ID */
889  uint32 mode; /* See below */
890  char *uid; /* Univeral ID */
891 
893 
894  ModuleData *moduleData; /* defined for it, it should allow the module Add/Get */
895 
896  int isSuperAdmin; /* is SuperAdmin on or off? */
897 
898  struct u_chanlist {
899  struct u_chanlist *next, *prev;
901  int16 status; /* Associated flags; see CSTATUS_* below. */
902  } *chans; /* Channels user has joined */
903 
904  struct u_chaninfolist {
907  } *founder_chans; /* Channels user has identified for */
908 
909  short invalid_pw_count; /* # of invalid password attempts */
910  time_t invalid_pw_time; /* Time of last invalid password */
911 
912  time_t lastmemosend; /* Last time MS SEND command used */
913  time_t lastnickreg; /* Last time NS REGISTER cmd used */
914  time_t lastmail; /* Last time this user sent a mail */
915 };
916 
917 
918 
919 struct cbmode_ {
920  uint32 flag; /* Long value that represents the mode */
921  uint16 flags; /* Flags applying to this mode (CBM_* below) */
922 
923  /* Function to associate a value with the mode */
924  void (*setvalue) (Channel *chan, char *value);
925  void (*cssetvalue) (ChannelInfo *ci, char *value);
926 };
927 
928 #define CBM_MINUS_NO_ARG 0x0001 /* No argument for unset */
929 #define CBM_NO_MLOCK 0x0002 /* Can't be MLOCKed */
930 #define CBM_NO_USER_MLOCK 0x0004 /* Can't be MLOCKed by non-opers */
931 
932 struct cbmodeinfo_ {
933  char mode; /* The mode */
934  uint32 flag; /* Long value that represents the mode */
935  uint16 flags; /* CBM_* above */
936 
937  /* Function to retrieve the value associated to the mode (optional) */
938  char * (*getvalue) (Channel *chan);
939  char * (*csgetvalue) (ChannelInfo *ci);
940 };
941 
942 struct cmmode_ {
943  void (*addmask) (Channel *chan, char *mask);
944  void (*delmask) (Channel *chan, char *mask);
945 };
946 
947 struct cumode_ {
948  int16 status; /* CUS_* below */
949  int16 flags; /* CUF_* below */
950 
951  int (*is_valid) (User *user, Channel *chan, int servermode);
952 };
953 
954 /* Channel user mode flags */
955 
956 #define CUF_PROTECT_BOTSERV 0x0001
957 
958 /* This structure stocks ban data since it must not be removed when
959  * user is kicked.
960  */
961 
962 struct bandata_ {
964 
965  char *mask; /* Since a nick is unsure and a User structure
966  is unsafe */
967  time_t last_use; /* Since time is the only way to check
968  whether it's still useful */
970 };
971 
972 /* This structure stocks information on every user that will be used by
973  * BotServ. */
974 
975 struct userdata_ {
976  /* Data validity */
977  time_t last_use;
978 
979  /* for flood kicker */
981  time_t last_start;
982 
983  /* for repeat kicker */
984  char *lastline;
986 };
987 
988 /* Channelban type flags */
989 #define ENTRYTYPE_NONE 0x00000000
990 #define ENTRYTYPE_CIDR4 0x00000001
991 #define ENTRYTYPE_NICK_WILD 0x00000004
992 #define ENTRYTYPE_NICK 0x00000008
993 #define ENTRYTYPE_USER_WILD 0x00000010
994 #define ENTRYTYPE_USER 0x00000020
995 #define ENTRYTYPE_HOST_WILD 0x00000040
996 #define ENTRYTYPE_HOST 0x00000080
997 
998 struct channel_ {
1000  char name[CHANMAX];
1001  ChannelInfo *ci; /* Corresponding ChannelInfo */
1002  time_t creation_time; /* When channel was created */
1003  char *topic;
1004  char topic_setter[NICKMAX]; /* Who set the topic */
1005  time_t topic_time; /* When topic was set */
1006  uint32 mode; /* Binary modes only */
1007  uint32 limit; /* 0 if none */
1008  char *key; /* NULL if none */
1009  char *redirect; /* +L; NULL if none */
1010  char *flood; /* +f; NULL if none */
1011  char *throttle; /* +j: NULL if none */
1015  struct c_userlist {
1016  struct c_userlist *next, *prev;
1019  } *users;
1021 
1023 
1024  time_t server_modetime; /* Time of last server MODE */
1025  time_t chanserv_modetime; /* Time of last check_modes() */
1026  int16 server_modecount; /* Number of server MODEs this second */
1027  int16 chanserv_modecount; /* Number of check_mode()'s this sec */
1028  int16 bouncy_modes; /* Did we fail to set modes here? */
1029  int16 topic_sync; /* Is the topic in sync? */
1030 };
1031 
1032 struct c_elist {
1035 };
1036 
1040  uint32 cidr_ip; /* IP mask for CIDR matching */
1041  uint32 cidr_mask; /* Netmask for CIDR matching */
1042  char *nick, *user, *host, *mask;
1043 };
1044 
1045 /*************************************************************************/
1046 
1047 /* Constants for news types. */
1048 
1049 #define NEWS_LOGON 0
1050 #define NEWS_OPER 1
1051 #define NEWS_RANDOM 2
1052 
1053 /*************************************************************************/
1054 
1055 /* Ignorance list data. */
1056 
1057 typedef struct ignore_data {
1058  struct ignore_data *prev, *next;
1059  char *mask;
1060  time_t time; /* When do we stop ignoring them? */
1061 } IgnoreData;
1062 
1063 /*************************************************************************/
1064 
1065 /* Mail data */
1066 
1067 struct mailinfo_ {
1068  FILE *pipe;
1069  /* Used only with mail forking */
1070  FILE *writepipe;
1071  FILE *readpipe;
1075 };
1076 
1077 /*************************************************************************/
1078 
1079 struct akill_ {
1080  char *user; /* User part of the AKILL */
1081  char *host; /* Host part of the AKILL */
1082 
1083  char *by; /* Who set the akill */
1084  char *reason; /* Why they got akilled */
1085 
1086  time_t seton; /* When it was set */
1087  time_t expires; /* When it expires */
1088 };
1089 
1090 /*************************************************************************/
1091 
1092 /* Structure for OperServ SGLINE and SZLINE commands */
1093 
1094 struct sxline_ {
1095  char *mask;
1096  char *by;
1097  char *reason;
1098  time_t seton;
1099  time_t expires;
1100 };
1101 
1102 
1103 /************************************************************************/
1104 
1105 /* Host serv structures */
1106 
1107 struct hostcore_ {
1109  char *nick; /* Owner of the vHost */
1110  char *vIdent; /* vIdent for the user */
1111  char *vHost; /* Vhost for this user */
1112  char *creator; /* Oper Nick of the oper who set the vhost */
1113  time_t time; /* Date/Time vHost was set */
1114 };
1115 
1116 /*************************************************************************/
1117 
1118 struct newsitem_ {
1120  uint32 num; /* Numbering is separate for login and oper news */
1121  char *text;
1122  char who[NICKMAX];
1123  time_t time;
1124 };
1125 
1126 /*************************************************************************/
1127 
1128 
1129 struct exception_ {
1130  char *mask; /* Hosts to which this exception applies */
1131  int limit; /* Session limit for exception */
1132  char who[NICKMAX]; /* Nick of person who added the exception */
1133  char *reason; /* Reason for exception's addition */
1134  time_t time; /* When this exception was added */
1135  time_t expires; /* Time when it expires. 0 == no expiry */
1136  int num; /* Position in exception list; used to track
1137  * positions when deleting entries. It is
1138  * symbolic and used internally. It is
1139  * calculated at load time and never saved. */
1140 };
1141 
1142 /*************************************************************************/
1143 
1144 struct session_ {
1146  char *host;
1147  int count; /* Number of clients with this host */
1148  int hits; /* Number of subsequent kills for a host */
1149 };
1150 
1151 /*************************************************************************/
1157 typedef struct ircd_proto_ {
1158  void (*ircd_set_mod_current_buffer)(int ac, char **av);
1159  void (*ircd_cmd_svsnoop)(char *server, int set);
1160  void (*ircd_cmd_remove_akill)(char *user, char *host);
1161  void (*ircd_cmd_topic)(char *whosets, char *chan, char *whosetit, char *topic, time_t when);
1162  void (*ircd_cmd_vhost_off)(User * u);
1163  void (*ircd_cmd_akill)(char *user, char *host, char *who, time_t when,time_t expires, char *reason);
1164  void (*ircd_cmd_svskill)(char *source, char *user, char *buf);
1165  void (*ircd_cmd_svsmode)(User * u, int ac, char **av);
1166  void (*ircd_cmd_372)(char *source, char *msg);
1167  void (*ircd_cmd_372_error)(char *source);
1168  void (*ircd_cmd_375)(char *source);
1169  void (*ircd_cmd_376)(char *source);
1170  void (*ircd_cmd_nick)(char *nick, char *name, char *modes);
1171  void (*ircd_cmd_guest_nick)(char *nick, char *user, char *host, char *real, char *modes);
1172  void (*ircd_cmd_mode)(char *source, char *dest, char *buf);
1173  void (*ircd_cmd_bot_nick)(char *nick, char *user, char *host, char *real, char *modes);
1174  void (*ircd_cmd_kick)(char *source, char *chan, char *user, char *buf);
1175  void (*ircd_cmd_notice_ops)(char *source, char *dest, char *buf);
1176  void (*ircd_cmd_notice)(char *source, char *dest, char *buf);
1177  void (*ircd_cmd_notice2)(char *source, char *dest, char *msg);
1178  void (*ircd_cmd_privmsg)(char *source, char *dest, char *buf);
1179  void (*ircd_cmd_privmsg2)(char *source, char *dest, char *msg);
1180  void (*ircd_cmd_serv_notice)(char *source, char *dest, char *msg);
1181  void (*ircd_cmd_serv_privmsg)(char *source, char *dest, char *msg);
1182  void (*ircd_cmd_bot_chan_mode)(char *nick, char *chan);
1183  void (*ircd_cmd_351)(char *source);
1184  void (*ircd_cmd_quit)(char *source, char *buf);
1185  void (*ircd_cmd_pong)(char *servname, char *who);
1186  void (*ircd_cmd_join)(char *user, char *channel, time_t chantime);
1187  void (*ircd_cmd_unsqline)(char *user);
1188  void (*ircd_cmd_invite)(char *source, char *chan, char *nick);
1189  void (*ircd_cmd_part)(char *nick, char *chan, char *buf);
1190  void (*ircd_cmd_391)(char *source, char *timestr);
1191  void (*ircd_cmd_250)(char *buf);
1192  void (*ircd_cmd_307)(char *buf);
1193  void (*ircd_cmd_311)(char *buf);
1194  void (*ircd_cmd_312)(char *buf);
1195  void (*ircd_cmd_317)(char *buf);
1196  void (*ircd_cmd_219)(char *source, char *letter);
1197  void (*ircd_cmd_401)(char *source, char *who);
1198  void (*ircd_cmd_318)(char *source, char *who);
1199  void (*ircd_cmd_242)(char *buf);
1200  void (*ircd_cmd_243)(char *buf);
1201  void (*ircd_cmd_211)(char *buf);
1202  void (*ircd_cmd_global)(char *source, char *buf);
1203  void (*ircd_cmd_global_legacy)(char *source, char *fmt);
1204  void (*ircd_cmd_sqline)(char *mask, char *reason);
1205  void (*ircd_cmd_squit)(char *servname, char *message);
1206  void (*ircd_cmd_svso)(char *source, char *nick, char *flag);
1207  void (*ircd_cmd_chg_nick)(char *oldnick, char *newnick);
1208  void (*ircd_cmd_svsnick)(char *source, char *guest, time_t when);
1209  void (*ircd_cmd_vhost_on)(char *nick, char *vIdent, char *vhost);
1211  void (*ircd_cmd_bob)();
1212  void (*ircd_cmd_svshold)(char *nick);
1213  void (*ircd_cmd_release_svshold)(char *nick);
1214  void (*ircd_cmd_unsgline)(char *mask);
1215  void (*ircd_cmd_unszline)(char *mask);
1216  void (*ircd_cmd_szline)(char *mask, char *reason, char *whom);
1217  void (*ircd_cmd_sgline)(char *mask, char *reason);
1218  void (*ircd_cmd_unban)(char *name, char *nick);
1219  void (*ircd_cmd_svsmode_chan)(char *name, char *mode, char *nick);
1220  void (*ircd_cmd_svid_umode)(char *nick, time_t ts);
1221  void (*ircd_cmd_nc_change)(User * u);
1222  void (*ircd_cmd_svid_umode2)(User * u, char *ts);
1223  void (*ircd_cmd_svid_umode3)(User * u, char *ts);
1224  void (*ircd_cmd_ctcp)(char *source, char *dest, char *buf);
1225  void (*ircd_cmd_svsjoin)(char *source, char *nick, char *chan, char *param);
1226  void (*ircd_cmd_svspart)(char *source, char *nick, char *chan);
1227  void (*ircd_cmd_swhois)(char *source, char *who, char *mask);
1228  void (*ircd_cmd_eob)();
1229  void (*ircd_cmd_jupe)(char *jserver, char *who, char *reason);
1230  void (*ircd_set_umode)(User *user, int ac, char **av);
1231  int (*ircd_valid_nick)(char *nick);
1232  int (*ircd_valid_chan)(char *chan);
1233  int (*ircd_flood_mode_check)(char *value);
1234  int (*ircd_jointhrottle_mode_check)(char *value);
1235 } IRCDProto;
1236 
1237 typedef struct ircd_modes_ {
1246 } IRCDModes;
1247 
1248 
1249 
1250 /*************************************************************************/
1254 #define DEFCON_NO_NEW_CHANNELS 1 /* No New Channel Registrations */
1255 #define DEFCON_NO_NEW_NICKS 2 /* No New Nick Registrations */
1256 #define DEFCON_NO_MLOCK_CHANGE 4 /* No MLOCK changes */
1257 #define DEFCON_FORCE_CHAN_MODES 8 /* Force Chan Mode */
1258 #define DEFCON_REDUCE_SESSION 16 /* Reduce Session Limit */
1259 #define DEFCON_NO_NEW_CLIENTS 32 /* Kill any NEW clients */
1260 #define DEFCON_OPER_ONLY 64 /* Restrict services to oper's only */
1261 #define DEFCON_SILENT_OPER_ONLY 128 /* Silently ignore non-opers */
1262 #define DEFCON_AKILL_NEW_CLIENTS 256 /* AKILL any new clients */
1263 #define DEFCON_NO_NEW_MEMOS 512 /* No New Memos Sent */
1264 
1265 /*************************************************************************/
1266 
1267 /* Memo Flags */
1268 #define MF_UNREAD 0x0001 /* Memo has not yet been read */
1269 #define MF_RECEIPT 0x0002 /* Sender requested receipt */
1270 #define MF_NOTIFYS 0x0004 /* Memo is a notification of receitp */
1271 
1272 /* Nickname status flags: */
1273 #define NS_VERBOTEN 0x0002 /* Nick may not be registered or used */
1274 #define NS_NO_EXPIRE 0x0004 /* Nick never expires */
1275 #define NS_IDENTIFIED 0x8000 /* User has IDENTIFY'd */
1276 #define NS_RECOGNIZED 0x4000 /* ON_ACCESS true && SECURE flag not set */
1277 #define NS_ON_ACCESS 0x2000 /* User comes from a known address */
1278 #define NS_KILL_HELD 0x1000 /* Nick is being held after a kill */
1279 #define NS_GUESTED 0x0100 /* SVSNICK has been sent but nick has not
1280  * yet changed. An enforcer will be
1281  * introduced when it does change. */
1282 #define NS_MASTER 0x0200 /* Was a master nick; used to import old databases */
1283 #define NS_TRANSGROUP 0xC000 /* Status flags that can be passed to a nick of the
1284  same group during nick change */
1285 #define NS_TEMPORARY 0xFF00 /* All temporary status flags */
1286 /* These two are not used anymore */
1287 #define NS_OLD_ENCRYPTEDPW 0x0001 /* Nickname password is encrypted */
1288 
1289 /* Nickname setting flags: */
1290 #define NI_KILLPROTECT 0x00000001 /* Kill others who take this nick */
1291 #define NI_SECURE 0x00000002 /* Don't recognize unless IDENTIFY'd */
1292 #define NI_MSG 0x00000004 /* Use PRIVMSGs instead of NOTICEs */
1293 #define NI_MEMO_HARDMAX 0x00000008 /* Don't allow user to change memo limit */
1294 #define NI_MEMO_SIGNON 0x00000010 /* Notify of memos at signon and un-away */
1295 #define NI_MEMO_RECEIVE 0x00000020 /* Notify of new memos when sent */
1296 #define NI_PRIVATE 0x00000040 /* Don't show in LIST to non-servadmins */
1297 #define NI_HIDE_EMAIL 0x00000080 /* Don't show E-mail in INFO */
1298 #define NI_HIDE_MASK 0x00000100 /* Don't show last seen address in INFO */
1299 #define NI_HIDE_QUIT 0x00000200 /* Don't show last quit message in INFO */
1300 #define NI_KILL_QUICK 0x00000400 /* Kill in 20 seconds instead of 60 */
1301 #define NI_KILL_IMMED 0x00000800 /* Kill immediately instead of in 60 sec */
1302 #define NI_SERVICES_OPER 0x00001000 /* User is a Services operator */
1303 #define NI_SERVICES_ADMIN 0x00002000 /* User is a Services admin */
1304 #define NI_ENCRYPTEDPW 0x00004000 /* Nickname password is encrypted */
1305 #define NI_SERVICES_ROOT 0x00008000 /* User is a Services root */
1306 #define NI_MEMO_MAIL 0x00010000 /* User gets email on memo */
1307 #define NI_HIDE_STATUS 0x00020000 /* Don't show services access status */
1308 #define NI_SUSPENDED 0x00040000 /* Nickname is suspended */
1309 #define NI_AUTOOP 0x00080000 /* Autoop nickname in channels */
1310 /* Languages. Never insert anything in the middle of this list, or
1311  * everybody will start getting the wrong language! If you want to change
1312  * the order the languages are displayed in for NickServ HELP SET LANGUAGE,
1313  * do it in language.c.
1314  */
1315 #define LANG_EN_US 0 /* United States English */
1316 #define LANG_JA_JIS 1 /* Japanese (JIS encoding) */
1317 #define LANG_JA_EUC 2 /* Japanese (EUC encoding) */
1318 #define LANG_JA_SJIS 3 /* Japanese (SJIS encoding) */
1319 #define LANG_ES 4 /* Spanish */
1320 #define LANG_PT 5 /* Portugese */
1321 #define LANG_FR 6 /* French */
1322 #define LANG_TR 7 /* Turkish */
1323 #define LANG_IT 8 /* Italian */
1324 #define LANG_DE 9 /* German */
1325 #define LANG_CAT 10 /* Catalan */
1326 #define LANG_GR 11 /* Greek */
1327 #define LANG_NL 12 /* Dutch */
1328 #define LANG_RU 13 /* Russian */
1329 #define LANG_HUN 14 /* Hungarian */
1330 #define LANG_PL 15 /* Polish */
1331 #define LANG_JA_UTF8 16 /* Japanese (UTF-8 encoding) */
1332 
1333 #define NUM_LANGS 17 /* Number of languages */
1334 #define USED_LANGS 14 /* Number of languages provided */
1335 
1336 
1337 #define DEF_LANGUAGE LANG_EN_US
1338 
1339 #define BI_PRIVATE 0x0001
1340 
1341 #define CUS_OP 0x0001
1342 #define CUS_VOICE 0x0002
1343 #define CUS_HALFOP 0x0004 /* Halfop (+h) */
1344 #define CUS_OWNER 0x0008 /* Owner/Founder (+q) */
1345 #define CUS_PROTECT 0x0010 /* Protected users (+a) */
1346 #define CUS_DEOPPED 0x0080 /* User has been specifically deopped */
1347 
1348 #define MUT_DEOP 0
1349 #define MUT_OP 1
1350 #define MUT_DEVOICE 2
1351 #define MUT_VOICE 3
1352 #define MUT_DEHALFOP 4
1353 #define MUT_HALFOP 5
1354 #define MUT_DEPROTECT 6
1355 #define MUT_PROTECT 7
1356 
1357 /*************************************************************************/
1358 /* CAPAB stuffs */
1359 
1360 typedef struct capabinfo_ CapabInfo;
1361 struct capabinfo_ {
1362  char *token;
1364 };
1365 
1366 #define CAPAB_NOQUIT 0x00000001
1367 #define CAPAB_TSMODE 0x00000002
1368 #define CAPAB_UNCONNECT 0x00000004
1369 #define CAPAB_NICKIP 0x00000008
1370 #define CAPAB_NSJOIN 0x00000010
1371 #define CAPAB_ZIP 0x00000020
1372 #define CAPAB_BURST 0x00000040
1373 #define CAPAB_TS3 0x00000080
1374 #define CAPAB_TS5 0x00000100
1375 #define CAPAB_DKEY 0x00000200
1376 #define CAPAB_DOZIP 0x00000400
1377 #define CAPAB_DODKEY 0x00000800
1378 #define CAPAB_QS 0x00001000
1379 #define CAPAB_SCS 0x00002000
1380 #define CAPAB_PT4 0x00004000
1381 #define CAPAB_UID 0x00008000
1382 #define CAPAB_KNOCK 0x00010000
1383 #define CAPAB_CLIENT 0x00020000
1384 #define CAPAB_IPV6 0x00040000
1385 #define CAPAB_SSJ5 0x00080000
1386 #define CAPAB_SN2 0x00100000
1387 #define CAPAB_VHOST 0x00200000
1388 #define CAPAB_TOKEN 0x00400000
1389 #define CAPAB_SSJ3 0x00800000
1390 #define CAPAB_NICK2 0x01000000
1391 #define CAPAB_UMODE2 0x02000000
1392 #define CAPAB_VL 0x04000000
1393 #define CAPAB_TLKEXT 0x08000000
1394 #define CAPAB_CHANMODE 0x10000000
1395 #define CAPAB_SJB64 0x20000000
1396 #define CAPAB_NICKCHARS 0x40000000
1397 
1398 /*************************************************************************/
1399 
1407 #define isvalidnick(c) ( isalnum(c) || ((c) >='\x5B' && (c) <='\x60') || ((c) >='\x7B' && (c) <='\x7D') || (c)=='-' )
1408 
1409 /*************************************************************************/
1410 
1411 #include "extern.h"
1412 
1413 /*************************************************************************/
1414 
1415 #endif /* SERVICES_H */
int sjoininvchar
Definition: services.h:362
char * url
Definition: services.h:660
void(* ircd_cmd_global)(char *source, char *buf)
Definition: services.h:1202
EList * invites
Definition: services.h:1014
time_t time
Definition: services.h:1113
ModuleData * moduleData
Definition: services.h:695
uint32 qs
Definition: services.h:392
int svsmode_unban
Definition: services.h:327
void(* ircd_cmd_svshold)(char *nick)
Definition: services.h:1212
ModuleData * next
Definition: services.h:482
int(* is_valid)(User *user, Channel *chan, int servermode)
Definition: services.h:951
uint32 sn2
Definition: services.h:398
void(* ircd_cmd_sgline)(char *mask, char *reason)
Definition: services.h:1217
int hits
Definition: services.h:1148
int chan_private
Definition: services.h:1242
NickCore * prev
Definition: services.h:540
char * email
Definition: services.h:519
Uid * next
Definition: services.h:417
void(* ircd_set_mod_current_buffer)(int ac, char **av)
Definition: services.h:1158
int16 times
Definition: services.h:985
char * throttle
Definition: services.h:1011
int16 usercount
Definition: services.h:1020
void(* cssetvalue)(ChannelInfo *ci, char *value)
Definition: services.h:925
uint16 akickcount
Definition: services.h:678
struct c_userlist * prev
Definition: services.h:1016
char * chanmodes
Definition: services.h:355
char sender[NICKMAX]
Definition: services.h:494
char * nickchars
Definition: services.h:369
int nickip
Definition: services.h:340
uint32 vhostmode
Definition: services.h:348
void(* ircd_cmd_svsnick)(char *source, char *guest, time_t when)
Definition: services.h:1208
char ** access
Definition: services.h:551
NickRequest * prev
Definition: services.h:515
void(* ircd_cmd_svsmode_chan)(char *name, char *mode, char *nick)
Definition: services.h:1219
char nick[NICKMAX]
Definition: services.h:875
uint32 flag
Definition: services.h:920
uint32 botflags
Definition: services.h:700
char * ownerset
Definition: services.h:303
char * url
Definition: services.h:547
uint32 ipv6
Definition: services.h:396
int Lmode
Definition: services.h:350
char * adminmodeonid
Definition: services.h:309
void(* ircd_cmd_unsgline)(char *mask)
Definition: services.h:1214
time_t expires
Definition: services.h:1099
char * by
Definition: services.h:1096
struct u_chanlist * next
Definition: services.h:899
int16 flags
Definition: services.h:949
char * word
Definition: services.h:642
int16 capspercent
Definition: services.h:705
void(* ircd_cmd_svspart)(char *source, char *nick, char *chan)
Definition: services.h:1226
struct user_::u_chaninfolist * founder_chans
uint32 ts3
Definition: services.h:388
int max_symbols
Definition: services.h:297
char * mask
Definition: services.h:1095
uint32 knock
Definition: services.h:394
char * passcode
Definition: services.h:517
uint16 type
Definition: services.h:643
char * mlock_redirect
Definition: services.h:685
struct csmode_ CSMode
Definition: services.h:242
int supporthelper
Definition: services.h:367
time_t time
Definition: services.h:1134
uint32 flag
Definition: services.h:934
time_t last_used
Definition: services.h:664
struct ignore_data * prev
Definition: services.h:1058
void(* ircd_cmd_sqline)(char *mask, char *reason)
Definition: services.h:1204
void(* ircd_cmd_nc_change)(User *u)
Definition: services.h:1221
int sglineenforce
Definition: services.h:364
Entry * next
Definition: services.h:1038
char * host
Definition: services.h:1081
void(* ircd_cmd_ctcp)(char *source, char *dest, char *buf)
Definition: services.h:1224
char * last_quit
Definition: services.h:527
int chan_limit
Definition: services.h:1244
Channel * chan
Definition: services.h:900
int levelself
Definition: services.h:831
char * vhost
Definition: services.h:880
char * mlock_flood
Definition: services.h:684
ChannelInfo * prev
Definition: services.h:653
void(* ircd_cmd_391)(char *source, char *timestr)
Definition: services.h:1190
uint32 num
Definition: services.h:1120
uint32 regmode
Definition: services.h:336
int numservargs
Definition: services.h:317
void(* ircd_cmd_svid_umode)(char *nick, time_t ts)
Definition: services.h:1220
void(* ircd_cmd_unszline)(char *mask)
Definition: services.h:1215
void(* ircd_cmd_311)(char *buf)
Definition: services.h:1193
uint32 burst
Definition: services.h:386
char * opermodeonid
Definition: services.h:310
uint32 client
Definition: services.h:395
int vhost
Definition: services.h:301
char founderpass[PASSMAX]
Definition: services.h:658
void(* ircd_cmd_bot_chan_mode)(char *nick, char *chan)
Definition: services.h:1182
int16 in_use
Definition: services.h:621
uint32 vhost
Definition: services.h:400
void(* ircd_cmd_376)(char *source)
Definition: services.h:1169
char * hostservmode
Definition: services.h:281
uint32 unconnect
Definition: services.h:382
void * ptr
Definition: services.h:435
void(* ircd_cmd_mode)(char *source, char *dest, char *buf)
Definition: services.h:1172
void(* ircd_cmd_kick)(char *source, char *chan, char *user, char *buf)
Definition: services.h:1174
char * chost
Definition: services.h:881
char * redirect
Definition: services.h:1009
char * name
Definition: services.h:277
int check_nick_id
Definition: services.h:353
uint32 nsjoin
Definition: services.h:384
int16 level
Definition: services.h:594
int32 count
Definition: services.h:1034
time_t expires
Definition: services.h:1087
char * user
Definition: services.h:1042
ModuleData * moduleData
Definition: services.h:557
void(* ircd_cmd_401)(char *source, char *who)
Definition: services.h:1197
char * reason
Definition: services.h:1084
char who[NICKMAX]
Definition: services.h:1122
uint16 flags
Definition: services.h:921
NickAlias * next
Definition: services.h:525
int16 chancount
Definition: services.h:579
Channel * next
Definition: services.h:999
uint16 language
Definition: services.h:549
uint32 svid
Definition: services.h:888
char * memoservaliasmode
Definition: services.h:289
char topic_setter[NICKMAX]
Definition: services.h:1004
char * lastline
Definition: services.h:984
uint32 noquit
Definition: services.h:380
int sjb64
Definition: services.h:358
void(* ircd_cmd_squit)(char *servname, char *message)
Definition: services.h:1205
int sjoinexchar
Definition: services.h:361
char password[PASSMAX]
Definition: services.h:518
char * host
Definition: services.h:878
uint32 dodkey
Definition: services.h:406
char * modeonreg
Definition: services.h:307
time_t chanserv_modetime
Definition: services.h:1025
uint32 dozip
Definition: services.h:407
User * prev
Definition: services.h:873
char * mode
Definition: services.h:828
uint32 dkey
Definition: services.h:389
Session * next
Definition: services.h:1145
int vident
Definition: services.h:337
void(* ircd_cmd_375)(char *source)
Definition: services.h:1168
int szline
Definition: services.h:315
struct user_::u_chanlist * chans
char mode
Definition: services.h:933
uint16 accesscount
Definition: services.h:550
void(* ircd_cmd_unsqline)(char *user)
Definition: services.h:1187
MemoInfo memos
Definition: services.h:552
FILE * readpipe
Definition: services.h:1071
void(* ircd_cmd_bot_nick)(char *nick, char *user, char *host, char *real, char *modes)
Definition: services.h:1173
void(* ircd_cmd_remove_akill)(char *user, char *host)
Definition: services.h:1160
int isSuperAdmin
Definition: services.h:896
char * uid
Definition: services.h:419
SyncState
Definition: services.h:845
int chan_secret
Definition: services.h:1241
char * botservmode
Definition: services.h:283
Server * links
Definition: services.h:861
void(* ircd_cmd_swhois)(char *source, char *who, char *mask)
Definition: services.h:1227
time_t time
Definition: services.h:1060
char * devnullmode
Definition: services.h:285
char * nickservmode
Definition: services.h:278
#define MAXPARAMS
Definition: services.h:426
int16 ttb[TTB_SIZE]
Definition: services.h:969
ChannelInfo * ci
Definition: services.h:1001
time_t last_start
Definition: services.h:981
char name[CHANMAX]
Definition: services.h:654
char * modestoremove
Definition: services.h:298
int except
Definition: services.h:320
void(* ircd_cmd_eob)()
Definition: services.h:1228
uint32 uid
Definition: services.h:393
void(* ircd_cmd_svsjoin)(char *source, char *nick, char *chan, char *param)
Definition: services.h:1225
char * user
Definition: services.h:1080
char * desc
Definition: services.h:856
time_t last_topic_time
Definition: services.h:667
NickRequest * recip
Definition: services.h:1074
char last_topic_setter[NICKMAX]
Definition: services.h:666
char * host
Definition: services.h:1146
char * forbidreason
Definition: services.h:671
char * last_topic
Definition: services.h:665
struct ignore_data * next
Definition: services.h:1058
char * botchanumode
Definition: services.h:299
char * ownerunset
Definition: services.h:304
uint32 flag
Definition: services.h:1363
time_t expires
Definition: services.h:1135
void(* ircd_cmd_szline)(char *mask, char *reason, char *whom)
Definition: services.h:1216
int16 bouncy_modes
Definition: services.h:1028
time_t requested
Definition: services.h:520
NickCore * nc
Definition: services.h:533
char * mask
Definition: services.h:1130
ModuleData * moduleData
Definition: services.h:535
int16 bantype
Definition: services.h:673
int umode
Definition: services.h:342
char * email
Definition: services.h:661
uint32 notused
Definition: services.h:500
int chan_perm
Definition: services.h:1245
int16 topic_sync
Definition: services.h:1029
time_t last_seen
Definition: services.h:596
char * mlock_throttle
Definition: services.h:686
NickRequest * next
Definition: services.h:515
char * display
Definition: services.h:542
int cidrchanbei
Definition: services.h:371
uint32 scs
Definition: services.h:391
uint16 flags
Definition: services.h:492
char * name
Definition: services.h:836
char * uid
Definition: services.h:890
short invalid_pw_count
Definition: services.h:909
char * value
Definition: services.h:481
char * hostip
Definition: services.h:879
int knock_needs_i
Definition: services.h:354
time_t server_modetime
Definition: services.h:1024
time_t my_signon
Definition: services.h:887
Server * next
Definition: services.h:852
BadWord * badwords
Definition: services.h:704
time_t seton
Definition: services.h:1098
struct ircd_proto_ IRCDProto
uint32 adminmode
Definition: services.h:346
uint32 sjb64
Definition: services.h:409
uint32 defmlock
Definition: services.h:347
uint32 flags
Definition: services.h:669
void(* addmask)(Channel *chan, char *mask)
Definition: services.h:943
char * entry_message
Definition: services.h:688
SyncState sync
Definition: services.h:859
void(* ircd_cmd_topic)(char *whosets, char *chan, char *whosetit, char *topic, time_t when)
Definition: services.h:1161
ModuleData * moduleData
Definition: services.h:496
int invitemode
Definition: services.h:359
int16 memomax
Definition: services.h:505
void(* ircd_cmd_join)(char *user, char *channel, time_t chantime)
Definition: services.h:1186
char * text
Definition: services.h:495
int user_invis
Definition: services.h:1238
FILE * pipe
Definition: services.h:1068
int quitonkill
Definition: services.h:326
char * host
Definition: services.h:1042
EList * excepts
Definition: services.h:1013
char * botserv_bot_mode
Definition: services.h:296
int nickvhost
Definition: services.h:343
void(* ircd_cmd_notice2)(char *source, char *dest, char *msg)
Definition: services.h:1177
Definition: services.h:1037
int16 flags
Definition: services.h:577
struct u_chaninfolist * next
Definition: services.h:905
char * key
Definition: services.h:1008
void(* ircd_cmd_serv_privmsg)(char *source, char *dest, char *msg)
Definition: services.h:1181
#define PASSMAX
Definition: config.h:65
uint32 mode
Definition: services.h:1006
uint16 bwcount
Definition: services.h:703
NickCore * next
Definition: services.h:540
void(* ircd_cmd_global_legacy)(char *source, char *fmt)
Definition: services.h:1203
char * name
Definition: services.h:826
uint32 noknock
Definition: services.h:345
uint32 protectedumode
Definition: services.h:323
int32_t int32
Definition: db-merger.c:122
uint16 status
Definition: services.h:532
time_t creation_time
Definition: services.h:1002
uint16 flags
Definition: services.h:935
void(* ircd_cmd_notice_ops)(char *source, char *dest, char *buf)
Definition: services.h:1175
void(* ircd_cmd_307)(char *buf)
Definition: services.h:1192
void(* setvalue)(Channel *chan, char *value)
Definition: services.h:924
char * reason
Definition: services.h:628
uint16 channelcount
Definition: services.h:553
uint16 accesscount
Definition: services.h:676
uint32 type
Definition: services.h:1039
HostCore * next
Definition: services.h:1108
struct ircd_modes_ IRCDModes
void(* ircd_cmd_243)(char *buf)
Definition: services.h:1200
BotInfo * prev
Definition: services.h:571
int what
Definition: services.h:835
void(* ircd_cmd_211)(char *buf)
Definition: services.h:1201
ChannelInfo * chan
Definition: services.h:906
char * token
Definition: services.h:1362
time_t lastmail
Definition: services.h:558
struct channel_ * c
Definition: services.h:692
int p10
Definition: services.h:368
time_t lastmail
Definition: services.h:914
char * nick
Definition: services.h:1042
int sjoinbanchar
Definition: services.h:360
uint32 mlock_off
Definition: services.h:681
int svsmode_ucmode
Definition: services.h:363
char * name
Definition: services.h:854
int chansqline
Definition: services.h:325
char * reason
Definition: services.h:1133
int svsnick
Definition: services.h:300
uint16 flags
Definition: services.h:857
int protect
Definition: services.h:333
uint32 nickip
Definition: services.h:383
boolean
Definition: services.h:255
User * next
Definition: services.h:873
char * real
Definition: services.h:576
Server * prev
Definition: services.h:852
Server * server
Definition: services.h:884
char * by
Definition: services.h:1083
u_int32_t uint32
Definition: db-merger.c:123
char * mask
Definition: services.h:1059
char * moduleName
Definition: services.h:479
char * nickservaliasmode
Definition: services.h:287
void(* ircd_cmd_372_error)(char *source)
Definition: services.h:1167
NickCore * nc
Definition: services.h:626
time_t time
Definition: services.h:1123
uint32 nickchars
Definition: services.h:410
int sqline
Definition: services.h:314
uint32 chan_jmode
Definition: services.h:375
E int servernum
Definition: extern.h:615
Uid * prev
Definition: services.h:417
int delay_cl_intro
Definition: services.h:376
time_t lastmsg
Definition: services.h:581
int svshold
Definition: services.h:338
uint32 number
Definition: services.h:491
void(* ircd_cmd_svid_umode2)(User *u, char *ts)
Definition: services.h:1222
char * chanservaliasmode
Definition: services.h:288
void(* ircd_cmd_notice)(char *source, char *dest, char *buf)
Definition: services.h:1176
int token
Definition: services.h:356
uint32 token
Definition: services.h:399
char * helpservmode
Definition: services.h:284
NickCore * nc
Definition: services.h:595
void(* delmask)(Channel *chan, char *mask)
Definition: services.h:944
int topictsforward
Definition: services.h:321
uint32 mlock_limit
Definition: services.h:682
int16_t int16
Definition: db-merger.c:120
time_t time_registered
Definition: services.h:530
uint32 cidr_ip
Definition: services.h:1040
void(* ircd_cmd_351)(char *source)
Definition: services.h:1183
char * adminset
Definition: services.h:305
Session * prev
Definition: services.h:1145
void(* ircd_cmd_312)(char *buf)
Definition: services.h:1194
#define CHANMAX
Definition: config.h:56
void(* ircd_cmd_372)(char *source, char *msg)
Definition: services.h:1166
char nick[NICKMAX]
Definition: services.h:418
char * vHost
Definition: services.h:1111
int join2msg
Definition: services.h:319
User * sender
Definition: services.h:1072
char * mask
Definition: services.h:625
void(* ircd_cmd_219)(char *source, char *letter)
Definition: services.h:1196
int topictsbackward
Definition: services.h:322
char * adminunset
Definition: services.h:306
int omode
Definition: services.h:341
int sync
Definition: services.h:370
uint16 hops
Definition: services.h:855
int16 lines
Definition: services.h:980
char * memoservmode
Definition: services.h:280
int16 floodlines
Definition: services.h:706
struct c_userlist * next
Definition: services.h:1016
int tokencaseless
Definition: services.h:357
char who[NICKMAX]
Definition: services.h:1132
char * mask
Definition: services.h:965
int16 chanserv_modecount
Definition: services.h:1027
char * nick
Definition: services.h:526
char * username
Definition: services.h:877
struct u_chanlist * prev
Definition: services.h:899
int chgreal
Definition: services.h:344
int(* ircd_valid_nick)(char *nick)
Definition: services.h:1231
char * topic
Definition: services.h:1003
uint16 channelmax
Definition: services.h:554
void(* ircd_cmd_svskill)(char *source, char *user, char *buf)
Definition: services.h:1164
BanData * bd
Definition: services.h:1022
time_t created
Definition: services.h:578
char * last_realname
Definition: services.h:528
void(* ircd_cmd_svid_umode3)(User *u, char *ts)
Definition: services.h:1223
BanData * prev
Definition: services.h:963
char * vident
Definition: services.h:882
void(* ircd_cmd_part)(char *nick, char *chan, char *buf)
Definition: services.h:1189
Server * uplink
Definition: services.h:862
char * vIdent
Definition: services.h:1110
EList * bans
Definition: services.h:1012
void(* ircd_cmd_svso)(char *source, char *nick, char *flag)
Definition: services.h:1206
BanData * next
Definition: services.h:963
Definition: slist.h:20
struct ignore_data IgnoreData
void(* ircd_cmd_vhost_on)(char *nick, char *vIdent, char *vhost)
Definition: services.h:1209
int tsonmode
Definition: services.h:339
void(* ircd_cmd_317)(char *buf)
Definition: services.h:1195
char * host
Definition: services.h:575
char * operservmode
Definition: services.h:282
time_t invalid_pw_time
Definition: services.h:910
int reversekickcheck
Definition: services.h:334
#define NICKMAX
Definition: config.h:62
BotInfo * next
Definition: services.h:571
char * flood
Definition: services.h:1010
uint32 chan_fmode
Definition: services.h:351
int chan_key
Definition: services.h:1243
int16 is_nick
Definition: services.h:622
char * mlock_key
Definition: services.h:683
time_t topic_time
Definition: services.h:1005
char pass[PASSMAX]
Definition: services.h:543
void(* ircd_cmd_318)(char *source, char *who)
Definition: services.h:1198
time_t seton
Definition: services.h:1086
char * modeonnick
Definition: services.h:312
void(* ircd_cmd_svsmode)(User *u, int ac, char **av)
Definition: services.h:1165
time_t lastmail
Definition: services.h:521
void(* ircd_cmd_svsnoop)(char *server, int set)
Definition: services.h:1159
char * text
Definition: services.h:1121
int count
Definition: services.h:1147
int join2set
Definition: services.h:318
time_t lastnickreg
Definition: services.h:913
MemoInfo memos
Definition: services.h:690
void(* ircd_cmd_guest_nick)(char *nick, char *user, char *host, char *real, char *modes)
Definition: services.h:1171
uint32 umode2
Definition: services.h:403
uint32 pt4
Definition: services.h:390
int16 floodsecs
Definition: services.h:706
uint32 tsmode
Definition: services.h:381
int jmode
Definition: services.h:374
Entry * entries
Definition: services.h:1033
SList aliases
Definition: services.h:559
uint32 ssj5
Definition: services.h:397
int16 * ttb
Definition: services.h:701
uint32 vl
Definition: services.h:404
char * nick
Definition: services.h:573
int admin
Definition: services.h:324
#define TTB_SIZE
Definition: services.h:819
time_t time_registered
Definition: services.h:663
void(* ircd_cmd_250)(char *buf)
Definition: services.h:1191
void(* ircd_set_umode)(User *user, int ac, char **av)
Definition: services.h:1230
char name[CHANMAX]
Definition: services.h:1000
char * name
Definition: services.h:431
void(* ircd_cmd_serv_notice)(char *source, char *dest, char *msg)
Definition: services.h:1180
time_t addtime
Definition: services.h:631
int32 notice
Definition: services.h:829
int type
Definition: services.h:433
FILE * writepipe
Definition: services.h:1070
char * globalmode
Definition: services.h:286
void(* ircd_cmd_chg_nick)(char *oldnick, char *newnick)
Definition: services.h:1207
void(* ircd_cmd_privmsg)(char *source, char *dest, char *buf)
Definition: services.h:1178
AutoKick * akick
Definition: services.h:679
ModuleData * moduleData
Definition: services.h:894
Definition: services.h:416
int owner
Definition: services.h:302
void(* ircd_cmd_quit)(char *source, char *buf)
Definition: services.h:1184
uint32 nick2
Definition: services.h:402
uint32 ts5
Definition: services.h:387
void(* ircd_cmd_privmsg2)(char *source, char *dest, char *msg)
Definition: services.h:1179
uint32 flags
Definition: services.h:548
ChanAccess * access
Definition: services.h:677
int16 capsmin
Definition: services.h:705
uint32 mode
Definition: services.h:889
char * chanservmode
Definition: services.h:279
char * creator
Definition: services.h:630
char * devnullvaliasmode
Definition: services.h:294
uint16 in_use
Definition: services.h:641
int desc
Definition: services.h:837
int16 * levels
Definition: services.h:674
int(* ircd_flood_mode_check)(char *value)
Definition: services.h:1233
int ts6
Definition: services.h:366
char * suid
Definition: services.h:858
Channel * prev
Definition: services.h:999
NickAlias * prev
Definition: services.h:525
time_t time
Definition: services.h:493
int flags
Definition: services.h:434
uint16 flags
Definition: services.h:623
int16 repeattimes
Definition: services.h:707
time_t last_seen
Definition: services.h:531
char * greet
Definition: services.h:545
void(* ircd_cmd_242)(char *buf)
Definition: services.h:1199
char * desc
Definition: services.h:659
char * globalaliasmode
Definition: services.h:295
void(* ircd_cmd_vhost_off)(User *u)
Definition: services.h:1162
struct u_chaninfolist * prev
Definition: services.h:905
void(* ircd_cmd_pong)(char *servname, char *who)
Definition: services.h:1185
char * creator
Definition: services.h:1112
Memo * memos
Definition: services.h:506
int16 status
Definition: services.h:948
int chan_invite
Definition: services.h:1240
uint32 ssj3
Definition: services.h:401
char * helpservaliasmode
Definition: services.h:293
char * mask
Definition: services.h:1042
char * vhostchar
Definition: services.h:365
int sgline
Definition: services.h:313
char * operservaliasmode
Definition: services.h:291
User * u
Definition: services.h:536
char * nick
Definition: services.h:516
uint32 limit
Definition: services.h:1007
uint16 in_use
Definition: services.h:593
int(* ircd_valid_chan)(char *chan)
Definition: services.h:1232
void(* ircd_cmd_akill)(char *user, char *host, char *who, time_t when, time_t expires, char *reason)
Definition: services.h:1163
BotInfo * bi
Definition: services.h:699
void(* ircd_cmd_invite)(char *source, char *chan, char *nick)
Definition: services.h:1188
char * botservaliasmode
Definition: services.h:292
void(* ircd_cmd_unban)(char *name, char *nick)
Definition: services.h:1218
int halfop
Definition: services.h:316
void(* ircd_cmd_nick)(char *nick, char *name, char *modes)
Definition: services.h:1170
uint32 cidr_mask
Definition: services.h:1041
int chanreg
Definition: services.h:335
NickCore * founder
Definition: services.h:655
char * last_usermask
Definition: services.h:529
time_t last_use
Definition: services.h:977
time_t timestamp
Definition: services.h:886
NickCore * recipient
Definition: services.h:1073
char * key
Definition: services.h:480
char * reason
Definition: services.h:1097
uint16 type
Definition: services.h:1119
void(* ircd_cmd_connect)(int servernum)
Definition: services.h:1210
Entry * prev
Definition: services.h:1038
char * user
Definition: services.h:574
char * hostservaliasmode
Definition: services.h:290
char * modeonunreg
Definition: services.h:311
char * forbidby
Definition: services.h:670
ChannelInfo * next
Definition: services.h:653
uint32 icq
Definition: services.h:546
int(* ircd_jointhrottle_mode_check)(char *value)
Definition: services.h:1234
uint32 chan_lmode
Definition: services.h:352
char * rootmodeonid
Definition: services.h:308
time_t lastmemosend
Definition: services.h:912
int16 server_modecount
Definition: services.h:1026
char * bsname
Definition: services.h:827
char * nick
Definition: services.h:1109
char * nickTrack
Definition: services.h:885
uint32 chanmodes
Definition: services.h:408
int fmode
Definition: services.h:349
char * realname
Definition: services.h:883
void(* ircd_cmd_bob)()
Definition: services.h:1211
uint32 mlock_on
Definition: services.h:681
NickAlias * na
Definition: services.h:892
void(* ircd_cmd_jupe)(char *jserver, char *who, char *reason)
Definition: services.h:1229
uint32 tlkext
Definition: services.h:405
char * email
Definition: services.h:544
int user_oper
Definition: services.h:1239
NickCore * successor
Definition: services.h:656
struct channel_::c_userlist * users
void(* ircd_cmd_release_svshold)(char *nick)
Definition: services.h:1213
time_t last_use
Definition: services.h:967
u_int16_t uint16
Definition: db-merger.c:121
uint32 zip
Definition: services.h:385