summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-04-13 03:28:56 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-04-13 03:28:56 +0000
commitdd737891345a7ff80f601ab0c0ba712de5e10943 (patch)
tree64697cad44a531d592e6b1ed67c960156ec9a920 /include
parent5862157a0889c0cb9a889a08b1dd0d9959c5b9e9 (diff)
Port a bunch of methods of InspIRCd to functors. IsChannel, IsSID, Rehash.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9474 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r--include/inspircd.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/inspircd.h b/include/inspircd.h
index 665effb61..1b88ca0b7 100644
--- a/include/inspircd.h
+++ b/include/inspircd.h
@@ -234,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;
@@ -345,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.
@@ -579,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<bool, const char*> IsChannel;
/** Return true if str looks like a server ID
* @param string to check against
*/
- bool IsSID(const std::string &str);
+ caller1<bool, const std::string&> IsSID;
/** Rehash the local server
*/
- void Rehash();
+ caller1<void, const std::string&> Rehash;
/** Handles incoming signals after being set
* @param signal the signal recieved