diff options
Diffstat (limited to 'src/fe-common/irc/flood')
-rw-r--r-- | src/fe-common/irc/flood/Makefile.am | 3 | ||||
-rw-r--r-- | src/fe-common/irc/flood/fe-flood.c | 6 | ||||
-rw-r--r-- | src/fe-common/irc/flood/module-formats.c | 12 | ||||
-rw-r--r-- | src/fe-common/irc/flood/module-formats.h | 3 | ||||
-rw-r--r-- | src/fe-common/irc/flood/module.h | 3 |
5 files changed, 18 insertions, 9 deletions
diff --git a/src/fe-common/irc/flood/Makefile.am b/src/fe-common/irc/flood/Makefile.am index c802dfd9..46ca4f25 100644 --- a/src/fe-common/irc/flood/Makefile.am +++ b/src/fe-common/irc/flood/Makefile.am @@ -13,5 +13,6 @@ libfe_common_irc_flood_la_SOURCES = \ fe-flood.c \ module-formats.c -noinst_headers = \ +noinst_HEADERS = \ + module.h \ module-formats.h diff --git a/src/fe-common/irc/flood/fe-flood.c b/src/fe-common/irc/flood/fe-flood.c index d21d6952..b7937fe9 100644 --- a/src/fe-common/irc/flood/fe-flood.c +++ b/src/fe-common/irc/flood/fe-flood.c @@ -26,6 +26,8 @@ #include "irc-server.h" #include "irc/flood/autoignore.h" +#include "themes.h" + static void event_autoignore_new(IRC_SERVER_REC *server, AUTOIGNORE_REC *ignore) { g_return_if_fail(ignore != NULL); @@ -45,10 +47,14 @@ void fe_flood_init(void) { signal_add("autoignore new", (SIGNAL_FUNC) event_autoignore_new); signal_add("autoignore remove", (SIGNAL_FUNC) event_autoignore_remove); + + theme_register(fecommon_irc_flood_formats); } void fe_flood_deinit(void) { + theme_unregister(); + signal_remove("autoignore new", (SIGNAL_FUNC) event_autoignore_new); signal_remove("autoignore remove", (SIGNAL_FUNC) event_autoignore_remove); } diff --git a/src/fe-common/irc/flood/module-formats.c b/src/fe-common/irc/flood/module-formats.c index ea8ec653..2d0293bc 100644 --- a/src/fe-common/irc/flood/module-formats.c +++ b/src/fe-common/irc/flood/module-formats.c @@ -23,11 +23,13 @@ FORMAT_REC fecommon_irc_flood_formats[] = { - { MODULE_NAME, "Flood", 0 }, + { MODULE_NAME, "Flood", 0 }, - /* ---- */ - { NULL, "Autoignore", 0 }, + /* ---- */ + { NULL, "Autoignore", 0 }, - { "autoignore", "Flood detected from %_$0%_, autoignoring for %_$1%_ minutes", 2, { 0, 1 } }, - { "autounignore", "Unignoring %_$0", 1, { 0 } } + { "autoignore", "Flood detected from %_$0%_, autoignoring for %_$1%_ minutes", 2, { 0, 1 } }, + { "autounignore", "Unignoring %_$0", 1, { 0 } }, + + { NULL, NULL, 0 } }; diff --git a/src/fe-common/irc/flood/module-formats.h b/src/fe-common/irc/flood/module-formats.h index 8311b021..7386dd2a 100644 --- a/src/fe-common/irc/flood/module-formats.h +++ b/src/fe-common/irc/flood/module-formats.h @@ -10,6 +10,3 @@ enum { }; extern FORMAT_REC fecommon_irc_flood_formats[]; -#define MODULE_FORMATS fecommon_irc_flood_formats - -#include "printformat.h" diff --git a/src/fe-common/irc/flood/module.h b/src/fe-common/irc/flood/module.h new file mode 100644 index 00000000..a5d9528f --- /dev/null +++ b/src/fe-common/irc/flood/module.h @@ -0,0 +1,3 @@ +#include "common.h" + +#define MODULE_NAME "fe-common/irc/flood" |