summaryrefslogtreecommitdiff
path: root/src/mode.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-24 03:29:58 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-24 03:29:58 +0000
commitb868bb52c55fc902e0acab3c4a43576826817e85 (patch)
treeee67ec4b764846b9f43b064c9c4667ca70192e57 /src/mode.cpp
parentb16e16ac1bae4ac5494778b4b8a7009febb58137 (diff)
Get rid of ModePair
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11963 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/mode.cpp')
-rw-r--r--src/mode.cpp46
1 files changed, 0 insertions, 46 deletions
diff --git a/src/mode.cpp b/src/mode.cpp
index d19647cae..d12469aef 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -121,18 +121,6 @@ ModeAction ModeHandler::OnModeChange(User*, User*, Channel*, std::string&, bool)
return MODEACTION_DENY;
}
-ModePair ModeHandler::ModeSet(User*, User* dest, Channel* channel, const std::string&)
-{
- if (dest)
- {
- return std::make_pair(dest->IsModeSet(this->mode), "");
- }
- else
- {
- return std::make_pair(channel->IsModeSet(this->mode), "");
- }
-}
-
void ModeHandler::DisplayList(User*, Channel*)
{
}
@@ -768,40 +756,6 @@ ModeHandler* ModeParser::FindPrefix(unsigned const char pfxletter)
return NULL;
}
-std::string ModeParser::ModeString(User* user, Channel* channel, bool nick_suffix)
-{
- std::string types;
- std::string pars;
-
- if (!channel || !user)
- return "";
-
- for (unsigned char mode = 'A'; mode <= 'z'; mode++)
- {
- unsigned char pos = (mode-65) | MASK_CHANNEL;
- ModeHandler* mh = modehandlers[pos];
- if ((mh) && (mh->GetNumParams(true)) && (mh->GetNumParams(false)))
- {
- ModePair ret;
- ret = mh->ModeSet(NULL, user, channel, user->nick);
- if ((ret.first) && (ret.second == user->nick))
- {
- if (nick_suffix)
- {
- pars.append(" ");
- pars.append(user->nick);
- }
- types.push_back(mh->GetModeChar());
- }
- }
- }
-
- if (nick_suffix)
- return types+pars;
- else
- return types;
-}
-
std::string ModeParser::GiveModeList(ModeMasks m)
{
std::string type1; /* Listmodes EXCEPT those with a prefix */