..adding new files..

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@171 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2000-04-26 08:03:38 +00:00 committed by cras
commit c95034c6de
206 changed files with 31247 additions and 0 deletions

View file

@ -0,0 +1,17 @@
noinst_LTLIBRARIES = libfe_common_irc_flood.la
INCLUDES = \
$(GLIB_CFLAGS) \
-I$(top_srcdir)/src \
-I$(top_srcdir)/src/core/ \
-I$(top_srcdir)/src/irc/core/ \
-I$(top_srcdir)/src/fe-common/core/ \
-DHELPDIR=\""$(datadir)/irssi/help"\" \
-DSYSCONFDIR=\""$(sysconfdir)"\"
libfe_common_irc_flood_la_SOURCES = \
fe-flood.c \
module-formats.c
noinst_headers = \
module-formats.h

View file

@ -0,0 +1,54 @@
/*
fe-flood.c : irssi
Copyright (C) 1999-2000 Timo Sirainen
This program 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, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "module.h"
#include "module-formats.h"
#include "signals.h"
#include "levels.h"
#include "irc-server.h"
#include "irc/flood/autoignore.h"
static void event_autoignore_new(IRC_SERVER_REC *server, AUTOIGNORE_REC *ignore)
{
g_return_if_fail(ignore != NULL);
printformat(server, NULL, MSGLEVEL_CLIENTNOTICE, IRCTXT_AUTOIGNORE,
ignore->nick, (ignore->timeleft+59)/60);
}
static void event_autoignore_remove(IRC_SERVER_REC *server, AUTOIGNORE_REC *ignore)
{
g_return_if_fail(ignore != NULL);
printformat(server, NULL, MSGLEVEL_CLIENTNOTICE, IRCTXT_AUTOUNIGNORE, ignore->nick);
}
void fe_flood_init(void)
{
signal_add("autoignore new", (SIGNAL_FUNC) event_autoignore_new);
signal_add("autoignore remove", (SIGNAL_FUNC) event_autoignore_remove);
}
void fe_flood_deinit(void)
{
signal_remove("autoignore new", (SIGNAL_FUNC) event_autoignore_new);
signal_remove("autoignore remove", (SIGNAL_FUNC) event_autoignore_remove);
}

View file

@ -0,0 +1,33 @@
/*
module-formats.c : irssi
Copyright (C) 2000 Timo Sirainen
This program 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, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "module.h"
#include "printtext.h"
FORMAT_REC fecommon_irc_flood_formats[] =
{
{ MODULE_NAME, N_("Flood"), 0 },
/* ---- */
{ NULL, N_("Autoignore"), 0 },
{ "autoignore", N_("Flood detected from %_$0%_, autoignoring for %_$1%_ minutes"), 2, { 0, 1 } },
{ "autounignore", N_("Unignoring %_$0"), 1, { 0 } }
};

View file

@ -0,0 +1,13 @@
#include "printtext.h"
enum {
IRCTXT_MODULE_NAME,
IRCTXT_FILL_1,
IRCTXT_AUTOIGNORE,
IRCTXT_AUTOUNIGNORE
};
extern FORMAT_REC fecommon_irc_flood_formats[];
#define MODULE_FORMATS fecommon_irc_flood_formats