summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-07-25 16:58:56 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-07-25 16:58:56 +0000
commitf827df84032bafa4384acb21957456e3809bc3be (patch)
tree4a0d9386aac3ee63f272ee06ff6f57f8aa959232 /src
parent77b0de3fedf130ce0d3b50bb2a2e8d98dcf5d3f4 (diff)
Add stuff for functors. Currently, as a test case only InspIRCd::IsNick has been 'functorized'
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7564 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/helperfuncs.cpp2
-rw-r--r--src/inspircd.cpp5
2 files changed, 5 insertions, 2 deletions
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp
index 0bcee0711..8e6627d1f 100644
--- a/src/helperfuncs.cpp
+++ b/src/helperfuncs.cpp
@@ -389,7 +389,7 @@ bool InspIRCd::IsChannel(const char *chname)
}
/* true for valid nickname, false else */
-bool InspIRCd::IsNick(const char* n)
+bool IsNickHandler::Call(const char* n)
{
if (!n || !*n)
return false;
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index 4a53c2a05..09f1e8685 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -39,6 +39,7 @@
#include "typedefs.h"
#include "command_parse.h"
#include "exitcodes.h"
+#include "caller.h"
#ifdef WIN32
@@ -391,7 +392,9 @@ void InspIRCd::WritePID(const std::string &filename)
}
InspIRCd::InspIRCd(int argc, char** argv)
- : ModCount(-1), GlobalCulls(this)
+ : ModCount(0),
+ GlobalCulls(this),
+ HandleIsNick(this), IsNick(&HandleIsNick)
{
int found_ports = 0;
FailedPortList pl;