/* Copyright (C) All Rights Reserved
** Written by k4be
** License: GPLv3 https://www.gnu.org/licenses/gpl-3.0.html
*/
#include "unrealircd.h"
char *ct_isupport_param(void);
int tags_rehash_complete(void);
extern MODVAR MessageTagHandler *mtaghandlers;
Module *module;
ModuleHeader MOD_HEADER = {
"third/clienttagdeny",
"5.0",
"Informs clients about supported client tags",
"k4be@PIRC",
"unrealircd-5",
};
MOD_INIT(){
return MOD_SUCCESS;
}
MOD_LOAD(){
module = modinfo->handle;
ISupportAdd(module, "CLIENTTAGDENY", ct_isupport_param());
HookAdd(module, HOOKTYPE_REHASH_COMPLETE, 0, tags_rehash_complete);
return MOD_SUCCESS;
}
MOD_UNLOAD(){
return MOD_SUCCESS;
}
#define BUFLEN 500
char *ct_isupport_param(void){
static char buf[BUFLEN];
MessageTagHandler *m;
for (m = mtaghandlers; m; m = m->next) {
if(!m->unloaded && m->name[0] == '+'){
}
}
return buf;
}
int tags_rehash_complete(void){
ISupportSet(module, "CLIENTTAGDENY", ct_isupport_param());
return HOOK_CONTINUE;
}