/* Copyright (C) 2003, 2004 IRCtoo Network, Pasi Hirvonen */ #ifndef _SPAMSERV_H_ #define _SPAMSERV_H_ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) # define __attr_unused__ __attribute__((unused)) #else # define __attr_unused__ #endif /* flags for usermodes, mostly used by users.c */ #define SPAMSERV_VERSION "2" #define EXTRA_VERSION ".1" #define SPAMSERV_RELNAME "It's magic!" #define FLAG_OPERATOR 0x01 #define FLAG_SERVICESADMIN 0x02 #define FLAG_REGISTERED 0x04 /* fatal error, aborts. */ void s_fatal(const char *, ...); /* this should be called on program exit etc. */ void s_cleanup(void); /* handle rehash */ void s_rehash_config(void); /* errors */ #define EALREADYEXISTS 6 /* object already exists */ #define ETOOWIDE 7 /* too wide data (spamstring too "wild") */ #define EINVALIDDATA 8 /* invalid data (null for example) */ #define EGENERICERR 9 /* generic error */ #define ENOTFOUND 10 /* object not found */ #define EINVALIDCHAN 11 /* invalid channel name */ #define EMISSINGCHAN 12 /* missing channel name */ #define ECHANDELFAIL 13 /* removal of channel failed */ #define EINSUFFPRIV_SA 14 /* must be SA or higher */ #define EINSUFFPRIV_O 15 /* must be oper or higher */ #define EINVALIDCMD 16 /* invalid command */ #define EINVALIDCMDFORMAT 17 /* invalid command format */ #define EINVALIDPARAMS 21 /* invalid parameters */ #define ECONNCLOSED 18 /* connection closed */ #define EREADERROR 19 /* read error */ /* database errors are the low numbers for historical reasons */ #define EDBERROR 1 /* database error */ #define EDBINSUFFMEM 2 /* db operation failed, no free memory */ #define EDBCONNFAIL 3 /* db connection failed */ #define EDBNOCONN 4 /* not connected to db */ #define EDBQUERYFAIL 5 /* query failed */ #define EDBDUPLICATE 20 /* duplicate db entry */ #define MAXERR 21 /* Maximum sizes */ #define MAXNICKLEN 30 #define MAXUSERLEN 10 #define MAXREALLEN 50 #define MAXHOSTLEN 64 #define MAXCHANLEN (32 + 1) #define MAXPWDLEN 16 #define MAXPSEUDOCHANS 5 /* defaults */ #define DEFAULT_CYCLE 120 /* minutes */ /* paths etc*/ #define CONFIGFILE "spamserv.conf" #define MOTDFILE "spamserv.motd" #define HELPDIR "help/" #endif /* _SPAMSERV_H_ */