This repository has been archived on 2021-04-17. You can view files and clone it, but cannot push or open issues or pull requests.
uIRC/include/structs.h

45 lines
1.0 KiB
C
Raw Normal View History

#include <stdbool.h>
#ifndef _UIRC_STRUCTS_INCLUDED
#define _UIRC_STRUCTS_INCLUDED
#ifdef UIRC_IRCV3
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;
#endif
typedef struct name {
const char* nick;
const char* user;
const char* host;
const char* orig;
2020-07-05 11:39:34 +00:00
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 */
#ifdef UIRC_IRCV3
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;
#endif
typedef struct uirc_message {
#ifdef UIRC_IRCV3
IRC_Tags tags;
#endif
IRC_User name;
signed short cmd;
const char* args[15]; /* 0-13 + NULL */
const char* trailing;
} IRC_Message;
#endif