diff options
| author | 2013-04-01 02:13:43 +0200 | |
|---|---|---|
| committer | 2013-04-01 02:13:43 +0200 | |
| commit | 1cb05553e286227e6bbd463d0b4b8cae40ff3940 (patch) | |
| tree | d8c211e91ce29fcaf94dc3a4bf1814200804509c /src/modules/m_restrictchans.cpp | |
| parent | Rewrote caller.h to be more C++11 ish, currently commented out pending whenev... (diff) | |
Change channel name parameter of Module::OnUserPreJoin() and Channel::JoinUser() to std::string from char*
Diffstat (limited to 'src/modules/m_restrictchans.cpp')
| -rw-r--r-- | src/modules/m_restrictchans.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/modules/m_restrictchans.cpp b/src/modules/m_restrictchans.cpp index c76b0e79f..d720c7b5f 100644 --- a/src/modules/m_restrictchans.cpp +++ b/src/modules/m_restrictchans.cpp @@ -53,10 +53,9 @@ class ModuleRestrictChans : public Module ReadConfig(); } - - 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) { - irc::string x = cname; + irc::string x(cname.c_str()); if (!IS_LOCAL(user)) return MOD_RES_PASSTHRU; @@ -66,7 +65,7 @@ class ModuleRestrictChans : public Module // user is not an oper and its not in the allow list if ((!IS_OPER(user)) && (allowchans.find(x) == allowchans.end())) { - user->WriteNumeric(ERR_BANNEDFROMCHAN, "%s %s :Only IRC operators may create new channels",user->nick.c_str(),cname); + user->WriteNumeric(ERR_BANNEDFROMCHAN, "%s %s :Only IRC operators may create new channels",user->nick.c_str(),cname.c_str()); return MOD_RES_DENY; } } |
