summaryrefslogtreecommitdiff
path: root/src/modules/m_delayjoin.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-19 21:16:42 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-19 21:16:42 +0000
commit31f1e7ad092f8bf16ee653cc105eea4a769650ca (patch)
treedced0411d5fbe803fe92ea54cb03d36c0a817563 /src/modules/m_delayjoin.cpp
parent869bd02318d94a38369a125726b8edeb54ba0706 (diff)
Convert channel::name to std::string, this was a beastie!
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9770 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_delayjoin.cpp')
-rw-r--r--src/modules/m_delayjoin.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/modules/m_delayjoin.cpp b/src/modules/m_delayjoin.cpp
index e8c51d79a..20255abf6 100644
--- a/src/modules/m_delayjoin.cpp
+++ b/src/modules/m_delayjoin.cpp
@@ -29,7 +29,7 @@ class DelayJoinMode : public ModeHandler
{
if (IS_LOCAL(source) && (channel->GetStatus(source) < STATUS_OP))
{
- source->WriteNumeric(482, "%s %s :Only channel operators may %sset channel mode +D", source->nick.c_str(), channel->name, adding ? "" : "un");
+ source->WriteNumeric(482, "%s %s :Only channel operators may %sset channel mode +D", source->nick.c_str(), channel->name.c_str(), adding ? "" : "un");
return MODEACTION_DENY;
}
else
@@ -104,10 +104,10 @@ class ModuleDelayJoin : public Module
{
silent = true;
/* Because we silenced the event, make sure it reaches the user whos joining (but only them of course) */
- user->WriteFrom(user, "JOIN %s", channel->name);
+ user->WriteFrom(user, "JOIN %s", channel->name.c_str());
/* This metadata tells the module the user is delayed join on this specific channel */
- user->Extend(std::string("delayjoin_")+channel->name);
+ user->Extend("delayjoin_"+channel->name);
/* This metadata tells the module the user is delayed join on at least one (or more) channels.
* It is only cleared when the user is no longer on ANY +D channels.
@@ -121,11 +121,11 @@ class ModuleDelayJoin : public Module
{
if (channel->IsModeSet('D'))
{
- if (user->GetExt(std::string("delayjoin_")+channel->name))
+ if (user->GetExt("delayjoin_"+channel->name))
{
silent = true;
/* Because we silenced the event, make sure it reaches the user whos leaving (but only them of course) */
- user->WriteFrom(user, "PART %s%s%s", channel->name, partmessage.empty() ? "" : " :", partmessage.empty() ? "" : partmessage.c_str());
+ user->WriteFrom(user, "PART %s%s%s", channel->name.c_str(), partmessage.empty() ? "" : " :", partmessage.empty() ? "" : partmessage.c_str());
}
}
}
@@ -135,10 +135,10 @@ class ModuleDelayJoin : public Module
if (chan->IsModeSet('D'))
{
/* Send silenced event only to the user being kicked and the user doing the kick */
- if (user->GetExt(std::string("delayjoin_")+chan->name))
+ if (user->GetExt("delayjoin_"+chan->name))
{
silent = true;
- user->WriteFrom(source, "KICK %s %s %s", chan->name, user->nick.c_str(), reason.c_str());
+ user->WriteFrom(source, "KICK %s %s %s", chan->name.c_str(), user->nick.c_str(), reason.c_str());
}
}
}
@@ -169,18 +169,18 @@ class ModuleDelayJoin : public Module
Channel* channel = (Channel*) dest;
- if (!user->GetExt(std::string("delayjoin_")+channel->name))
+ if (!user->GetExt("delayjoin_"+channel->name))
return;
/* Display the join to everyone else (the user who joined got it earlier) */
- this->WriteCommonFrom(user, channel, "JOIN %s", channel->name);
+ this->WriteCommonFrom(user, channel, "JOIN %s", channel->name.c_str());
std::string n = this->ServerInstance->Modes->ModeString(user, channel);
if (n.length() > 0)
- this->WriteCommonFrom(user, channel, "MODE %s +%s", channel->name, n.c_str());
+ this->WriteCommonFrom(user, channel, "MODE %s +%s", channel->name.c_str(), n.c_str());
/* Shrink off the neccessary metadata for a specific channel */
- user->Shrink(std::string("delayjoin_")+channel->name);
+ user->Shrink("delayjoin_"+channel->name);
/* Check if the user is left on any other +D channels, if so don't take away the
* metadata that says theyre on one or more channels