X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Finspircd.h;h=1b88ca0b72cce49b264cea77bfb483b4ace723f2;hb=8ac2fa846b189fa649ef8591bc4e311ab613f283;hp=05e33cf0c0f2d59d210abe1f883bed1e84519351;hpb=519d8e5dfe379840ae5da2ac43231ec4364d7b18;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/inspircd.h b/include/inspircd.h index 05e33cf0c..1b88ca0b7 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -56,6 +56,7 @@ #include "modules.h" #include "configreader.h" #include "inspstring.h" +#include "protocol.h" /** * Used to define the maximum number of parameters a command may have. @@ -233,6 +234,9 @@ DEFINE_HANDLER1(IsNickHandler, bool, const char*); DEFINE_HANDLER1(IsIdentHandler, bool, const char*); DEFINE_HANDLER1(FindDescriptorHandler, User*, int); DEFINE_HANDLER1(FloodQuitUserHandler, void, User*); +DEFINE_HANDLER1(IsChannelHandler, bool, const char*); +DEFINE_HANDLER1(IsSIDHandler, bool, const std::string&); +DEFINE_HANDLER1(RehashHandler, void, const std::string&); /* Forward declaration - required */ class XLineManager; @@ -344,6 +348,9 @@ class CoreExport InspIRCd : public classbase IsIdentHandler HandleIsIdent; FindDescriptorHandler HandleFindDescriptor; FloodQuitUserHandler HandleFloodQuitUser; + IsChannelHandler HandleIsChannel; + IsSIDHandler HandleIsSID; + RehashHandler HandleRehash; /** BufferedSocket classes pending deletion after being closed. * We don't delete these immediately as this may cause a segmentation fault. @@ -463,6 +470,10 @@ class CoreExport InspIRCd : public classbase */ int s_signal; + /** Protocol interface, overridden by server protocol modules + */ + ProtocolInterface* PI; + /** Get the current time * Because this only calls time() once every time around the mainloop, * it is much faster than calling time() directly. @@ -574,16 +585,16 @@ class CoreExport InspIRCd : public classbase * @param chname A channel name to verify * @return True if the name is valid */ - bool IsChannel(const char *chname); + caller1 IsChannel; /** Return true if str looks like a server ID * @param string to check against */ - bool IsSID(const std::string &str); + caller1 IsSID; /** Rehash the local server */ - void Rehash(); + caller1 Rehash; /** Handles incoming signals after being set * @param signal the signal recieved @@ -795,23 +806,6 @@ class CoreExport InspIRCd : public classbase */ InspIRCd(int argc, char** argv); - /** Output a log message to the ircd.log file - * The text will only be output if the current loglevel - * is less than or equal to the level you provide - * @param level A log level from the DebugLevel enum - * @param text Format string of to write to the log - * @param ... Format arguments of text to write to the log - */ - void Log(int level, const char* text, ...) CUSTOM_PRINTF(3, 4); - - /** Output a log message to the ircd.log file - * The text will only be output if the current loglevel - * is less than or equal to the level you provide - * @param level A log level from the DebugLevel enum - * @param text Text to write to the log - */ - void Log(int level, const std::string &text); - /** Send a line of WHOIS data to a user. * @param user user to send the line to * @param dest user being WHOISed