view mcabber/modules/fifo/fifo_module.c @ 1984:b0470ef8669b

XEP 184: don't send receipts to buddies that have no presence subscription In order to not leak our presence, do not send message delivery receipts to senders who are not authorized to view our presence. (XEP-0184, section 8)
author Mikael Berthe <mikael@lilotux.net>
date Sun, 27 Mar 2011 12:45:41 +0200
parents 2256d0626730
children
line wrap: on
line source


/* Copyright 2009,2010 Myhailo Danylenko
 *
 * This file is part of mcabber
 *
 * mcabber 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, either version 2 of the License, or
 * (at your option) any later version.
 *
 * 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 <glib.h>
#include <gmodule.h>

#include <mcabber/fifo.h>
#include <mcabber/modules.h>
#include <mcabber/config.h>

module_info_t info_fifo = {
  .branch          = MCABBER_BRANCH,
  .api             = MCABBER_API_VERSION,
  .version         = MCABBER_VERSION,
  .requires        = NULL,
  .init            = NULL,
  .uninit          = NULL,
  .description     = "Reads and executes command from FIFO pipe\n"
          "Recognizes options fifo_name (required), fifo_hide_commands and fifo_ignore.",
  .next            = NULL,
};

gchar *g_module_check_init(GModule *module)
{
  if (fifo_init() == -1)
    return "FIFO initialization failed";
  else
    return NULL;
}

void g_module_unload(GModule *module)
{
  fifo_deinit();
}

/* vim: set expandtab cindent cinoptions=>2\:2(0:  For Vim users... */