summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2012-11-19 03:37:59 +0100
committerattilamolnar <attilamolnar@hush.com>2012-12-15 19:47:40 +0100
commite3e3a35899931d98e76023464f9b077b09ba828d (patch)
tree5a4dbe8907a2bd25e1ac5a72ca5a182efdae7041 /src/modules/m_spanningtree
parent71d53e4883cdb83b50f43cd934ac9b4cd2b95383 (diff)
Add IS_SERVER() and REG_ALL checks to (mostly oper only) commands taking a target nickname
If a SID was passed as the target user parameter or when it's an unregistered user reply with the "no such nick" (or the moral equivalent) message
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r--src/modules/m_spanningtree/away.cpp2
-rw-r--r--src/modules/m_spanningtree/metadata.cpp2
-rw-r--r--src/modules/m_spanningtree/operquit.cpp2
-rw-r--r--src/modules/m_spanningtree/save.cpp2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/m_spanningtree/away.cpp b/src/modules/m_spanningtree/away.cpp
index 3b6d44f0f..ed97c48cd 100644
--- a/src/modules/m_spanningtree/away.cpp
+++ b/src/modules/m_spanningtree/away.cpp
@@ -27,7 +27,7 @@
bool TreeSocket::Away(const std::string &prefix, parameterlist &params)
{
User* u = ServerInstance->FindNick(prefix);
- if (!u)
+ if ((!u) || (IS_SERVER(u)))
return true;
if (params.size())
{
diff --git a/src/modules/m_spanningtree/metadata.cpp b/src/modules/m_spanningtree/metadata.cpp
index f74b2dc62..a584f8fa8 100644
--- a/src/modules/m_spanningtree/metadata.cpp
+++ b/src/modules/m_spanningtree/metadata.cpp
@@ -46,7 +46,7 @@ CmdResult CommandMetadata::Handle(const std::vector<std::string>& params, User *
else if (*(params[0].c_str()) != '#')
{
User* u = ServerInstance->FindUUID(params[0]);
- if (u)
+ if ((u) && (!IS_SERVER(u)))
{
if (item)
item->unserialize(FORMAT_NETWORK, u, value);
diff --git a/src/modules/m_spanningtree/operquit.cpp b/src/modules/m_spanningtree/operquit.cpp
index d06541706..af2e04ebc 100644
--- a/src/modules/m_spanningtree/operquit.cpp
+++ b/src/modules/m_spanningtree/operquit.cpp
@@ -34,7 +34,7 @@ bool TreeSocket::OperQuit(const std::string &prefix, parameterlist &params)
User* u = ServerInstance->FindUUID(prefix);
- if (u)
+ if ((u) && (!IS_SERVER(u)))
{
ServerInstance->OperQuit.set(u, params[0]);
params[0] = ":" + params[0];
diff --git a/src/modules/m_spanningtree/save.cpp b/src/modules/m_spanningtree/save.cpp
index de9cb7316..92999b422 100644
--- a/src/modules/m_spanningtree/save.cpp
+++ b/src/modules/m_spanningtree/save.cpp
@@ -40,7 +40,7 @@ bool TreeSocket::ForceNick(const std::string &prefix, parameterlist &params)
User* u = ServerInstance->FindNick(params[0]);
time_t ts = atol(params[1].c_str());
- if (u && u->age == ts)
+ if ((u) && (!IS_SERVER(u)) && (u->age == ts))
{
Utils->DoOneToAllButSender(prefix,"SAVE",params,prefix);