2020-12-17 00:27:30 +00:00
|
|
|
/*
|
|
|
|
* This file is part of uIRCd. (https://git.redxen.eu/caskd/uIRCd)
|
|
|
|
* Copyright (c) 2019, 2020 Alex-David Denes
|
|
|
|
*
|
|
|
|
* uIRCd 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.
|
|
|
|
*
|
|
|
|
* uIRCd 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 uIRCd. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2021-01-02 14:12:13 +00:00
|
|
|
#include <stdbool.h> // bool
|
2020-12-17 00:27:30 +00:00
|
|
|
|
|
|
|
#ifndef UIRCD_GUARD_CHANNELS
|
|
|
|
#define UIRCD_GUARD_CHANNELS
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
char *name, *key;
|
|
|
|
bool joined;
|
|
|
|
} Channel;
|
|
|
|
|
|
|
|
int init_chanarray(Channel** chans);
|
|
|
|
signed int resize_chanarray(Channel** chans);
|
|
|
|
int set_channel(Channel* chans, const char* name, const char* key, bool joined);
|
|
|
|
unsigned int get_channelindex(const char* name, Channel* chans);
|
|
|
|
|
|
|
|
#endif /* UIRCD_GUARD_CHANNELS */
|
|
|
|
|