Add change_isupport() to change the value of an ISUPPORT token.
This commit is contained in:
parent
9ac19244c0
commit
17ad49a96a
|
@ -36,6 +36,7 @@
|
|||
#define INCLUDED_supported_h
|
||||
|
||||
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 show_isupport(struct Client *);
|
||||
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);
|
||||
}
|
||||
|
||||
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
|
||||
delete_isupport(const char *name)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue