00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef _EGG_EGGDROP_H_
00023 #define _EGG_EGGDROP_H_
00024
00025 #ifndef NULL
00026 # define NULL 0
00027 #endif
00028
00029 #include <eggdrop/common.h>
00030 #include <eggdrop/xml.h>
00031 #include <eggdrop/date.h>
00032 #include <eggdrop/flags.h>
00033 #include <eggdrop/ircmasks.h>
00034 #include <eggdrop/hash_table.h>
00035 #include <eggdrop/users.h>
00036 #include <eggdrop/base64.h>
00037 #include <eggdrop/binds.h>
00038 #include <eggdrop/config.h>
00039 #include <eggdrop/dns.h>
00040 #include <eggdrop/ident.h>
00041 #include <eggdrop/logging.h>
00042 #include <eggdrop/module.h>
00043 #include <eggdrop/net.h>
00044 #include <eggdrop/owner.h>
00045 #include <eggdrop/string.h>
00046 #include <eggdrop/timer.h>
00047 #include <eggdrop/fileutil.h>
00048 #include <eggdrop/garbage.h>
00049 #include <eggdrop/irccmp.h>
00050 #include <eggdrop/ircparse.h>
00051 #include <eggdrop/linemode.h>
00052 #include <eggdrop/netstring.h>
00053 #include <eggdrop/match.h>
00054 #include <eggdrop/md5.h>
00055 #include <eggdrop/memutil.h>
00056 #include <eggdrop/socket.h>
00057 #include <eggdrop/partyline.h>
00058 #include <eggdrop/partychan.h>
00059 #include <eggdrop/partymember.h>
00060 #include <eggdrop/botnet.h>
00061 #include <eggdrop/help.h>
00062 #include <eggdrop/sockbuf.h>
00063 #include <eggdrop/socktimer.h>
00064 #include <eggdrop/script.h>
00065 #include <eggdrop/throttle.h>
00066 #include <eggdrop/timeutil.h>
00067
00068
00069 #ifdef ENABLE_NLS
00070 # include <libintl.h>
00071 # define _(x) gettext(x)
00072 # define N_(x) gettext_noop(x)
00073 # define P_(x1, x2, n) ngettext(x1, x2, n)
00074 #else
00075 # define _(x) (x)
00076 # define N_(x) (x)
00077 # define P_(x1, x2, n) ( ((n) == 1) ? (x1) : (x2) )
00078 #endif
00079
00080
00081 #define BTN_EVENT "event"
00082
00083 #define egg_assert(test) \
00084 do { \
00085 if (!(test)) { \
00086 fprintf (stderr, _("*** Assertion failed at %s in line %i: %s\n"), \
00087 __FILE__, __LINE__, # test); \
00088 return; \
00089 } \
00090 } while (0);
00091
00092 #define egg_assert_val(test, val) \
00093 do { \
00094 if (!(test)) { \
00095 fprintf (stderr, _("*** Assertion failed at %s in line %i: %s\n"), \
00096 __FILE__, __LINE__, # test); \
00097 return val; \
00098 } \
00099 } while (0);
00100
00101 #define egg_return_if_fail(test) \
00102 if (!(test)) return;
00103
00104 #define egg_return_val_if_fail(test, val) \
00105 if (!(test)) return val;
00106
00107
00108 extern int eggdrop_init(void);
00109 extern int eggdrop_shutdown(void);
00110
00111 extern int eggdrop_event(const char *event);
00112 extern const char *eggdrop_get_param(const char *key);
00113 extern int eggdrop_set_params(const char **params, int nparams);
00114
00115 #endif