summaryrefslogtreecommitdiff
path: root/src/modules/m_uninvite.cpp
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-01-19 16:48:41 +0100
committerAttila Molnar <attilamolnar@hush.com>2014-01-19 16:48:41 +0100
commitf75a0d5482a09fffc0cc6cfece80bb2f1e4de815 (patch)
treee2031e58b6166c7690e1968be21f2294a4e81ef1 /src/modules/m_uninvite.cpp
parent69af56f973b9d31f5ebd7d83e6afedb59bb08c92 (diff)
Use FindNickOnly() in a few more places if a local user is performing an action to prevent UID walking
Diffstat (limited to 'src/modules/m_uninvite.cpp')
-rw-r--r--src/modules/m_uninvite.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/modules/m_uninvite.cpp b/src/modules/m_uninvite.cpp
index 10fd7c7b6..ff392edc3 100644
--- a/src/modules/m_uninvite.cpp
+++ b/src/modules/m_uninvite.cpp
@@ -37,7 +37,12 @@ class CommandUninvite : public Command
CmdResult Handle (const std::vector<std::string> &parameters, User *user)
{
- User* u = ServerInstance->FindNick(parameters[0]);
+ User* u;
+ if (IS_LOCAL(user))
+ u = ServerInstance->FindNickOnly(parameters[0]);
+ else
+ u = ServerInstance->FindNick(parameters[0]);
+
Channel* c = ServerInstance->FindChan(parameters[1]);
if ((!c) || (!u) || (u->registered != REG_ALL))