services.h File Reference

#include "sysconf.h"
#include "config.h"
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <signal.h>
#include <time.h>
#include <errno.h>
#include <grp.h>
#include <limits.h>
#include <netdb.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/time.h>
#include <fcntl.h>
#include <dirent.h>
#include "sockets.h"
#include <ctype.h>
#include "defs.h"
#include "slist.h"
#include "events.h"
#include "extern.h"

Go to the source code of this file.

Data Structures

struct  akill_
struct  AutoKick
struct  badword_
struct  bandata_
struct  botinfo_
struct  capabinfo_
struct  cbmode_
struct  cbmodeinfo_
struct  ChanAccess
struct  chaninfo_
struct  channel_
struct  channel_::c_userlist
struct  cmmode_
struct  csmodeutil_
struct  cumode_
struct  Directive
struct  exception_
struct  hostcore_
struct  ignore_data
struct  ircd_modes_
struct  ircd_proto_
struct  ircdcapab_
struct  ircdvars_
struct  LevelInfo
struct  mailinfo_
struct  memo_
struct  MemoInfo
struct  ModuleData_
struct  newsitem_
struct  nickalias_
struct  nickcore_
struct  nickrequest_
struct  server_
struct  session_
struct  sxline_
struct  uid_
struct  user_
struct  user_::u_chaninfolist
struct  user_::u_chanlist
struct  userdata_

Defines

#define ACCESS_AOP   5
#define ACCESS_FOUNDER   10000
#define ACCESS_HOP   4
#define ACCESS_INVALID   -10000
#define ACCESS_SOP   10
#define ACCESS_SUPERADMIN   10001
#define ACCESS_VOP   3
#define AK_ISNICK   0x0002
#define AK_STUCK   0x0004
#define AK_USED   0x0001
#define BI_PRIVATE   0x0001
#define BOT_VERSION   10
#define BS_DONTKICKOPS   0x00000001
#define BS_DONTKICKVOICES   0x00000002
#define BS_FANTASY   0x00000004
#define BS_GREET   0x00000010
#define BS_KICK_BADWORDS   0x08000000
#define BS_KICK_BOLDS   0x80000000
#define BS_KICK_CAPS   0x04000000
#define BS_KICK_COLORS   0x40000000
#define BS_KICK_FLOOD   0x02000000
#define BS_KICK_REPEAT   0x01000000
#define BS_KICK_REVERSES   0x20000000
#define BS_KICK_UNDERLINES   0x10000000
#define BS_NOBOT   0x00000020
#define BS_SYMBIOSIS   0x00000008
#define BW_ANY   0
#define BW_END   3
#define BW_SINGLE   1
#define BW_START   2
#define CA_ACCESS_CHANGE   11
#define CA_ACCESS_LIST   8
#define CA_AKICK   1
#define CA_ASSIGN   13
#define CA_AUTODEOP   5
#define CA_AUTOHALFOP   22
#define CA_AUTOOP   4
#define CA_AUTOPROTECT   23
#define CA_AUTOVOICE   6
#define CA_BADWORDS   14
#define CA_BAN   33
#define CA_BANME   32
#define CA_CLEAR   9
#define CA_FANTASIA   16
#define CA_GETKEY   21
#define CA_GREET   18
#define CA_HALFOP   26
#define CA_HALFOPME   25
#define CA_INFO   35
#define CA_INVITE   0
#define CA_KICK   30
#define CA_KICKME   29
#define CA_MEMO   12
#define CA_NOJOIN   10
#define CA_NOKICK   15
#define CA_OPDEOP   7
#define CA_OPDEOPME   24
#define CA_PROTECT   28
#define CA_PROTECTME   27
#define CA_SAY   17
#define CA_SET   2
#define CA_SIGNKICK   31
#define CA_SIZE   36
#define CA_TOPIC   34
#define CA_UNBAN   3
#define CA_VOICE   20
#define CA_VOICEME   19
#define CAPAB_BURST   0x00000040
#define CAPAB_CHANMODE   0x10000000
#define CAPAB_CLIENT   0x00020000
#define CAPAB_DKEY   0x00000200
#define CAPAB_DODKEY   0x00000800
#define CAPAB_DOZIP   0x00000400
#define CAPAB_IPV6   0x00040000
#define CAPAB_KNOCK   0x00010000
#define CAPAB_NICK2   0x01000000
#define CAPAB_NICKCHARS   0x40000000
#define CAPAB_NICKIP   0x00000008
#define CAPAB_NOQUIT   0x00000001
#define CAPAB_NSJOIN   0x00000010
#define CAPAB_PT4   0x00004000
#define CAPAB_QS   0x00001000
#define CAPAB_SCS   0x00002000
#define CAPAB_SJB64   0x20000000
#define CAPAB_SN2   0x00100000
#define CAPAB_SSJ3   0x00800000
#define CAPAB_SSJ5   0x00080000
#define CAPAB_TLKEXT   0x08000000
#define CAPAB_TOKEN   0x00400000
#define CAPAB_TS3   0x00000080
#define CAPAB_TS5   0x00000100
#define CAPAB_TSMODE   0x00000002
#define CAPAB_UID   0x00008000
#define CAPAB_UMODE2   0x02000000
#define CAPAB_UNCONNECT   0x00000004
#define CAPAB_VHOST   0x00200000
#define CAPAB_VL   0x04000000
#define CAPAB_ZIP   0x00000020
#define CBM_MINUS_NO_ARG   0x0001
#define CBM_NO_MLOCK   0x0002
#define CBM_NO_USER_MLOCK   0x0004
#define CHAN_VERSION   16
#define CI_ENCRYPTEDPW   0x00000100
#define CI_INHABIT   0x80000000
#define CI_KEEPTOPIC   0x00000001
#define CI_MEMO_HARDMAX   0x00000400
#define CI_NO_EXPIRE   0x00000200
#define CI_OPNOTICE   0x00000800
#define CI_PEACE   0x00000020
#define CI_PRIVATE   0x00000004
#define CI_RESTRICTED   0x00000010
#define CI_SECURE   0x00000040
#define CI_SECUREFOUNDER   0x00001000
#define CI_SECUREOPS   0x00000002
#define CI_SIGNKICK   0x00002000
#define CI_SIGNKICK_LEVEL   0x00004000
#define CI_SUSPENDED   0x00010000
#define CI_TOPICLOCK   0x00000008
#define CI_VERBOTEN   0x00000080
#define CI_XOP   0x00008000
#define CUF_PROTECT_BOTSERV   0x0001
#define CUS_DEOPPED   0x0080
#define CUS_HALFOP   0x0004
#define CUS_OP   0x0001
#define CUS_OWNER   0x0008
#define CUS_PROTECT   0x0010
#define CUS_VOICE   0x0002
#define DEF_LANGUAGE   LANG_EN_US
#define DEFCON_AKILL_NEW_CLIENTS   256
#define DEFCON_FORCE_CHAN_MODES   8
#define DEFCON_NO_MLOCK_CHANGE   4
#define DEFCON_NO_NEW_CHANNELS   1
#define DEFCON_NO_NEW_CLIENTS   32
#define DEFCON_NO_NEW_MEMOS   512
#define DEFCON_NO_NEW_NICKS   2
#define DEFCON_OPER_ONLY   64
#define DEFCON_REDUCE_SESSION   16
#define DEFCON_SILENT_OPER_ONLY   128
#define encrypt   encrypt_
#define EXCEPTION_VERSION   9
#define HELP_VERSION   1
#define HOST_VERSION   3
#define isvalidnick(c)   ( isalnum(c) || ((c) >='\x5B' && (c) <='\x60') || ((c) >='\x7B' && (c) <='\x7D') || (c)=='-' )
#define LANG_CAT   10
#define LANG_DE   9
#define LANG_EN_US   0
#define LANG_ES   4
#define LANG_FR   6
#define LANG_GR   11
#define LANG_HUN   14
#define LANG_IT   8
#define LANG_JA_EUC   2
#define LANG_JA_JIS   1
#define LANG_JA_SJIS   3
#define LANG_NL   12
#define LANG_PL   15
#define LANG_PT   5
#define LANG_RU   13
#define LANG_TR   7
#define MAX_CMD_HASH   1024
#define MAXPARAMS   8
#define MF_NOTIFYS   0x0004
#define MF_RECEIPT   0x0002
#define MF_UNREAD   0x0001
#define MUT_DEHALFOP   4
#define MUT_DEOP   0
#define MUT_DEPROTECT   6
#define MUT_DEVOICE   2
#define MUT_HALFOP   5
#define MUT_OP   1
#define MUT_PROTECT   7
#define MUT_VOICE   3
#define NEWS_LOGON   0
#define NEWS_OPER   1
#define NEWS_RANDOM   2
#define NEWS_VERSION   9
#define NI_AUTOOP   0x00080000
#define NI_ENCRYPTEDPW   0x00004000
#define NI_HIDE_EMAIL   0x00000080
#define NI_HIDE_MASK   0x00000100
#define NI_HIDE_QUIT   0x00000200
#define NI_HIDE_STATUS   0x00020000
#define NI_KILL_IMMED   0x00000800
#define NI_KILL_QUICK   0x00000400
#define NI_KILLPROTECT   0x00000001
#define NI_MEMO_HARDMAX   0x00000008
#define NI_MEMO_MAIL   0x00010000
#define NI_MEMO_RECEIVE   0x00000020
#define NI_MEMO_SIGNON   0x00000010
#define NI_MSG   0x00000004
#define NI_PRIVATE   0x00000040
#define NI_SECURE   0x00000002
#define NI_SERVICES_ADMIN   0x00002000
#define NI_SERVICES_OPER   0x00001000
#define NI_SERVICES_ROOT   0x00008000
#define NI_SUSPENDED   0x00040000
#define NICK_VERSION   13
#define NS_GUESTED   0x0100
#define NS_IDENTIFIED   0x8000
#define NS_KILL_HELD   0x1000
#define NS_MASTER   0x0200
#define NS_NO_EXPIRE   0x0004
#define NS_OLD_ENCRYPTEDPW   0x0001
#define NS_ON_ACCESS   0x2000
#define NS_RECOGNIZED   0x4000
#define NS_TEMPORARY   0xFF00
#define NS_TRANSGROUP   0xC000
#define NS_VERBOTEN   0x0002
#define NUM_LANGS   16
#define OPER_VERSION   13
#define PARAM_DEPRECATED   -2
#define PARAM_FULLONLY   0x02
#define PARAM_INT   1
#define PARAM_NONE   0
#define PARAM_OPTIONAL   0x01
#define PARAM_PORT   3
#define PARAM_POSINT   2
#define PARAM_RELOAD   0x04
#define PARAM_SET   -1
#define PARAM_STRING   4
#define PARAM_STRING_ARRAY   6
#define PARAM_TIME   5
#define PRE_NICK_VERSION   1
#define SERVER_ISME   0x0001
#define SERVER_JUPED   0x0002
#define tolower   tolower_
#define toupper   toupper_
#define TTB_BADWORDS   4
#define TTB_BOLDS   0
#define TTB_CAPS   5
#define TTB_COLORS   1
#define TTB_FLOOD   6
#define TTB_REPEAT   7
#define TTB_REVERSES   2
#define TTB_SIZE   8
#define TTB_UNDERLINES   3
#define USED_LANGS   13
#define VA_COPY(DEST, SRC)   memcpy ((&DEST), (&SRC), sizeof(va_list))

Typedefs

typedef akill_ Akill
typedef badword_ BadWord
typedef bandata_ BanData
typedef botinfo_ BotInfo
typedef capabinfo_ CapabInfo
typedef cbmode_ CBMode
typedef cbmodeinfo_ CBModeInfo
typedef channel_ Channel
typedef chaninfo_ ChannelInfo
typedef cmmode_ CMMode
typedef csmode_ CSMode
typedef csmodeutil_ CSModeUtil
typedef cumode_ CUMode
typedef exception_ Exception
typedef hostcore_ HostCore
typedef ignore_data IgnoreData
typedef ircdcapab_ IRCDCAPAB
typedef ircd_modes_ IRCDModes
typedef ircd_proto_ IRCDProto
typedef ircdvars_ IRCDVar
typedef mailinfo_ MailInfo
typedef memo_ Memo
typedef ModuleData_ ModuleData
typedef newsitem_ NewsItem
typedef nickalias_ NickAlias
typedef nickcore_ NickCore
typedef nickrequest_ NickRequest
typedef server_ Server
typedef session_ Session
typedef sxline_ SXLine
typedef uid_ Uid
typedef user_ User
typedef userdata_ UserData

Enumerations

enum  boolean { false, true }
enum  SyncState { SSYNC_UNKNOWN = 0, SSYNC_IN_PROGRESS = 1, SSYNC_DONE = 2 }


Define Documentation

#define ACCESS_AOP   5

Definition at line 596 of file services.h.

Referenced by do_alist(), do_aop(), do_set_xop(), do_xop(), and get_xop_level().

#define ACCESS_FOUNDER   10000

Definition at line 584 of file services.h.

Referenced by check_access(), do_access(), do_alist(), do_drop(), do_levels(), do_set_password(), get_access(), get_access_level(), and get_xop_level().

#define ACCESS_HOP   4

Definition at line 595 of file services.h.

Referenced by do_alist(), do_hop(), do_set_xop(), and get_xop_level().

#define ACCESS_INVALID   -10000

Definition at line 585 of file services.h.

Referenced by check_access(), do_access(), do_alist(), do_levels(), and load_cs_dbase().

#define ACCESS_SOP   10

Definition at line 597 of file services.h.

Referenced by do_alist(), do_set_xop(), do_sop(), and get_xop_level().

#define ACCESS_SUPERADMIN   10001

Definition at line 590 of file services.h.

Referenced by get_access().

#define ACCESS_VOP   3

Definition at line 594 of file services.h.

Referenced by do_alist(), do_set_xop(), do_vop(), and get_xop_level().

#define AK_ISNICK   0x0002

Definition at line 615 of file services.h.

Referenced by akick_del(), akick_list(), akick_view(), check_kick(), do_akick(), get_chanserv_stats(), load_cs_dbase(), rdb_ns_set_display(), and save_cs_dbase().

#define AK_STUCK   0x0004

Definition at line 616 of file services.h.

Referenced by akick_view(), do_akick(), is_stuck(), and stick_all().

#define AK_USED   0x0001

Definition at line 614 of file services.h.

Referenced by akick_del(), akick_list(), akick_view(), check_kick(), do_akick(), is_stuck(), load_cs_dbase(), save_cs_dbase(), and stick_all().

#define BI_PRIVATE   0x0001

Definition at line 1288 of file services.h.

Referenced by do_assign(), do_botlist(), do_info(), and do_set().

#define BOT_VERSION   10

Definition at line 443 of file services.h.

Referenced by load_bs_dbase(), and save_bs_dbase().

#define BS_DONTKICKOPS   0x00000001

Definition at line 772 of file services.h.

Referenced by botchanmsgs(), do_info(), and do_set().

#define BS_DONTKICKVOICES   0x00000002

Definition at line 773 of file services.h.

Referenced by botchanmsgs(), do_info(), and do_set().

#define BS_FANTASY   0x00000004

Definition at line 774 of file services.h.

Referenced by botchanmsgs(), do_info(), and do_set().

#define BS_GREET   0x00000010

Definition at line 776 of file services.h.

Referenced by chan_adduser2(), do_info(), and do_set().

#define BS_KICK_BADWORDS   0x08000000

Definition at line 784 of file services.h.

Referenced by botchanmsgs(), do_info(), and do_kickcmd().

#define BS_KICK_BOLDS   0x80000000

Definition at line 780 of file services.h.

Referenced by botchanmsgs(), do_info(), and do_kickcmd().

#define BS_KICK_CAPS   0x04000000

Definition at line 785 of file services.h.

Referenced by botchanmsgs(), do_info(), and do_kickcmd().

#define BS_KICK_COLORS   0x40000000

Definition at line 781 of file services.h.

Referenced by botchanmsgs(), do_info(), and do_kickcmd().

#define BS_KICK_FLOOD   0x02000000

Definition at line 786 of file services.h.

Referenced by botchanmsgs(), do_info(), and do_kickcmd().

#define BS_KICK_REPEAT   0x01000000

Definition at line 787 of file services.h.

Referenced by botchanmsgs(), do_info(), and do_kickcmd().

#define BS_KICK_REVERSES   0x20000000

Definition at line 782 of file services.h.

Referenced by botchanmsgs(), do_info(), and do_kickcmd().

#define BS_KICK_UNDERLINES   0x10000000

Definition at line 783 of file services.h.

Referenced by botchanmsgs(), do_info(), and do_kickcmd().

#define BS_NOBOT   0x00000020

Definition at line 777 of file services.h.

Referenced by do_assign(), do_info(), and do_set().

#define BS_SYMBIOSIS   0x00000008

Definition at line 775 of file services.h.

Referenced by do_info(), and do_set().

#define BW_ANY   0

Definition at line 626 of file services.h.

Referenced by botchanmsgs(), and do_badwords().

#define BW_END   3

Definition at line 629 of file services.h.

Referenced by badwords_list(), botchanmsgs(), and do_badwords().

#define BW_SINGLE   1

Definition at line 627 of file services.h.

Referenced by badwords_list(), botchanmsgs(), and do_badwords().

#define BW_START   2

Definition at line 628 of file services.h.

Referenced by badwords_list(), botchanmsgs(), and do_badwords().

#define CA_ACCESS_CHANGE   11

Definition at line 739 of file services.h.

Referenced by do_access().

#define CA_ACCESS_LIST   8

Definition at line 736 of file services.h.

Referenced by do_access().

#define CA_AKICK   1

Definition at line 729 of file services.h.

Referenced by do_akick(), do_set_xop(), and my_cs_enforce().

#define CA_ASSIGN   13

Definition at line 741 of file services.h.

Referenced by do_assign(), and do_unassign().

#define CA_AUTODEOP   5

Definition at line 733 of file services.h.

Referenced by chan_set_correct_modes(), check_access(), check_valid_admin(), check_valid_op(), do_levels(), plexus_check_valid_halfop(), and plexus_check_valid_op().

#define CA_AUTOHALFOP   22

Definition at line 750 of file services.h.

Referenced by chan_set_correct_modes(), check_should_halfop(), check_valid_op(), do_set_xop(), plexus_check_valid_halfop(), and plexus_check_valid_op().

#define CA_AUTOOP   4

Definition at line 732 of file services.h.

Referenced by chan_set_correct_modes(), chan_set_user_status(), check_should_op(), check_valid_op(), do_levels(), do_set_xop(), and plexus_check_valid_op().

#define CA_AUTOPROTECT   23

Definition at line 751 of file services.h.

Referenced by chan_set_correct_modes(), check_should_protect(), check_valid_admin(), load_cs_dbase(), and updateProtectDetails().

#define CA_AUTOVOICE   6

Definition at line 734 of file services.h.

Referenced by chan_set_correct_modes(), check_should_voice(), do_levels(), and do_set_xop().

#define CA_BADWORDS   14

Definition at line 742 of file services.h.

Referenced by do_badwords().

#define CA_BAN   33

Definition at line 765 of file services.h.

Referenced by canBanUser(), do_ban(), and load_cs_dbase().

#define CA_BANME   32

Definition at line 764 of file services.h.

Referenced by do_ban(), and load_cs_dbase().

#define CA_CLEAR   9

Definition at line 737 of file services.h.

Referenced by do_clear().

#define CA_FANTASIA   16

Definition at line 744 of file services.h.

Referenced by botchanmsgs().

#define CA_GETKEY   21

Definition at line 749 of file services.h.

Referenced by do_getkey().

#define CA_GREET   18

Definition at line 746 of file services.h.

Referenced by chan_adduser2().

#define CA_HALFOP   26

Definition at line 754 of file services.h.

Referenced by do_set_xop().

#define CA_HALFOPME   25

Definition at line 753 of file services.h.

Referenced by chan_set_correct_modes(), and do_set_xop().

#define CA_INFO   35

Definition at line 767 of file services.h.

#define CA_INVITE   0

Definition at line 728 of file services.h.

Referenced by do_invite().

#define CA_KICK   30

Definition at line 758 of file services.h.

Referenced by do_cs_kick(), and load_cs_dbase().

#define CA_KICKME   29

Definition at line 757 of file services.h.

Referenced by do_cs_kick(), and load_cs_dbase().

#define CA_MEMO   12

Definition at line 740 of file services.h.

Referenced by chan_adduser2(), do_read(), do_set_limit(), and memo_send().

#define CA_NOJOIN   10

Definition at line 738 of file services.h.

Referenced by check_access(), check_kick(), do_enforce_restricted(), do_levels(), and do_set_restricted().

#define CA_NOKICK   15

Definition at line 743 of file services.h.

Referenced by botchanmsgs().

#define CA_OPDEOP   7

Definition at line 735 of file services.h.

Referenced by do_set_xop(), and load_cs_dbase().

#define CA_OPDEOPME   24

Definition at line 752 of file services.h.

Referenced by chan_set_correct_modes(), do_set_xop(), and load_cs_dbase().

#define CA_PROTECT   28

Definition at line 756 of file services.h.

Referenced by load_cs_dbase(), and updateProtectDetails().

#define CA_PROTECTME   27

Definition at line 755 of file services.h.

Referenced by chan_set_correct_modes(), load_cs_dbase(), and updateProtectDetails().

#define CA_SAY   17

Definition at line 745 of file services.h.

Referenced by do_act(), and do_say().

#define CA_SET   2

Definition at line 730 of file services.h.

Referenced by do_kickcmd(), do_set(), and do_set_xop().

#define CA_SIGNKICK   31

Definition at line 759 of file services.h.

Referenced by bot_raw_ban(), bot_raw_kick(), do_ban(), and do_cs_kick().

#define CA_SIZE   36

Definition at line 769 of file services.h.

Referenced by db_mysql_load_cs_dbase(), get_chanserv_stats(), load_cs_dbase(), reset_levels(), and save_cs_dbase().

#define CA_TOPIC   34

Definition at line 766 of file services.h.

Referenced by do_cs_topic(), load_cs_dbase(), and my_cs_appendtopic().

#define CA_UNBAN   3