/* 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_dccchat_h__ #define __include_dccchat_h__ #include #include "user.h" #include "event.h" #include "magic.h" #define MAGIC_DCCCHAT 0xfd7ecd8a struct dccchat; enum dccchat_events { dccchat_event_open, dccchat_event_close, dccchat_event_msg, }; #define MAGIC_DCCCHAT_EVENT_MSG 0xA465B8DE struct dccchat_event_msg { MAGIC magic; struct dccchat *dccchat; struct user *who; const char *msg; }; /* Starts a DCC chat conversion with the specified user */ struct dccchat *dccchat_start(struct user *u); void dccchat_destroy(struct dccchat *dc); struct eventobj *dccchat_get_event_obj(); int dccchat_write(struct dccchat *dc, const char *format, ...); int dccchat_write_v(struct dccchat *dc, const char *format, va_list va); int dccchat_write_const(struct dccchat *dc, const char *str); #endif