From d61850ecf64d430de231aefb3396d0e271d1d184 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Mon, 15 Jul 2019 10:09:26 -0700 Subject: [PATCH] modules/m_user: Simplify linkage. #83 --- ircd/m.cc | 14 -------------- modules/m_user.cc | 11 ++++------- 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/ircd/m.cc b/ircd/m.cc index 4427f786a..4839f9e96 100644 --- a/ircd/m.cc +++ b/ircd/m.cc @@ -2786,20 +2786,6 @@ ircd::m::user::tokens tokens_room_id }; -ircd::m::user -ircd::m::create(const id::user &user_id, - const json::members &contents) -{ - using prototype = user (const id::user &, const json::members &); - - static mods::import function - { - "m_user", "user_create" - }; - - return function(user_id, contents); -} - bool ircd::m::exists(const user::id &user_id) { diff --git a/modules/m_user.cc b/modules/m_user.cc index d36c512a6..ffc773b79 100644 --- a/modules/m_user.cc +++ b/modules/m_user.cc @@ -8,18 +8,15 @@ // copyright notice and this permission notice is present in all copies. The // full license for this software is available in the LICENSE file. -using namespace ircd::m; -using namespace ircd; - -mapi::header +ircd::mapi::header IRCD_MODULE { "Matrix user library; modular components." }; -extern "C" m::user -user_create(const m::user::id &user_id, - const json::members &contents) +ircd::m::user +ircd::m::create(const m::user::id &user_id, + const json::members &contents) { const m::user user {