summaryrefslogtreecommitdiff
path: root/src/modules/m_redirect.cpp
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2013-04-01 02:13:43 +0200
committerattilamolnar <attilamolnar@hush.com>2013-04-01 02:13:43 +0200
commit1cb05553e286227e6bbd463d0b4b8cae40ff3940 (patch)
treed8c211e91ce29fcaf94dc3a4bf1814200804509c /src/modules/m_redirect.cpp
parent9b9140d5f8a94ba160120ab91821338f08fba6e1 (diff)
Change channel name parameter of Module::OnUserPreJoin() and Channel::JoinUser() to std::string from char*
Diffstat (limited to 'src/modules/m_redirect.cpp')
-rw-r--r--src/modules/m_redirect.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/modules/m_redirect.cpp b/src/modules/m_redirect.cpp
index 26d6b162b..8076bb2a1 100644
--- a/src/modules/m_redirect.cpp
+++ b/src/modules/m_redirect.cpp
@@ -131,7 +131,7 @@ class ModuleRedirect : public Module
ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
- virtual ModResult OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs, const std::string &keygiven)
+ ModResult OnUserPreJoin(User* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven)
{
if (chan)
{
@@ -146,21 +146,20 @@ class ModuleRedirect : public Module
destchan = ServerInstance->FindChan(channel);
if (destchan && destchan->IsModeSet('L'))
{
- user->WriteNumeric(470, "%s %s * :You may not join this channel. A redirect is set, but you may not be redirected as it is a circular loop.", user->nick.c_str(), cname);
+ user->WriteNumeric(470, "%s %s * :You may not join this channel. A redirect is set, but you may not be redirected as it is a circular loop.", user->nick.c_str(), cname.c_str());
return MOD_RES_DENY;
}
/* We check the bool value here to make sure we have it enabled, if we don't then
usermode +L might be assigned to something else. */
if (UseUsermode && user->IsModeSet('L'))
{
- user->WriteNumeric(470, "%s %s %s :Force redirection stopped.",
- user->nick.c_str(), cname, channel.c_str());
+ user->WriteNumeric(470, "%s %s %s :Force redirection stopped.", user->nick.c_str(), cname.c_str(), channel.c_str());
return MOD_RES_DENY;
}
else
{
- user->WriteNumeric(470, "%s %s %s :You may not join this channel, so you are automatically being transferred to the redirect channel.", user->nick.c_str(), cname, channel.c_str());
- Channel::JoinUser(user, channel.c_str(), false, "", false, ServerInstance->Time());
+ user->WriteNumeric(470, "%s %s %s :You may not join this channel, so you are automatically being transferred to the redirect channel.", user->nick.c_str(), cname.c_str(), channel.c_str());
+ Channel::JoinUser(user, channel, false, "", false, ServerInstance->Time());
return MOD_RES_DENY;
}
}