/*
* This file is part of uIRC. (https://git.redxen.eu/caskd/uIRC)
* Copyright (c) 2019, 2020 Alex-David Denes
*
* uIRC is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* uIRC is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with uIRC. If not, see .
*/
#include
#ifndef _UIRC_INCLUDED_TYPES
#define _UIRC_INCLUDED_TYPES
#ifdef UIRC_IRCV3
typedef struct {
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 {
char* nick;
char* user;
char* host;
char* orig;
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 {
/* 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 {
#ifdef UIRC_IRCV3
IRC_Tags tags;
#endif
IRC_User name;
signed short cmd;
char* args[16]; /* 0-13 + trailing + NULL */
bool trailing; /* Tells if the last argument is trailing */
} IRC_Message;
#endif