aboutsummaryrefslogtreecommitdiffstats
path: root/src/mode.cpp
diff options
context:
space:
mode:
authorGravatar Daniel De Graaf2010-02-23 21:16:26 -0600
committerGravatar Daniel De Graaf2010-08-03 17:32:37 -0400
commitd471337f5f8001a8a0482aaf51e22ede5251e455 (patch)
tree8260d6c2f87f991476353f7e4263171d2da963f9 /src/mode.cpp
parentAdd documentation of OJOIN. (diff)
Add m_opflags
Diffstat (limited to 'src/mode.cpp')
-rw-r--r--src/mode.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/mode.cpp b/src/mode.cpp
index ee38afa23..d1c432fcd 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -260,6 +260,10 @@ std::string irc::modestacker::popModeLine(bool use_uid, int maxlen, int maxmodes
if (u)
value = use_uid ? u->uuid : u->nick;
}
+ else if (mh->GetTranslateType() == TR_CUSTOM)
+ {
+ mh->TranslateMode(value, iter->adding, use_uid);
+ }
if (!modechar)
{
@@ -991,6 +995,13 @@ void ModeHandler::RemoveMode(Channel* channel, irc::modestacker* stack)
}
}
+void ModeHandler::PopulateChanModes(Channel* channel, irc::modestacker& stack)
+{
+ irc::modechange mc(id, channel->GetModeParameter(this), true);
+ if (channel->IsModeSet(this))
+ stack.push(mc);
+}
+
void ListExtItem::free(void* item)
{
modelist* ml = static_cast<modelist*>(item);
@@ -1020,6 +1031,16 @@ const modelist* ListModeBase::GetList(Channel* channel)
return extItem.get(channel);
}
+void ListModeBase::PopulateChanModes(Channel* channel, irc::modestacker& stack)
+{
+ modelist* ml = extItem.get(channel);
+ if (!ml)
+ return;
+ for(modelist::const_iterator i = ml->begin(); i != ml->end(); i++)
+ {
+ stack.push(irc::modechange(id, (**i).mask, true));
+ }
+}
void ListModeBase::RemoveMode(Channel* channel, irc::modestacker* stack)
{