From 31f1e7ad092f8bf16ee653cc105eea4a769650ca Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 19 May 2008 21:16:42 +0000 Subject: 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 --- src/modules/m_override.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/modules/m_override.cpp') diff --git a/src/modules/m_override.cpp b/src/modules/m_override.cpp index 8cbc1836d..1cdf39827 100644 --- a/src/modules/m_override.cpp +++ b/src/modules/m_override.cpp @@ -236,7 +236,7 @@ class ModuleOverride : public Module { if ((chan->modes[CM_INVITEONLY]) && (CanOverride(user,"INVITE"))) { - irc::string x = chan->name; + irc::string x(chan->name.c_str()); if (!user->IsInvited(x)) { if (RequireKey && keygiven != "override") @@ -248,12 +248,12 @@ class ModuleOverride : public Module if (NoisyOverride) chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper override to bypass invite-only", cname, user->nick.c_str()); - ServerInstance->SNO->WriteToSnoMask('O',std::string(user->nick)+" used oper override to bypass +i on "+std::string(cname)); + ServerInstance->SNO->WriteToSnoMask('O', user->nick+" used oper override to bypass +i on "+std::string(cname)); } return -1; } - if ((*chan->key) && (CanOverride(user,"KEY")) && strcasecmp(keygiven.c_str(), chan->key)) + if ((chan->key.empty()) && (CanOverride(user,"KEY")) && keygiven != chan->key) { if (RequireKey && keygiven != "override") { @@ -264,7 +264,7 @@ class ModuleOverride : public Module if (NoisyOverride) chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper override to bypass the channel key", cname, user->nick.c_str()); - ServerInstance->SNO->WriteToSnoMask('O',std::string(user->nick)+" used oper override to bypass +k on "+std::string(cname)); + ServerInstance->SNO->WriteToSnoMask('O', user->nick+" used oper override to bypass +k on "+std::string(cname)); return -1; } @@ -279,7 +279,7 @@ class ModuleOverride : public Module if (NoisyOverride) chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper override to bypass the channel limit", cname, user->nick.c_str()); - ServerInstance->SNO->WriteToSnoMask('O',std::string(user->nick)+" used oper override to bypass +l on "+std::string(cname)); + ServerInstance->SNO->WriteToSnoMask('O', user->nick+" used oper override to bypass +l on "+std::string(cname)); return -1; } -- cgit v1.2.3