X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Finspircd.h;h=5e5ebce421518d7e4f45433c7253cad470b3d145;hb=48103a05e75dc208bcd01b62b19ae01158c01b50;hp=dba38d272733e3ea3ddef7e380c4f65c2e706487;hpb=ffbd1eebf0b82bf40482879f410f58874030a695;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/inspircd.h b/include/inspircd.h index dba38d272..5e5ebce42 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -15,8 +15,8 @@ #define __INSPIRCD_H__ #ifndef WIN32 -#define DllExport -#define CoreExport +#define DllExport +#define CoreExport #define printf_c printf #else #include "inspircd_win32wrapper.h" @@ -32,10 +32,15 @@ #endif // Required system headers. -#include -#include +#include +#include +#include +#include +#include +#include #include "inspircd_config.h" +#include "numerics.h" #include "uid.h" #include "users.h" #include "channels.h" @@ -58,6 +63,11 @@ #include "inspstring.h" #include "protocol.h" +#ifndef PATH_MAX +#warning Potentially broken system, PATH_MAX undefined +#define PATH_MAX 4096 +#endif + /** * Used to define the maximum number of parameters a command may have. */ @@ -230,11 +240,11 @@ typedef std::vector > FailedPortList; class InspIRCd; DEFINE_HANDLER1(ProcessUserHandler, void, User*); -DEFINE_HANDLER1(IsNickHandler, bool, const char*); +DEFINE_HANDLER2(IsNickHandler, bool, const char*, size_t); DEFINE_HANDLER1(IsIdentHandler, bool, const char*); DEFINE_HANDLER1(FindDescriptorHandler, User*, int); DEFINE_HANDLER1(FloodQuitUserHandler, void, User*); -DEFINE_HANDLER1(IsChannelHandler, bool, const char*); +DEFINE_HANDLER2(IsChannelHandler, bool, const char*, size_t); DEFINE_HANDLER1(IsSIDHandler, bool, const std::string&); DEFINE_HANDLER1(RehashHandler, void, const std::string&); @@ -265,12 +275,7 @@ class CoreExport ConfigReaderThread : public Thread * classbase. Amongst other things, it contains a ModeParser, * a DNS object, a CommandParser object, and a list of active * Module objects, and facilities for Module objects to - * interact with the core system it implements. You should - * NEVER attempt to instantiate a class of type InspIRCd - * yourself. If you do, this is equivalent to spawning a second - * IRC server, and could have catastrophic consequences for the - * program in terms of ram usage (basically, you could create - * an obese forkbomb built from recursively spawning irc servers!) + * interact with the core system it implements. */ class CoreExport InspIRCd : public classbase { @@ -422,7 +427,7 @@ class CoreExport InspIRCd : public classbase /** LogManager handles logging. */ LogManager *Logs; - + /** ModuleManager contains everything related to loading/unloading * modules. */ @@ -585,7 +590,7 @@ class CoreExport InspIRCd : public classbase * @param chname A channel name to verify * @return True if the name is valid */ - caller1 IsChannel; + caller2 IsChannel; /** Return true if str looks like a server ID * @param string to check against @@ -601,7 +606,7 @@ class CoreExport InspIRCd : public classbase */ void SignalHandler(int signal); - /** Sets the signal recieved + /** Sets the signal recieved * @param signal the signal recieved */ static void SetSignal(int signal); @@ -633,7 +638,7 @@ class CoreExport InspIRCd : public classbase * @param n A nickname to verify * @return True if the nick is valid */ - caller1 IsNick; + caller2 IsNick; /** Return true if an ident is valid * @param An ident to verify @@ -767,7 +772,7 @@ class CoreExport InspIRCd : public classbase * @param hashtype The hash from the config file * @return 0 if the strings match, 1 or -1 if they do not */ - int PassCompare(Extensible* ex, const char* data,const char* input, const char* hashtype); + int PassCompare(Extensible* ex, const std::string &data, const std::string &input, const std::string &hashtype); /** Check if a given server is a uline. * An empty string returns true, this is by design.