Lots of moving stuff around - hopefully I didn't break too much :)

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@632 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2000-08-26 15:39:44 +00:00 committed by cras
commit e395e87ded
160 changed files with 3954 additions and 2959 deletions

31
src/core/channels.h Normal file
View file

@ -0,0 +1,31 @@
#ifndef __CHANNELS_H
#define __CHANNELS_H
#include "servers.h"
#define IS_CHANNEL(channel) \
((channel) != NULL && \
module_find_id("CHANNEL", ((CHANNEL_REC *) (channel))->type) != -1)
/* Returns CHANNEL_REC if it's channel, NULL if it isn't. */
#define CHANNEL(channel) \
(IS_CHANNEL(channel) ? (CHANNEL_REC *) (channel) : NULL)
#define STRUCT_SERVER_REC SERVER_REC
typedef struct {
#include "channel-rec.h"
} CHANNEL_REC;
extern GSList *channels;
void channels_init(void);
void channels_deinit(void);
/* Create new channel record */
void channel_init(CHANNEL_REC *channel, int automatic);
void channel_destroy(CHANNEL_REC *channel);
/* find channel by name, if `server' is NULL, search from all servers */
CHANNEL_REC *channel_find(SERVER_REC *server, const char *name);
#endif