38 lines
958 B
C
38 lines
958 B
C
#include <stdbool.h>
|
|
#ifndef _UIRC_STRUCTS_INCLUDED
|
|
#define _UIRC_STRUCTS_INCLUDED
|
|
typedef struct uirc_tag {
|
|
const char* value; /* if present, it isn't NULL and if it has no value, it is "" (aka '\0') */
|
|
bool clientbound;
|
|
} IRC_Tag;
|
|
typedef struct name {
|
|
const char* nick;
|
|
const char* user;
|
|
const char* host;
|
|
const char* orig;
|
|
const char* real;
|
|
} IRC_User;
|
|
/* This is how a full user source would look like
|
|
* NOTE: 'real (Real name)' may only be used in special contexts other than communication.
|
|
* nick!user%orig@host */
|
|
typedef struct uirc_tags {
|
|
/* See https://ircv3.net/registry#tags for more information */
|
|
IRC_Tag account;
|
|
IRC_Tag batch;
|
|
IRC_Tag label;
|
|
IRC_Tag msgid;
|
|
IRC_Tag multiline_concat;
|
|
IRC_Tag time;
|
|
IRC_Tag typing;
|
|
IRC_Tag react;
|
|
IRC_Tag reply;
|
|
} IRC_Tags;
|
|
typedef struct uirc_message {
|
|
IRC_Tags tags;
|
|
IRC_User name;
|
|
signed short cmd;
|
|
const char* args[15]; /* 0-13 + NULL */
|
|
const char* trailing;
|
|
} IRC_Message;
|
|
#endif
|