summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-04-01 16:25:02 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-04-01 16:25:02 +0000
commit5b4e92cc2ca9a08a1a9740daa25c64578325ed78 (patch)
tree34e269cb78287bf781783d8e3a6436d2d32ea8dd /src
parent1f9ef4081211739c7c04211a9d77549d25c09f7a (diff)
Add an optional bool to ModeParser::ModeString() to not give the nickname n times on the end of the string. This can be used for w00ts funky stuff. :-)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9242 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/mode.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/mode.cpp b/src/mode.cpp
index db9641edb..9b90599ce 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -879,7 +879,7 @@ ModeHandler* ModeParser::FindPrefix(unsigned const char pfxletter)
return NULL;
}
-std::string ModeParser::ModeString(User* user, Channel* channel)
+std::string ModeParser::ModeString(User* user, Channel* channel, bool nick_suffix)
{
std::string types;
std::string pars;
@@ -897,14 +897,20 @@ std::string ModeParser::ModeString(User* user, Channel* channel)
ret = mh->ModeSet(NULL, user, channel, user->nick);
if ((ret.first) && (ret.second == user->nick))
{
- pars.append(" ");
- pars.append(user->nick);
+ if (nick_suffix)
+ {
+ pars.append(" ");
+ pars.append(user->nick);
+ }
types.push_back(mh->GetModeChar());
}
}
}
- return types+pars;
+ if (nick_suffix)
+ return types+pars;
+ else
+ return types;
}
std::string ModeParser::ChanModes()