summaryrefslogtreecommitdiff
path: root/src/modules/m_override.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_override.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_override.cpp')
-rw-r--r--src/modules/m_override.cpp10
1 files changed, 5 insertions, 5 deletions
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;
}