summaryrefslogtreecommitdiff
path: root/src/modules/m_uninvite.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_uninvite.cpp')
-rw-r--r--src/modules/m_uninvite.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/modules/m_uninvite.cpp b/src/modules/m_uninvite.cpp
index 10fd7c7b6..f429f75b9 100644
--- a/src/modules/m_uninvite.cpp
+++ b/src/modules/m_uninvite.cpp
@@ -70,15 +70,13 @@ class CommandUninvite : public Command
LocalUser* lu = IS_LOCAL(u);
if (lu)
{
- irc::string xname(c->name.c_str());
- if (!lu->IsInvited(xname))
+ if (!lu->RemoveInvite(c))
{
user->SendText(":%s 505 %s %s %s :Is not invited to channel %s", user->server.c_str(), user->nick.c_str(), u->nick.c_str(), c->name.c_str(), c->name.c_str());
return CMD_FAILURE;
}
user->SendText(":%s 494 %s %s %s :Uninvited", user->server.c_str(), user->nick.c_str(), c->name.c_str(), u->nick.c_str());
- lu->RemoveInvite(xname);
lu->WriteNumeric(493, "%s :You were uninvited from %s by %s", u->nick.c_str(), c->name.c_str(), user->nick.c_str());
std::string msg = "*** " + user->nick + " uninvited " + u->nick + ".";
@@ -111,10 +109,6 @@ class ModuleUninvite : public Module
ServerInstance->Modules->AddService(cmd);
}
- virtual ~ModuleUninvite()
- {
- }
-
virtual Version GetVersion()
{
return Version("Provides the UNINVITE command which lets users un-invite other users from channels", VF_VENDOR | VF_OPTCOMMON);
@@ -122,4 +116,3 @@ class ModuleUninvite : public Module
};
MODULE_INIT(ModuleUninvite)
-