diff options
-rw-r--r-- | src/core/chat-commands.c | 2 | ||||
-rw-r--r-- | src/core/commands.c | 2 | ||||
-rw-r--r-- | src/core/ignore.c | 2 | ||||
-rw-r--r-- | src/core/server-rec.h | 2 | ||||
-rw-r--r-- | src/core/servers.h | 3 | ||||
-rw-r--r-- | src/fe-common/core/chat-completion.c | 2 | ||||
-rw-r--r-- | src/fe-common/core/fe-ignore.c | 4 | ||||
-rw-r--r-- | src/fe-common/core/fe-log.c | 2 | ||||
-rw-r--r-- | src/irc/core/irc-servers.c | 2 | ||||
-rw-r--r-- | src/perl/common/Server.xs | 2 |
10 files changed, 13 insertions, 10 deletions
diff --git a/src/core/chat-commands.c b/src/core/chat-commands.c index bdd64e4f..4a7b41ce 100644 --- a/src/core/chat-commands.c +++ b/src/core/chat-commands.c @@ -322,7 +322,7 @@ static void cmd_msg(const char *data, SERVER_REC *server, WI_ITEM_REC *item) if (target != NULL) server->send_message(server, target, msg); - signal_emit(target != NULL && server->ischannel(target) ? + signal_emit(target != NULL && server_ischannel(server, target) ? "message own_public" : "message own_private", 4, server, msg, target, origtarget); diff --git a/src/core/commands.c b/src/core/commands.c index 0cbb70b0..46d0c666 100644 --- a/src/core/commands.c +++ b/src/core/commands.c @@ -636,7 +636,7 @@ static char *get_optional_channel(WI_ITEM_REC *active_item, char **data) channel = cmd_get_param(&tmp); if (strcmp(channel, "*") == 0 || - !active_item->server->ischannel(channel)) + !server_ischannel(active_item->server, channel)) ret = active_item->name; else { /* Find the channel first and use it's name if found. diff --git a/src/core/ignore.c b/src/core/ignore.c index f008df3f..d3f3f633 100644 --- a/src/core/ignore.c +++ b/src/core/ignore.c @@ -162,7 +162,7 @@ int ignore_check(SERVER_REC *server, const char *nick, const char *host, if (nick == NULL) nick = ""; chanrec = (channel != NULL && server != NULL && - server->ischannel(channel)) ? + server_ischannel(server, channel)) ? channel_find(server, channel) : NULL; if (chanrec != NULL && nick != NULL && (nickrec = nicklist_find(chanrec, nick)) != NULL) { diff --git a/src/core/server-rec.h b/src/core/server-rec.h index 7cdc66e5..4a75ef80 100644 --- a/src/core/server-rec.h +++ b/src/core/server-rec.h @@ -55,7 +55,7 @@ void (*channels_join)(SERVER_REC *server, const char *data, int automatic); /* returns true if `flag' indicates a nick flag (op/voice/halfop) */ int (*isnickflag)(char flag); /* returns true if `data' indicates a channel */ -int (*ischannel)(const char *data); +int (*ischannel)(SERVER_REC *server, const char *data); /* returns all nick flag characters in order op, voice, halfop. If some of them aren't supported '\0' can be used. */ const char *(*get_nick_flags)(void); diff --git a/src/core/servers.h b/src/core/servers.h index c59c7b8c..667a034e 100644 --- a/src/core/servers.h +++ b/src/core/servers.h @@ -17,6 +17,9 @@ #define IS_SERVER_CONNECT(conn) \ (SERVER_CONNECT(conn) ? TRUE : FALSE) +#define server_ischannel(server, channel) \ + (server)->ischannel(server, channel) + /* all strings should be either NULL or dynamically allocated */ /* address and nick are mandatory, rest are optional */ struct _SERVER_CONNECT_REC { diff --git a/src/fe-common/core/chat-completion.c b/src/fe-common/core/chat-completion.c index 632897f0..c8d34427 100644 --- a/src/fe-common/core/chat-completion.c +++ b/src/fe-common/core/chat-completion.c @@ -569,7 +569,7 @@ static void sig_complete_word(GList **list, WINDOW_REC *window, if (server == NULL && servers != NULL) server = servers->data; - if (server != NULL && server->ischannel(word)) { + if (server != NULL && server_ischannel(server, word)) { /* probably completing a channel name */ *list = completion_get_channels(window->active_server, word); return; diff --git a/src/fe-common/core/fe-ignore.c b/src/fe-common/core/fe-ignore.c index 9e24b129..dd4fe1aa 100644 --- a/src/fe-common/core/fe-ignore.c +++ b/src/fe-common/core/fe-ignore.c @@ -112,7 +112,7 @@ static void cmd_ignore(const char *data) if (*levels == '\0') levels = "ALL"; if (active_win->active_server != NULL && - active_win->active_server->ischannel(mask)) { + server_ischannel(active_win->active_server, mask)) { chanarg = mask; mask = NULL; } @@ -187,7 +187,7 @@ static void cmd_unignore(const char *data) const char *chans[2] = { "*", NULL }; if (active_win->active_server != NULL && - active_win->active_server->ischannel(mask)) { + server_ischannel(active_win->active_server, mask)) { chans[0] = mask; mask = NULL; } diff --git a/src/fe-common/core/fe-log.c b/src/fe-common/core/fe-log.c index a0be229b..477307f4 100644 --- a/src/fe-common/core/fe-log.c +++ b/src/fe-common/core/fe-log.c @@ -573,7 +573,7 @@ static int sig_autoremove(void) server = server_find_tag(logitem->servertag); if (logitem->type == LOG_ITEM_TARGET && - server != NULL && !server->ischannel(logitem->name)) + server != NULL && !server_ischannel(server, logitem->name)) log_close(log); } return 1; diff --git a/src/irc/core/irc-servers.c b/src/irc/core/irc-servers.c index e34519fc..0dbb3468 100644 --- a/src/irc/core/irc-servers.c +++ b/src/irc/core/irc-servers.c @@ -60,7 +60,7 @@ static int isnickflag_func(char flag) return isnickflag(flag); } -static int ischannel_func(const char *data) +static int ischannel_func(SERVER_REC *server, const char *data) { if (*data == '@') { /* @#channel, @+#channel */ diff --git a/src/perl/common/Server.xs b/src/perl/common/Server.xs index 1580e235..388c062a 100644 --- a/src/perl/common/Server.xs +++ b/src/perl/common/Server.xs @@ -101,7 +101,7 @@ ischannel(server, data) Irssi::Server server char *data CODE: - RETVAL = server->ischannel(data); + RETVAL = server->ischannel(server, data); OUTPUT: RETVAL |