mirror of
https://github.com/irssi/irssi.git
synced 2024-10-27 05:20:20 -04:00
Forgot to move fe-ignore to core.
/unignore now complains if you don't give parameters to it. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@737 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
1627ad03bd
commit
20bac288f6
@ -13,6 +13,7 @@ libfe_common_core_a_SOURCES = \
|
||||
fe-channels.c \
|
||||
fe-common-core.c \
|
||||
fe-core-commands.c \
|
||||
fe-ignore.c \
|
||||
fe-log.c \
|
||||
fe-messages.c \
|
||||
fe-modules.c \
|
||||
|
@ -46,6 +46,9 @@ void fe_channels_deinit(void);
|
||||
void fe_core_log_init(void);
|
||||
void fe_core_log_deinit(void);
|
||||
|
||||
void fe_ignore_init(void);
|
||||
void fe_ignore_deinit(void);
|
||||
|
||||
void fe_log_init(void);
|
||||
void fe_log_deinit(void);
|
||||
|
||||
@ -100,6 +103,7 @@ void fe_common_core_init(void)
|
||||
printtext_init();
|
||||
fe_channels_init();
|
||||
fe_queries_init();
|
||||
fe_ignore_init();
|
||||
fe_log_init();
|
||||
fe_messages_init();
|
||||
fe_modules_init();
|
||||
@ -125,6 +129,7 @@ void fe_common_core_deinit(void)
|
||||
fe_channels_deinit();
|
||||
fe_queries_deinit();
|
||||
fe_messages_deinit();
|
||||
fe_ignore_deinit();
|
||||
fe_log_deinit();
|
||||
fe_modules_deinit();
|
||||
fe_server_deinit();
|
||||
|
@ -25,8 +25,7 @@
|
||||
#include "levels.h"
|
||||
#include "misc.h"
|
||||
|
||||
#include "irc.h"
|
||||
#include "irc-servers.h"
|
||||
#include "servers.h"
|
||||
#include "ignore.h"
|
||||
|
||||
static void fe_unignore(IGNORE_REC *rec);
|
||||
@ -175,7 +174,8 @@ static void cmd_ignore(const char *data)
|
||||
|
||||
if (*levels == '\0') cmd_param_error(CMDERR_NOT_ENOUGH_PARAMS);
|
||||
|
||||
if (ischannel(*mask)) {
|
||||
if (active_win->active_server != NULL &&
|
||||
active_win->active_server->ischannel(*mask)) {
|
||||
chanarg = mask;
|
||||
mask = NULL;
|
||||
}
|
||||
@ -251,6 +251,9 @@ static void cmd_unignore(const char *data)
|
||||
IGNORE_REC *rec;
|
||||
GSList *tmp;
|
||||
|
||||
if (*data == '\0')
|
||||
cmd_return_error(CMDERR_NOT_ENOUGH_PARAMS);
|
||||
|
||||
if (is_numeric(data, ' ')) {
|
||||
/* with index number */
|
||||
tmp = g_slist_nth(ignores, atoi(data)-1);
|
||||
@ -259,8 +262,12 @@ static void cmd_unignore(const char *data)
|
||||
/* with mask */
|
||||
const char *chans[2] = { "*", NULL };
|
||||
|
||||
if (ischannel(*data)) chans[0] = data;
|
||||
rec = ignore_find("*", ischannel(*data) ? NULL : data, (char **) chans);
|
||||
if (active_win->active_server != NULL &&
|
||||
active_win->active_server->ischannel(*data)) {
|
||||
chans[0] = data;
|
||||
data = NULL;
|
||||
}
|
||||
rec = ignore_find("*", data, (char **) chans);
|
||||
}
|
||||
|
||||
if (rec == NULL)
|
@ -182,6 +182,17 @@ FORMAT_REC fecommon_core_formats[] = {
|
||||
{ "format_subtitle", "%K[%W$0%K]", 1, { 0 } },
|
||||
{ "format_item", "$0 %K=%n $1", 2, { 0, 0 } },
|
||||
|
||||
/* ---- */
|
||||
{ NULL, "Ignores", 0 },
|
||||
|
||||
{ "ignored", "Ignoring %_$1%_ from %_$0%_", 2, { 0, 0 } },
|
||||
{ "unignored", "Unignored %_$0%_", 1, { 0 } },
|
||||
{ "ignore_not_found", "%_$0%_ is not being ignored", 1, { 0 } },
|
||||
{ "ignore_no_ignores", "There are no ignores", 0 },
|
||||
{ "ignore_header", "Ignorance List:", 0 },
|
||||
{ "ignore_line", "$[-4]0 $1: $2 $3 $4", 4, { 1, 0, 0, 0 } },
|
||||
{ "ignore_footer", "", 0 },
|
||||
|
||||
/* ---- */
|
||||
{ NULL, "Misc", 0 },
|
||||
|
||||
|
@ -152,6 +152,16 @@ enum {
|
||||
|
||||
IRCTXT_FILL_12,
|
||||
|
||||
IRCTXT_IGNORED,
|
||||
IRCTXT_UNIGNORED,
|
||||
IRCTXT_IGNORE_NOT_FOUND,
|
||||
IRCTXT_IGNORE_NO_IGNORES,
|
||||
IRCTXT_IGNORE_HEADER,
|
||||
IRCTXT_IGNORE_LINE,
|
||||
IRCTXT_IGNORE_FOOTER,
|
||||
|
||||
IRCTXT_FILL_13,
|
||||
|
||||
IRCTXT_NOT_TOGGLE,
|
||||
IRCTXT_PERL_ERROR,
|
||||
IRCTXT_BIND_KEY,
|
||||
|
@ -19,7 +19,6 @@ libfe_common_irc_a_SOURCES = \
|
||||
fe-ctcp.c \
|
||||
fe-events.c \
|
||||
fe-events-numeric.c \
|
||||
fe-ignore.c \
|
||||
fe-netjoin.c \
|
||||
fe-netsplit.c \
|
||||
fe-common-irc.c \
|
||||
|
@ -55,9 +55,6 @@ void fe_events_deinit(void);
|
||||
void fe_events_numeric_init(void);
|
||||
void fe_events_numeric_deinit(void);
|
||||
|
||||
void fe_ignore_init(void);
|
||||
void fe_ignore_deinit(void);
|
||||
|
||||
void irc_completion_init(void);
|
||||
void irc_completion_deinit(void);
|
||||
|
||||
@ -105,7 +102,6 @@ void fe_common_irc_init(void)
|
||||
fe_ctcp_init();
|
||||
fe_events_init();
|
||||
fe_events_numeric_init();
|
||||
fe_ignore_init();
|
||||
fe_netsplit_init();
|
||||
fe_netjoin_init();
|
||||
irc_completion_init();
|
||||
@ -124,7 +120,6 @@ void fe_common_irc_deinit(void)
|
||||
fe_ctcp_deinit();
|
||||
fe_events_deinit();
|
||||
fe_events_numeric_deinit();
|
||||
fe_ignore_deinit();
|
||||
fe_netsplit_deinit();
|
||||
fe_netjoin_deinit();
|
||||
irc_completion_deinit();
|
||||
|
@ -155,13 +155,5 @@ FORMAT_REC fecommon_irc_formats[] = {
|
||||
{ "unsilenced", "Unsilenced %_$0%_", 1, { 0 } },
|
||||
{ "silence_line", "%_$0%_: silence %c$1", 2, { 0, 0 } },
|
||||
|
||||
{ "ignored", "Ignoring %_$1%_ from %_$0%_", 2, { 0, 0 } },
|
||||
{ "unignored", "Unignored %_$0%_", 1, { 0 } },
|
||||
{ "ignore_not_found", "%_$0%_ is not being ignored", 1, { 0 } },
|
||||
{ "ignore_no_ignores", "There are no ignores", 0 },
|
||||
{ "ignore_header", "Ignorance List:", 0 },
|
||||
{ "ignore_line", "$[-4]0 $1: $2 $3 $4", 4, { 1, 0, 0, 0 } },
|
||||
{ "ignore_footer", "", 0 },
|
||||
|
||||
{ NULL, NULL, 0 }
|
||||
};
|
||||
|
@ -123,15 +123,7 @@ enum {
|
||||
|
||||
IRCTXT_SILENCED,
|
||||
IRCTXT_UNSILENCED,
|
||||
IRCTXT_SILENCE_LINE,
|
||||
|
||||
IRCTXT_IGNORED,
|
||||
IRCTXT_UNIGNORED,
|
||||
IRCTXT_IGNORE_NOT_FOUND,
|
||||
IRCTXT_IGNORE_NO_IGNORES,
|
||||
IRCTXT_IGNORE_HEADER,
|
||||
IRCTXT_IGNORE_LINE,
|
||||
IRCTXT_IGNORE_FOOTER
|
||||
IRCTXT_SILENCE_LINE
|
||||
};
|
||||
|
||||
extern FORMAT_REC fecommon_irc_formats[];
|
||||
|
Loading…
Reference in New Issue
Block a user