diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/inspircd.h | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/include/inspircd.h b/include/inspircd.h index cf7201c59..ba6c2b174 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -38,6 +38,7 @@ #include "snomasks.h" #include "cull_list.h" #include "filelogger.h" +#include "caller.h" /** * Used to define the maximum number of parameters a command may have. @@ -61,6 +62,8 @@ */ #define IS_SINGLE(x,y) ( (*x == y) && (*(x+1) == 0) ) + + /** Delete a pointer, and NULL its value */ template<typename T> inline void DELETE(T* x) @@ -234,6 +237,18 @@ typedef std::vector<std::pair<std::string, long> > FailedPortList; /** A list of ip addresses cross referenced against clone counts */ typedef std::map<irc::string, unsigned int> clonemap; +class InspIRCd; + +class CoreExport IsNickHandler : public HandlerBase1<bool, const char*> +{ + InspIRCd* Server; + public: + IsNickHandler(InspIRCd* Srv) : Server(Srv) { } + virtual ~IsNickHandler() { } + virtual bool Call(const char*); +}; + + /* Forward declaration - required */ class XLineManager; @@ -367,6 +382,15 @@ class CoreExport InspIRCd : public classbase public: + /** Global cull list, will be processed on next iteration + */ + CullList GlobalCulls; + + + /**** Functors ****/ + + IsNickHandler HandleIsNick; + /** InspSocket classes pending deletion after being closed. * We don't delete these immediately as this may cause a segmentation fault. */ @@ -470,10 +494,6 @@ class CoreExport InspIRCd : public classbase */ time_t next_call; - /** Global cull list, will be processed on next iteration - */ - CullList GlobalCulls; - /** Get the current time * Because this only calls time() once every time around the mainloop, * it is much faster than calling time() directly. @@ -842,7 +862,7 @@ class CoreExport InspIRCd : public classbase * @param n A nickname to verify * @return True if the nick is valid */ - bool IsNick(const char* n); + caller1<bool, const char*> IsNick; /** Return true if an ident is valid * @param An ident to verify |