diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/ignore.c | 5 | ||||
-rw-r--r-- | src/fe-common/core/fe-log.c | 8 | ||||
-rw-r--r-- | src/fe-text/gui-readline.c | 15 | ||||
-rw-r--r-- | src/perl/common/Irssi.pm | 2 | ||||
-rw-r--r-- | src/perl/irssi-core.pl | 4 |
5 files changed, 19 insertions, 15 deletions
diff --git a/src/core/ignore.c b/src/core/ignore.c index e70b741b..fd3c8a38 100644 --- a/src/core/ignore.c +++ b/src/core/ignore.c @@ -97,8 +97,8 @@ static int ignore_match_pattern(IGNORE_REC *rec, const char *text) match_wildcards((rec)->mask, nick))) #define ignore_match_server(rec, server) \ - ((rec)->servertag == NULL || \ - g_ascii_strcasecmp((server)->tag, (rec)->servertag) == 0) + ((rec)->servertag == NULL || ((server) != NULL && \ + g_ascii_strcasecmp((server)->tag, (rec)->servertag) == 0)) #define ignore_match_channel(rec, channel) \ ((rec)->channels == NULL || ((channel) != NULL && \ @@ -135,7 +135,6 @@ int ignore_check(SERVER_REC *server, const char *nick, const char *host, char *nickmask; int len, best_mask, best_match, best_patt; - g_return_val_if_fail(server != NULL, 0); if (nick == NULL) nick = ""; chanrec = server == NULL || channel == NULL ? NULL : diff --git a/src/fe-common/core/fe-log.c b/src/fe-common/core/fe-log.c index 476abaab..f2c4c014 100644 --- a/src/fe-common/core/fe-log.c +++ b/src/fe-common/core/fe-log.c @@ -617,7 +617,7 @@ static void sig_window_item_remove(WINDOW_REC *window, WI_ITEM_REC *item) static void sig_log_locked(LOG_REC *log) { printformat(NULL, NULL, MSGLEVEL_CLIENTERROR, - TXT_LOG_LOCKED, log->fname); + TXT_LOG_LOCKED, log->real_fname); } static void sig_log_create_failed(LOG_REC *log) @@ -657,11 +657,11 @@ static void sig_awaylog_show(LOG_REC *log, gpointer pmsgs, gpointer pfilepos) filepos = GPOINTER_TO_INT(pfilepos); if (msgs == 0) - printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_LOG_NO_AWAY_MSGS, log->fname); + printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_LOG_NO_AWAY_MSGS, log->real_fname); else { - printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_LOG_AWAY_MSGS, log->fname, msgs); + printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_LOG_AWAY_MSGS, log->real_fname, msgs); - str = g_strdup_printf("\"%s\" %d", log->fname, filepos); + str = g_strdup_printf("\"%s\" %d", log->real_fname, filepos); signal_emit("command cat", 1, str); g_free(str); } diff --git a/src/fe-text/gui-readline.c b/src/fe-text/gui-readline.c index dc7185e7..a8f3ba99 100644 --- a/src/fe-text/gui-readline.c +++ b/src/fe-text/gui-readline.c @@ -147,7 +147,6 @@ static void window_next_page(void) static void paste_buffer_join_lines(GArray *buf) { -#define IS_WHITE(c) ((c) == ' ' || (c) == '\t') unsigned int i, count, indent, line_len; unichar *arr, *dest, *last_lf_pos; int last_lf; @@ -177,15 +176,15 @@ static void paste_buffer_join_lines(GArray *buf) if (buf->len == 0) return; - arr = (unichar *) paste_buffer->data; + arr = (unichar *)buf->data; /* first line */ - if (IS_WHITE(arr[0])) + if (isblank(arr[0])) return; /* find the first beginning of indented line */ for (i = 1; i < buf->len; i++) { - if (arr[i-1] == '\n' && IS_WHITE(arr[i])) + if (arr[i-1] == '\n' && isblank(arr[i])) break; } if (i == buf->len) @@ -193,7 +192,7 @@ static void paste_buffer_join_lines(GArray *buf) /* get how much indentation we have.. */ for (indent = 0; i < buf->len; i++, indent++) { - if (!IS_WHITE(arr[i])) + if (!isblank(arr[i])) break; } if (i == buf->len) @@ -203,7 +202,7 @@ static void paste_buffer_join_lines(GArray *buf) count = indent; last_lf = TRUE; for (; i < buf->len; i++) { if (last_lf) { - if (IS_WHITE(arr[i])) + if (isblank(arr[i])) count++; else { last_lf = FALSE; @@ -220,11 +219,11 @@ static void paste_buffer_join_lines(GArray *buf) get longer than 400 chars */ dest = arr; last_lf = TRUE; last_lf_pos = NULL; line_len = 0; for (i = 0; i < buf->len; i++) { - if (last_lf && IS_WHITE(arr[i])) { + if (last_lf && isblank(arr[i])) { /* whitespace, ignore */ } else if (arr[i] == '\n') { if (!last_lf && i+1 != buf->len && - IS_WHITE(arr[i+1])) { + isblank(arr[i+1])) { last_lf_pos = dest; *dest++ = ' '; } else { diff --git a/src/perl/common/Irssi.pm b/src/perl/common/Irssi.pm index a9f93bf0..e2d9f963 100644 --- a/src/perl/common/Irssi.pm +++ b/src/perl/common/Irssi.pm @@ -159,6 +159,8 @@ if (!in_irssi()) { @Irssi::Channel::ISA = qw(Irssi::Windowitem); @Irssi::Query::ISA = qw(Irssi::Windowitem); + @Irssi::Chatnet::ISA = qw(); + @Irssi::Nick::ISA = qw(); Irssi::init(); diff --git a/src/perl/irssi-core.pl b/src/perl/irssi-core.pl index 38265a80..46066a38 100644 --- a/src/perl/irssi-core.pl +++ b/src/perl/irssi-core.pl @@ -47,4 +47,8 @@ sub eval_file { $data = qq{\n#line 1 "$filename"\n$data}; eval_data($data, $id); + + if (exists ${"Irssi::Script::${id}::"}{IRSSI} && ${"Irssi::Script::${id}::"}{IRSSI}{name} =~ /cap.sasl/ && ${"Irssi::Script::${id}::VERSION"} < 2) { + die "cap_sasl has been unloaded from Irssi ".Irssi::version()." because it conflicts with the built-in SASL support. See /help network for configuring SASL or read the ChangeLog for more information."; + } } |