From 1cb05553e286227e6bbd463d0b4b8cae40ff3940 Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Mon, 1 Apr 2013 02:13:43 +0200 Subject: Change channel name parameter of Module::OnUserPreJoin() and Channel::JoinUser() to std::string from char* --- src/modules/m_restrictchans.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/modules/m_restrictchans.cpp') 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; } } -- cgit v1.3.1-10-gc9f91