added submodules, minor updates
This commit is contained in:
@@ -38,4 +38,10 @@ ssize_t IRC_Receive(irc_client_t *irc, char* toBuf, size_t bufSize);
|
||||
void IRC_Send(irc_client_t *irc, char* toSend);
|
||||
void IRC_Close(irc_client_t *irc);
|
||||
|
||||
// init
|
||||
int IRC_Init(irc_client_t *irc);
|
||||
void IRC_Free(irc_client_t *irc);
|
||||
|
||||
int IRC_PollEvent(irc_event_t *event, irc_client_t *irc);
|
||||
|
||||
#endif
|
||||
17
include/IRC/IRC_events.h
Normal file
17
include/IRC/IRC_events.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#ifndef IRC_EVENTS_H
|
||||
#define IRC_EVENTS_H
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
IRC_EVENT_PRIVMSG,
|
||||
IRC_EVENT_NOTICE,
|
||||
IRC_EVENT_JOIN,
|
||||
IRC_EVENT_PART,
|
||||
IRC_EVENT_QUIT,
|
||||
IRC_EVENT_MODESET,
|
||||
IRC_EVENT_AWAY,
|
||||
IRC_EVENT_KICK
|
||||
} irc_event_type_t;
|
||||
|
||||
#endif
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef IRC_STRUCTS_H
|
||||
#define IRC_STRUCTS_H
|
||||
|
||||
#include "IRC/IRC_events.h"
|
||||
#include "netcode.h"
|
||||
#include <stdbool.h>
|
||||
#include <openssl/ssl.h>
|
||||
@@ -27,6 +28,12 @@ typedef struct {
|
||||
int argc;
|
||||
} irc_message_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
irc_event_type_t type;
|
||||
irc_message_t orig_msg;
|
||||
} irc_event_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
irc_hostmask_t hostmask;
|
||||
@@ -92,17 +99,20 @@ typedef struct
|
||||
typedef struct
|
||||
{
|
||||
irc_connection_info_t connectionInfo;
|
||||
sslSockfd_t connection;
|
||||
irc_hostmask_t ownHostmask;
|
||||
char supportedCapabilities[513];
|
||||
char requestedCapabilities[513];
|
||||
irc_capability_t acked[24];
|
||||
sslSockfd_t connection;
|
||||
irc_hostmask_t ownHostmask;
|
||||
char supportedCapabilities[513];
|
||||
char requestedCapabilities[513];
|
||||
irc_capability_t acked[16];
|
||||
|
||||
/* Authentication parameters */
|
||||
irc_auth_t saslAuth;
|
||||
irc_auth_t saslAuth;
|
||||
|
||||
/* Identity */
|
||||
irc_identity_t identity;
|
||||
irc_identity_t identity;
|
||||
|
||||
irc_event_t* eventQueue; // lives on the heap
|
||||
int eventQueuePtr;
|
||||
} irc_client_t;
|
||||
|
||||
typedef struct {
|
||||
|
||||
Reference in New Issue
Block a user