summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2013-04-01 18:00:17 +0200
committerattilamolnar <attilamolnar@hush.com>2013-04-13 15:34:11 +0200
commitd71b6a8b273ae6efc823ffe79130e6a85b6a1534 (patch)
tree887827c70168b74321b030b573eb5887d3d8d38b /src/modules
parent551d687ec6d7ce44be35fae0dd7345fe73c4f63a (diff)
Remove the deprecated invite API
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_override.cpp3
-rw-r--r--src/modules/m_uninvite.cpp4
2 files changed, 2 insertions, 5 deletions
diff --git a/src/modules/m_override.cpp b/src/modules/m_override.cpp
index ea9d11c94..29996fc8f 100644
--- a/src/modules/m_override.cpp
+++ b/src/modules/m_override.cpp
@@ -124,8 +124,7 @@ class ModuleOverride : public Module
{
if (chan->IsModeSet('i') && (CanOverride(user,"INVITE")))
{
- irc::string x(chan->name.c_str());
- if (!IS_LOCAL(user)->IsInvited(x))
+ if (!IS_LOCAL(user)->IsInvited(chan))
{
if (RequireKey && keygiven != "override")
{
diff --git a/src/modules/m_uninvite.cpp b/src/modules/m_uninvite.cpp
index 683976885..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 + ".";