summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-07-25 17:21:30 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-07-25 17:21:30 +0000
commit89bc1282b9e1e2bf9eccacae8f1dc2b5f9ade9b7 (patch)
treeff31b00e1a0425f0aa2ae4e41f873686aa1d2887 /include
parent914534be62976d97dd387fa3412e7b0cda002c7e (diff)
Turn IsIdent into a functor
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7568 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r--include/inspircd.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/include/inspircd.h b/include/inspircd.h
index ba6c2b174..c2ea3f048 100644
--- a/include/inspircd.h
+++ b/include/inspircd.h
@@ -248,6 +248,15 @@ class CoreExport IsNickHandler : public HandlerBase1<bool, const char*>
virtual bool Call(const char*);
};
+class CoreExport IsIdentHandler : public HandlerBase1<bool, const char*>
+{
+ InspIRCd* Server;
+ public:
+ IsIdentHandler(InspIRCd* Srv) : Server(Srv) { }
+ virtual ~IsIdentHandler() { }
+ virtual bool Call(const char*);
+};
+
/* Forward declaration - required */
class XLineManager;
@@ -389,7 +398,9 @@ class CoreExport InspIRCd : public classbase
/**** Functors ****/
- IsNickHandler HandleIsNick;
+ IsNickHandler HandleIsNick;
+
+ IsIdentHandler HandleIsIdent;
/** InspSocket classes pending deletion after being closed.
* We don't delete these immediately as this may cause a segmentation fault.
@@ -868,7 +879,7 @@ class CoreExport InspIRCd : public classbase
* @param An ident to verify
* @return True if the ident is valid
*/
- bool IsIdent(const char* n);
+ caller1<bool, const char*> IsIdent;
/** Find a username by their file descriptor.
* It is preferred to use this over directly accessing the fd_ref_table array.