irssi/src/irc/core/irc-channels.h
Timo Sirainen d346fbe1a9 Better !channel support - window items now have "visual_name" and channels
and queries also have "name". Normally they're identical but with !channels
the visible_name contains the short !channel name, while name contains
full !ABCDEchannel name.

The visible_name should be used whenever displaying the channel name, or as
printtext()'s target. So, this breaks a few scripts in !channels, they need
to be modified to use $channel->{visible_name} instead.

Also /LAYOUT SAVE should finally work properly with !channels.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2797 dbcabf3a-b0e7-0310-adc4-f8d773084564
2002-05-16 00:34:37 +00:00

36 lines
1002 B
C

#ifndef __IRC_CHANNELS_H
#define __IRC_CHANNELS_H
#include "chat-protocols.h"
#include "channels.h"
/* Returns IRC_CHANNEL_REC if it's IRC channel, NULL if it isn't. */
#define IRC_CHANNEL(channel) \
PROTO_CHECK_CAST(CHANNEL(channel), IRC_CHANNEL_REC, chat_type, "IRC")
#define IS_IRC_CHANNEL(channel) \
(IRC_CHANNEL(channel) ? TRUE : FALSE)
#define STRUCT_SERVER_REC IRC_SERVER_REC
struct _IRC_CHANNEL_REC {
#include "channel-rec.h"
GSList *banlist; /* list of bans */
time_t massjoin_start; /* Massjoin start time */
int massjoins; /* Number of nicks waiting for massjoin signal.. */
int last_massjoins; /* Massjoins when last checked in timeout function */
};
void irc_channels_init(void);
void irc_channels_deinit(void);
/* Create new IRC channel record */
IRC_CHANNEL_REC *irc_channel_create(IRC_SERVER_REC *server, const char *name,
const char *visible_name, int automatic);
#define irc_channel_find(server, name) \
IRC_CHANNEL(channel_find(SERVER(server), name))
#endif