Add change_isupport() to change the value of an ISUPPORT token.
This commit is contained in:
parent
86b6be08eb
commit
474b0d3515
2 changed files with 22 additions and 0 deletions
|
@ -36,6 +36,7 @@
|
||||||
#define INCLUDED_supported_h
|
#define INCLUDED_supported_h
|
||||||
|
|
||||||
extern void add_isupport(const char *, const char *(*)(const void *), const void *);
|
extern void add_isupport(const char *, const char *(*)(const void *), const void *);
|
||||||
|
extern void change_isupport(const char *, const char *(*)(const void *), const void *);
|
||||||
extern void delete_isupport(const char *);
|
extern void delete_isupport(const char *);
|
||||||
extern void show_isupport(struct Client *);
|
extern void show_isupport(struct Client *);
|
||||||
extern void init_isupport(void);
|
extern void init_isupport(void);
|
||||||
|
|
|
@ -111,6 +111,27 @@ add_isupport(const char *name, const char *(*func)(const void *), const void *pa
|
||||||
rb_dlinkAddTail(item, &item->node, &isupportlist);
|
rb_dlinkAddTail(item, &item->node, &isupportlist);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
change_isupport(const char *name, const char *(*func)(const void *), const void *param)
|
||||||
|
{
|
||||||
|
rb_dlink_node *ptr;
|
||||||
|
struct isupportitem *item;
|
||||||
|
|
||||||
|
RB_DLINK_FOREACH(ptr, isupportlist.head)
|
||||||
|
{
|
||||||
|
item = ptr->data;
|
||||||
|
|
||||||
|
if (!strcmp(item->name, name))
|
||||||
|
{
|
||||||
|
item->name = name;
|
||||||
|
item->func = func;
|
||||||
|
item->param = param;
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
delete_isupport(const char *name)
|
delete_isupport(const char *name)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue