server->ischannel(char *) -> server->ischannel(SERVER_REC *, char *). Added

#define server_ischannel(server, data) and it's now used everywhere..


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1954 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-11-01 22:52:23 +00:00 committed by cras
commit 95b94ed83c
10 changed files with 13 additions and 10 deletions

View file

@ -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);

View file

@ -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.

View file

@ -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) {

View file

@ -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);

View file

@ -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 {