Files
bbirc/include/IRC.h
2026-05-11 15:14:22 +03:00

39 lines
687 B
C

#ifndef IRC_H
#define IRC_H
typedef struct
{
char *nickname;
int nicklen;
char *ident;
int identlen;
char *hostname;
int hostlen;
} irc_hostmask_t;
typedef struct {
char line[513];
char *source;
char *command;
char *argv[16];
int argc;
} irc_message_t;
typedef struct
{
int sockfd;
irc_hostmask_t ownHostmask;
} irc_client_t;
typedef struct {
const char *name;
void (*handler)(irc_message_t *msg, irc_client_t *irc);
} command_t;
int IRC_ParseMessage(char* line, irc_message_t *msg);
void IRC_ProcessMessage(irc_message_t *msg, irc_client_t *irc);
void IRC_PRIVMSG(char* msg, irc_client_t irc);
#endif