From a3313987f31a074a4f5f1d455df1ee15a81362b4 Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Wed, 4 Jul 2012 20:25:41 +0200 Subject: m_spanningtree Only allow uuids in SVSJOIN, METADATA and OPERQUIT --- src/modules/m_spanningtree/metadata.cpp | 2 +- src/modules/m_spanningtree/operquit.cpp | 2 +- src/modules/m_spanningtree/svsjoin.cpp | 4 ++-- src/modules/m_spanningtree/svspart.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/modules/m_spanningtree') diff --git a/src/modules/m_spanningtree/metadata.cpp b/src/modules/m_spanningtree/metadata.cpp index 40c0367ea..f74b2dc62 100644 --- a/src/modules/m_spanningtree/metadata.cpp +++ b/src/modules/m_spanningtree/metadata.cpp @@ -45,7 +45,7 @@ CmdResult CommandMetadata::Handle(const std::vector& params, User * } else if (*(params[0].c_str()) != '#') { - User* u = ServerInstance->FindNick(params[0]); + User* u = ServerInstance->FindUUID(params[0]); if (u) { if (item) diff --git a/src/modules/m_spanningtree/operquit.cpp b/src/modules/m_spanningtree/operquit.cpp index a5831cbc1..d06541706 100644 --- a/src/modules/m_spanningtree/operquit.cpp +++ b/src/modules/m_spanningtree/operquit.cpp @@ -32,7 +32,7 @@ bool TreeSocket::OperQuit(const std::string &prefix, parameterlist ¶ms) if (params.size() < 1) return true; - User* u = ServerInstance->FindNick(prefix); + User* u = ServerInstance->FindUUID(prefix); if (u) { diff --git a/src/modules/m_spanningtree/svsjoin.cpp b/src/modules/m_spanningtree/svsjoin.cpp index d47cb0bd4..416502369 100644 --- a/src/modules/m_spanningtree/svsjoin.cpp +++ b/src/modules/m_spanningtree/svsjoin.cpp @@ -35,7 +35,7 @@ CmdResult CommandSVSJoin::Handle(const std::vector& parameters, Use return CMD_FAILURE; // Check target exists - User* u = ServerInstance->FindNick(parameters[0]); + User* u = ServerInstance->FindUUID(parameters[0]); if (!u) return CMD_FAILURE; @@ -47,7 +47,7 @@ CmdResult CommandSVSJoin::Handle(const std::vector& parameters, Use RouteDescriptor CommandSVSJoin::GetRouting(User* user, const std::vector& parameters) { - User* u = ServerInstance->FindNick(parameters[0]); + User* u = ServerInstance->FindUUID(parameters[0]); if (u) return ROUTE_OPT_UCAST(u->server); return ROUTE_LOCALONLY; diff --git a/src/modules/m_spanningtree/svspart.cpp b/src/modules/m_spanningtree/svspart.cpp index 35bce781d..3bdf13b25 100644 --- a/src/modules/m_spanningtree/svspart.cpp +++ b/src/modules/m_spanningtree/svspart.cpp @@ -48,7 +48,7 @@ CmdResult CommandSVSPart::Handle(const std::vector& parameters, Use RouteDescriptor CommandSVSPart::GetRouting(User* user, const std::vector& parameters) { - User* u = ServerInstance->FindNick(parameters[0]); + User* u = ServerInstance->FindUUID(parameters[0]); if (u) return ROUTE_OPT_UCAST(u->server); return ROUTE_LOCALONLY; -- cgit v1.2.3