first commit, unfinished wip
This commit is contained in:
39
include/IRC.h
Normal file
39
include/IRC.h
Normal file
@@ -0,0 +1,39 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user