/* IRCfs - IRC FileServ for *nix. * Copyright (C) 2002 Nick 'Zaf' Clifford * For licensing details, refer to the LICENSE file in the source * code directory. */ #ifndef __include_channel_h__ #define __include_channel_h__ #include "event.h" #include "magic.h" struct server; struct channel; enum channel_events { channel_event_open, channel_event_close, channel_event_join, channel_event_part, channel_event_kick, channel_event_msg, channel_event_notice, channel_event_topic, channel_event_mode_changed, }; #define MAGIC_CHANNEL_EVENT_MSG 0x72350864 struct channel_event_msg { MAGIC magic; struct server *server; struct channel *channel; struct user *from; /* Who did it */ struct user *to; /* To whom (only for KICK) */ const char *msg; /* What was said/reason/new mode */ }; struct eventobj *channel_get_eventobj(); struct channel *channel_find(struct server *server, const char *name); const char *channel_get_name(struct channel *c); void channel_dump_chans(struct server *server); void channel_dump_chaninfo(struct server *server, const char *name); struct channel *channel_create(struct server *server, const char *name); int channel_is_prefix(char ch); #endif