1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
/* Prototypes and external variable declarations.
*
* (C) 2003-2012 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
#ifndef EXTERN_H
#define EXTERN_H
#include "modes.h"
#define E extern CoreExport
#define EI extern DllExport
/**** actions.c ****/
E bool bad_password(User *u);
E void common_unban(const ChannelInfo *ci, User *u, bool full = false);
/**** encrypt.c ****/
E void enc_encrypt(const Anope::string &src, Anope::string &dest);
E bool enc_decrypt(const Anope::string &src, Anope::string &dest);
/**** init.c ****/
E Anope::string conf_dir, db_dir, modules_dir, locale_dir, log_dir;
E void introduce_user(const Anope::string &user);
E bool GetCommandLineArgument(const Anope::string &name, char shortname = 0);
E bool GetCommandLineArgument(const Anope::string &name, char shortname, Anope::string ¶m);
E bool AtTerm();
E void Fork();
E void Init(int ac, char **av);
/**** language.cpp ****/
E std::vector<Anope::string> languages;
E std::vector<Anope::string> domains;
E void InitLanguages();
E const char *translate(const char *string);
E const char *translate(User *u, const char *string);
E const char *translate(const NickCore *nc, const char *string);
E const char *anope_gettext(const char *lang, const char *string);
/**** main.c ****/
E Anope::string services_dir;
E Anope::string services_bin;
E int debug;
E bool readonly;
E bool nofork;
E bool nothird;
E bool noexpire;
E bool protocoldebug;
E bool quitting;
E int return_code;
E bool restarting;
E Anope::string quitmsg;
E time_t start_time;
E int CurrentUplink;
E void save_databases();
E void sighandler(int signum);
/**** misc.c ****/
E bool IsFile(const Anope::string &filename);
E time_t dotime(const Anope::string &s);
E Anope::string duration(const time_t &seconds, const NickCore *nc = NULL);
E Anope::string expire_left(const NickCore *nc, time_t expires);
E Anope::string do_strftime(const time_t &t, const NickCore *nc = NULL, bool short_output = false);
E bool IsValidIdent(const Anope::string &ident);
E bool IsValidHost(const Anope::string &host);
E Anope::string myStrGetToken(const Anope::string &str, char dilim, int token_number);
E Anope::string myStrGetTokenRemainder(const Anope::string &str, char dilim, int token_number);
E int myNumToken(const Anope::string &str, char dilim);
E bool nickIsServices(const Anope::string &nick, bool bot);
E std::list<Anope::string> BuildStringList(const Anope::string &, char = ' ');
E std::vector<Anope::string> BuildStringVector(const Anope::string &, char = ' ');
E bool str_is_wildcard(const Anope::string &str);
E bool str_is_pure_wildcard(const Anope::string &str);
E Anope::string normalizeBuffer(const Anope::string &);
/**** modes.cpp ****/
/* Number of generic modes we support */
E unsigned GenericChannelModes, GenericUserModes;
E std::multimap<ChannelModeName, ModeLock *> def_mode_locks;
E void SetDefaultMLock(ServerConfig *config);
/**** process.c ****/
E void process(const Anope::string &buf);
#endif /* EXTERN_H */
|