summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2016-03-29 16:23:39 +0200
committerAttila Molnar <attilamolnar@hush.com>2016-03-29 16:23:39 +0200
commitccc99fa8f4766d60e87bb0ac58be2ce8e77e34ef (patch)
tree16c1a0950af8af38eae57c08c3e77004811cbf0b /src/modules/m_spanningtree
parent7d37139ba6816cd8bf5161f8f0ae7a508ddd4619 (diff)
m_spanningtree Add class SpanningTree::RemoteUser
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r--src/modules/m_spanningtree/remoteuser.cpp28
-rw-r--r--src/modules/m_spanningtree/remoteuser.h31
-rw-r--r--src/modules/m_spanningtree/uid.cpp3
3 files changed, 61 insertions, 1 deletions
diff --git a/src/modules/m_spanningtree/remoteuser.cpp b/src/modules/m_spanningtree/remoteuser.cpp
new file mode 100644
index 000000000..cbd1b801e
--- /dev/null
+++ b/src/modules/m_spanningtree/remoteuser.cpp
@@ -0,0 +1,28 @@
+/*
+ * InspIRCd -- Internet Relay Chat Daemon
+ *
+ * Copyright (C) 2016 Attila Molnar <attilamolnar@hush.com>
+ *
+ * This file is part of InspIRCd. InspIRCd is free software: you can
+ * redistribute it and/or modify it under the terms of the GNU General Public
+ * License as published by the Free Software Foundation, version 2.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+#include "inspircd.h"
+
+#include "main.h"
+#include "remoteuser.h"
+
+SpanningTree::RemoteUser::RemoteUser(const std::string& uid, Server* srv)
+ : ::RemoteUser(uid, srv)
+{
+}
diff --git a/src/modules/m_spanningtree/remoteuser.h b/src/modules/m_spanningtree/remoteuser.h
new file mode 100644
index 000000000..235cbfd78
--- /dev/null
+++ b/src/modules/m_spanningtree/remoteuser.h
@@ -0,0 +1,31 @@
+/*
+ * InspIRCd -- Internet Relay Chat Daemon
+ *
+ * Copyright (C) 2016 Attila Molnar <attilamolnar@hush.com>
+ *
+ * This file is part of InspIRCd. InspIRCd is free software: you can
+ * redistribute it and/or modify it under the terms of the GNU General Public
+ * License as published by the Free Software Foundation, version 2.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+#pragma once
+
+namespace SpanningTree
+{
+ class RemoteUser;
+}
+
+class SpanningTree::RemoteUser : public ::RemoteUser
+{
+ public:
+ RemoteUser(const std::string& uid, Server* srv);
+};
diff --git a/src/modules/m_spanningtree/uid.cpp b/src/modules/m_spanningtree/uid.cpp
index 01465670a..eff537119 100644
--- a/src/modules/m_spanningtree/uid.cpp
+++ b/src/modules/m_spanningtree/uid.cpp
@@ -24,6 +24,7 @@
#include "utils.h"
#include "treeserver.h"
+#include "remoteuser.h"
CmdResult CommandUID::HandleServer(TreeServer* remoteserver, std::vector<std::string>& params)
{
@@ -73,7 +74,7 @@ CmdResult CommandUID::HandleServer(TreeServer* remoteserver, std::vector<std::st
/* For remote users, we pass the UUID they sent to the constructor.
* If the UUID already exists User::User() throws an exception which causes this connection to be closed.
*/
- RemoteUser* _new = new RemoteUser(params[0], remoteserver);
+ RemoteUser* _new = new SpanningTree::RemoteUser(params[0], remoteserver);
ServerInstance->Users->clientlist[params[2]] = _new;
_new->nick = params[2];
_new->host = params[3];