changeset 466:8ea7330101e6

Misc: postpone native plugins for 3.0.0
author David Demelier <markand@malikania.fr>
date Wed, 23 Aug 2017 07:40:17 +0200
parents b5478ee3d37a
children 8a75eb260a75
files cmake/IrccdOptions.cmake plugins/CMakeLists.txt plugins/debugnative/main.cpp
diffstat 3 files changed, 0 insertions(+), 217 deletions(-) [+]
line wrap: on
line diff
--- a/cmake/IrccdOptions.cmake	Tue Aug 22 16:56:41 2017 +0200
+++ b/cmake/IrccdOptions.cmake	Wed Aug 23 07:40:17 2017 +0200
@@ -39,7 +39,6 @@
 #
 # WITH_BINDIR           Binary directory for irccd, irccdctl
 # WITH_PLUGINDIR        Path where plugins must be installed
-# WITH_NPLUGINDIR       Path where native plugins must be installed
 # WITH_DOCDIR           Path where to install documentation
 # WITH_MANDIR           Path where to install manuals
 # WITH_CONFDIR          Path where to search configuration files
@@ -99,13 +98,11 @@
     set(WITH_DATADIR "share" CACHE STRING "Data directory")
     set(WITH_CACHEDIR "var" CACHE STRING "Temporary files directory")
     set(WITH_PLUGINDIR "share/plugins" CACHE STRING "Module prefix where to install")
-    set(WITH_NPLUGINDIR "lib/irccd/plugins" CACHE STRING "Directory for native plugins")
     set(WITH_DOCDIR "share/doc" CACHE STRING "Documentation directory")
 else ()
     set(WITH_DATADIR "share/irccd" CACHE STRING "Data directory")
     set(WITH_CACHEDIR "var/irccd" CACHE STRING "Temporary files directory")
     set(WITH_PLUGINDIR "share/irccd/plugins" CACHE STRING "Module prefix where to install")
-    set(WITH_NPLUGINDIR "lib/irccd/plugins" CACHE STRING "Directory for native plugins")
     set(WITH_DOCDIR "share/doc/irccd" CACHE STRING "Documentation directory")
 endif ()
 
--- a/plugins/CMakeLists.txt	Tue Aug 22 16:56:41 2017 +0200
+++ b/plugins/CMakeLists.txt	Wed Aug 23 07:40:17 2017 +0200
@@ -38,10 +38,3 @@
         DOCS ${plugins_SOURCE_DIR}/${plugin}/${plugin}.md
     )
 endforeach ()
-
-# Debug plugins.
-irccd_define_plugin(
-    NAME debugnative
-    TYPE NATIVE
-    SOURCES ${plugins_SOURCE_DIR}/debugnative/main.cpp
-)
--- a/plugins/debugnative/main.cpp	Tue Aug 22 16:56:41 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,207 +0,0 @@
-/*
- * main.cpp -- native plugin for debugging
- *
- * Copyright (c) 2013-2017 David Demelier <markand@malikania.fr>
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#include <iostream>
-
-#include <irccd.hpp>
-#include <logger.hpp>
-#include <plugin-dynlib.hpp>
-#include <server.hpp>
-#include <util.hpp>
-
-using namespace irccd;
-
-extern "C" {
-
-DYNLIB_EXPORT void irccd_onChannelMode(Irccd &, const ChannelModeEvent &event)
-{
-    log::info() << "plugin debugnative: onChannelMode event\n";
-    log::info() << "plugin debugnative:   server: " << event.server->name() << std::endl;
-    log::info() << "plugin debugnative:   origin: " << event.origin << std::endl;
-    log::info() << "plugin debugnative:   channel: " << event.channel << std::endl;
-    log::info() << "plugin debugnative:   mode: " << event.mode << std::endl;
-    log::info() << "plugin debugnative:   argument: " << event.argument << std::endl;
-}
-
-DYNLIB_EXPORT void irccd_onChannelNotice(Irccd &, const ChannelNoticeEvent &event)
-{
-    log::info() << "plugin debugnative: onChannelNotice event\n";
-    log::info() << "plugin debugnative:   server: " << event.server->name() << std::endl;
-    log::info() << "plugin debugnative:   origin: " << event.origin << std::endl;
-    log::info() << "plugin debugnative:   channel: " << event.channel << std::endl;
-    log::info() << "plugin debugnative:   message: " << event.message << std::endl;
-}
-
-DYNLIB_EXPORT void irccd_onCommand(Irccd &, const MessageEvent &event)
-{
-    log::info() << "plugin debugnative: onCommand event\n";
-    log::info() << "plugin debugnative:   server: " << event.server->name() << std::endl;
-    log::info() << "plugin debugnative:   origin: " << event.origin << std::endl;
-    log::info() << "plugin debugnative:   channel: " << event.channel << std::endl;
-    log::info() << "plugin debugnative:   message: " << event.message << std::endl;
-}
-
-DYNLIB_EXPORT void irccd_onConnect(Irccd &, const ConnectEvent &event)
-{
-    log::info() << "plugin debugnative: onConnect event\n";
-    log::info() << "plugin debugnative:   server: " << event.server->name() << std::endl;
-}
-
-DYNLIB_EXPORT void irccd_onInvite(Irccd &, const InviteEvent &event)
-{
-    log::info() << "plugin debugnative: onInvite event\n";
-    log::info() << "plugin debugnative:   server: " << event.server->name() << std::endl;
-    log::info() << "plugin debugnative:   origin: " << event.origin << std::endl;
-    log::info() << "plugin debugnative:   channel: " << event.channel << std::endl;
-    log::info() << "plugin debugnative:   nickname: " << event.nickname << std::endl;
-}
-
-DYNLIB_EXPORT void irccd_onJoin(Irccd &, const JoinEvent &event)
-{
-    log::info() << "plugin debugnative: onJoin event\n";
-    log::info() << "plugin debugnative:   server: " << event.server->name() << std::endl;
-    log::info() << "plugin debugnative:   origin: " << event.origin << std::endl;
-    log::info() << "plugin debugnative:   channel: " << event.channel << std::endl;
-}
-
-DYNLIB_EXPORT void irccd_onKick(Irccd &, const KickEvent &event)
-{
-    log::info() << "plugin debugnative: onKick event\n";
-    log::info() << "plugin debugnative:   server: " << event.server->name() << std::endl;
-    log::info() << "plugin debugnative:   origin: " << event.origin << std::endl;
-    log::info() << "plugin debugnative:   channel: " << event.channel << std::endl;
-    log::info() << "plugin debugnative:   target: " << event.target << std::endl;
-    log::info() << "plugin debugnative:   reason: " << event.reason << std::endl;
-}
-
-DYNLIB_EXPORT void irccd_onLoad(Irccd &, DynlibPlugin &)
-{
-    log::info() << "plugin debugnative: onLoad event\n";
-}
-
-DYNLIB_EXPORT void irccd_onMessage(Irccd &, const MessageEvent &event)
-{
-
-    log::info() << "plugin debugnative: onMessage event\n";
-    log::info() << "plugin debugnative:   server: " << event.server->name() << std::endl;
-    log::info() << "plugin debugnative:   origin: " << event.origin << std::endl;
-    log::info() << "plugin debugnative:   channel: " << event.channel << std::endl;
-    log::info() << "plugin debugnative:   message: " << event.message << std::endl;
-}
-
-DYNLIB_EXPORT void irccd_onMe(Irccd &, const MeEvent &event)
-{
-    log::info() << "plugin debugnative: onMe event\n";
-    log::info() << "plugin debugnative:   server: " << event.server->name() << std::endl;
-    log::info() << "plugin debugnative:   origin: " << event.origin << std::endl;
-    log::info() << "plugin debugnative:   channel: " << event.channel << std::endl;
-    log::info() << "plugin debugnative:   message: " << event.message << std::endl;
-}
-
-DYNLIB_EXPORT void irccd_onMode(Irccd &, const ModeEvent &event)
-{
-    log::info() << "plugin debugnative: onMode event\n";
-    log::info() << "plugin debugnative:   server: " << event.server->name() << std::endl;
-    log::info() << "plugin debugnative:   origin: " << event.origin << std::endl;
-    log::info() << "plugin debugnative:   mode: " << event.mode << std::endl;
-}
-
-DYNLIB_EXPORT void irccd_onNames(Irccd &, const NamesEvent &event)
-{
-    log::info() << "plugin debugnative: onNames event\n";
-    log::info() << "plugin debugnative:   server: " << event.server->name() << std::endl;
-    log::info() << "plugin debugnative:   channel: " << event.channel << std::endl;
-    log::info() << "plugin debugnative:   names: "
-                << util::join(event.names.begin(), event.names.end(), ", ")
-                << std::endl;
-}
-
-DYNLIB_EXPORT void irccd_onNick(Irccd &, const NickEvent &event)
-{
-    log::info() << "plugin debugnative: onNick event\n";
-    log::info() << "plugin debugnative:   server: " << event.server->name() << std::endl;
-    log::info() << "plugin debugnative:   origin: " << event.origin << std::endl;
-    log::info() << "plugin debugnative:   nickname: " << event.nickname << std::endl;
-}
-
-DYNLIB_EXPORT void irccd_onNotice(Irccd &, const NoticeEvent &event)
-{
-    log::info() << "plugin debugnative: onNotice event\n";
-    log::info() << "plugin debugnative:   server: " << event.server->name() << std::endl;
-    log::info() << "plugin debugnative:   origin: " << event.origin << std::endl;
-    log::info() << "plugin debugnative:   message: " << event.message << std::endl;
-}
-
-DYNLIB_EXPORT void irccd_onPart(Irccd &, const PartEvent &event)
-{
-    log::info() << "plugin debugnative: onPart event\n";
-    log::info() << "plugin debugnative:   server: " << event.server->name() << std::endl;
-    log::info() << "plugin debugnative:   origin: " << event.origin << std::endl;
-    log::info() << "plugin debugnative:   channel: " << event.channel << std::endl;
-    log::info() << "plugin debugnative:   reason: " << event.reason << std::endl;
-}
-
-DYNLIB_EXPORT void irccd_onQuery(Irccd &, const QueryEvent &event)
-{
-    log::info() << "plugin debugnative: onQuery event\n";
-    log::info() << "plugin debugnative:   server: " << event.server->name() << std::endl;
-    log::info() << "plugin debugnative:   origin: " << event.origin << std::endl;
-    log::info() << "plugin debugnative:   message: " << event.message << std::endl;
-}
-
-DYNLIB_EXPORT void irccd_onQueryCommand(Irccd &, const QueryEvent &event)
-{
-    log::info() << "plugin debugnative: onQueryCommand event\n";
-    log::info() << "plugin debugnative:   server: " << event.server->name() << std::endl;
-    log::info() << "plugin debugnative:   origin: " << event.origin << std::endl;
-    log::info() << "plugin debugnative:   message: " << event.message << std::endl;
-}
-
-DYNLIB_EXPORT void irccd_onReload(Irccd &, DynlibPlugin &)
-{
-    log::info() << "plugin debugnative: onReload event\n";
-}
-
-DYNLIB_EXPORT void irccd_onTopic(Irccd &, const TopicEvent &event)
-{
-    log::info() << "plugin debugnative: onTopic event\n";
-    log::info() << "plugin debugnative:   server: " << event.server->name() << std::endl;
-    log::info() << "plugin debugnative:   origin: " << event.origin << std::endl;
-    log::info() << "plugin debugnative:   channel: " << event.channel << std::endl;
-    log::info() << "plugin debugnative:   topic: " << event.topic << std::endl;
-}
-
-DYNLIB_EXPORT void irccd_onUnload(Irccd &, DynlibPlugin &)
-{
-    log::info() << "plugin debugnative: onUnload event\n";
-}
-
-DYNLIB_EXPORT void irccd_onWhois(Irccd &, const WhoisEvent &event)
-{
-    log::info() << "plugin debugnative: onWhois event\n";
-    log::info() << "plugin debugnative:   server: " << event.server->name() << std::endl;
-    log::info() << "plugin debugnative:   nick: " << event.whois.nick << std::endl;
-    log::info() << "plugin debugnative:   user: " << event.whois.user << std::endl;
-    log::info() << "plugin debugnative:   host: " << event.whois.host << std::endl;
-    log::info() << "plugin debugnative:   channels: "
-                << util::join(event.whois.channels.begin(),
-                              event.whois.channels.end(), ", ")
-                << std::endl;
-}
-
-} // !C