Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef EXTERN_H
00013 #define EXTERN_H
00014
00015 #include "modes.h"
00016
00017 #define E extern CoreExport
00018 #define EI extern DllExport
00019
00020
00021
00022
00023 E bool bad_password(User *u);
00024 E void common_unban(const ChannelInfo *ci, User *u, bool full = false);
00025
00026
00027
00028 E void enc_encrypt(const Anope::string &src, Anope::string &dest);
00029 E bool enc_decrypt(const Anope::string &src, Anope::string &dest);
00030
00031
00032
00033 E Anope::string conf_dir, db_dir, modules_dir, locale_dir, log_dir;
00034
00035 E void introduce_user(const Anope::string &user);
00036 E bool GetCommandLineArgument(const Anope::string &name, char shortname = 0);
00037 E bool GetCommandLineArgument(const Anope::string &name, char shortname, Anope::string ¶m);
00038 E bool AtTerm();
00039 E void Fork();
00040 E void Init(int ac, char **av);
00041
00042
00043
00044 E std::vector<Anope::string> languages;
00045 E std::vector<Anope::string> domains;
00046 E void InitLanguages();
00047 E const char *translate(const char *string);
00048 E const char *translate(User *u, const char *string);
00049 E const char *translate(const NickCore *nc, const char *string);
00050 E const char *anope_gettext(const char *lang, const char *string);
00051
00052
00053
00054 E Anope::string services_dir;
00055 E Anope::string services_bin;
00056 E int debug;
00057 E bool readonly;
00058 E bool nofork;
00059 E bool nothird;
00060 E bool noexpire;
00061 E bool protocoldebug;
00062
00063 E bool quitting;
00064 E int return_code;
00065 E bool restarting;
00066 E Anope::string quitmsg;
00067 E time_t start_time;
00068
00069 E int CurrentUplink;
00070
00071 E void save_databases();
00072 E void sighandler(int signum);
00073
00074
00075
00076 E bool IsFile(const Anope::string &filename);
00077
00078 E time_t dotime(const Anope::string &s);
00079 E Anope::string duration(const time_t &seconds, const NickCore *nc = NULL);
00080 E Anope::string expire_left(const NickCore *nc, time_t expires);
00081 E Anope::string do_strftime(const time_t &t, const NickCore *nc = NULL, bool short_output = false);
00082 E bool IsValidIdent(const Anope::string &ident);
00083 E bool IsValidHost(const Anope::string &host);
00084
00085 E Anope::string myStrGetToken(const Anope::string &str, char dilim, int token_number);
00086 E Anope::string myStrGetTokenRemainder(const Anope::string &str, char dilim, int token_number);
00087 E int myNumToken(const Anope::string &str, char dilim);
00088 E bool nickIsServices(const Anope::string &nick, bool bot);
00089
00090 E std::list<Anope::string> BuildStringList(const Anope::string &, char = ' ');
00091 E std::vector<Anope::string> BuildStringVector(const Anope::string &, char = ' ');
00092
00093 E bool str_is_wildcard(const Anope::string &str);
00094 E bool str_is_pure_wildcard(const Anope::string &str);
00095 E Anope::string normalizeBuffer(const Anope::string &);
00096
00097
00098
00099
00100 E unsigned GenericChannelModes, GenericUserModes;
00101 E std::multimap<ChannelModeName, ModeLock *> def_mode_locks;
00102 E void SetDefaultMLock(ServerConfig *config);
00103
00104
00105
00106 E void process(const Anope::string &buf);
00107
00108 #endif