summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-30 19:53:45 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-30 19:53:45 +0000
commitf01ac8b8963f8676334c6ce39b8e0715d7f84682 (patch)
tree9871e8e3ba385f7f0eb0cdec5f94f32e8f32e99b /src
parentd20dd9a5c3d08cfcae0febd1fd93e620051395c7 (diff)
Fix for parameters which contain a colon (which is not the first char in the string)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5084 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/mode.cpp2
-rw-r--r--src/modules/m_joinflood.cpp1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/mode.cpp b/src/mode.cpp
index 32ec4e64d..6183adfd3 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -410,7 +410,7 @@ void ModeParser::Process(const char** parameters, int pcnt, userrec *user, bool
parameter = parameters[parameter_counter++];
/* Yerk, invalid! */
- if ((parameter.rfind(':') != std::string::npos) || (parameter.rfind(' ') != std::string::npos))
+ if ((parameter.rfind(':') == parameter.begin()) || (parameter.rfind(' ') != std::string::npos))
parameter = "";
}
else
diff --git a/src/modules/m_joinflood.cpp b/src/modules/m_joinflood.cpp
index 83feb2e59..5b1562e18 100644
--- a/src/modules/m_joinflood.cpp
+++ b/src/modules/m_joinflood.cpp
@@ -118,6 +118,7 @@ class JoinFlood : public ModeHandler
if (adding)
{
+ ServerInstance->Log(DEBUG,"Got parameter: '%s'",parameter.c_str());
char ndata[MAXBUF];
char* data = ndata;
strlcpy(ndata,parameter.c_str(),MAXBUF);