rewrite parser
This commit is contained in:
parent
d6d2f02367
commit
751260e234
5 changed files with 77 additions and 64 deletions
10
C/irc.h
10
C/irc.h
|
@ -1,11 +1,11 @@
|
|||
/*
|
||||
LICENSE: MIT
|
||||
LICENSE: WTFPL
|
||||
Simple libary for working with ipv4 irc servers
|
||||
Dont support:
|
||||
ssl
|
||||
ddc
|
||||
ipv6
|
||||
motd parsing
|
||||
motd
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -32,22 +32,22 @@ enum {
|
|||
IRCC_CONNECTED,
|
||||
IRCC_DISCONNECTED,
|
||||
IRCC_ERROR,
|
||||
IRCC_ALLOC,
|
||||
IRCC_SUCCESS
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
int socket;
|
||||
|
||||
char *raw;
|
||||
char raw[IRCC_MSG_MAX + 1];
|
||||
char *msg;
|
||||
char *channel;
|
||||
char *nick;
|
||||
} IRCC_client;
|
||||
|
||||
int IRCC_connect(IRCC_client *irc, const char *ip, const unsigned int port);
|
||||
int IRCC_register(IRCC_client *irc, const char *nickname);
|
||||
int IRCC_recv(IRCC_client *irc);
|
||||
int IRCC_join(IRCC_client *irc, const char *channel, const char *key);
|
||||
int IRCC_send(IRCC_client *irc, const char *msg, const char *channel);
|
||||
int IRCC_register(IRCC_client *irc, const char *nickname);
|
||||
int IRCC_init(IRCC_client *irc);
|
||||
void IRCC_close(IRCC_client *irc);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue