1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-03 14:53:12 +02:00

ModData: moddata_localvar -> moddata_local_variable,

moddata_globalvar -> moddata_global_variable,
and the just-added moddata_localclient -> moddata_local_client
..all this so it's more consistent
This commit is contained in:
Bram Matthys
2019-09-15 09:47:54 +02:00
parent b2f32c1746
commit ffe5abe30b
9 changed files with 92 additions and 92 deletions
+4 -4
View File
@@ -216,16 +216,16 @@ CMD_FUNC(cmd_md)
if (!strcmp(type, "globalvar"))
{
/* objname is ignored */
md = findmoddata_byname(varname, MODDATATYPE_GLOBALVAR);
md = findmoddata_byname(varname, MODDATATYPE_GLOBAL_VARIABLE);
if (!md || !md->unserialize)
return 0;
if (value)
md->unserialize(value, &moddata_globalvar(md));
md->unserialize(value, &moddata_global_variable(md));
else
{
if (md->free)
md->free(&moddata_globalvar(md));
memset(&moddata_globalvar(md), 0, sizeof(ModData));
md->free(&moddata_global_variable(md));
memset(&moddata_global_variable(md), 0, sizeof(ModData));
}
/* Pass on to other servers */
broadcast_md_globalvar_cmd(cptr, sptr, varname, value);
+4 -4
View File
@@ -46,7 +46,7 @@ struct Silence
ModDataInfo *silence_md = NULL;
/* Macros */
#define SILENCELIST(x) ((Silence *)moddata_localclient(x, silence_md).ptr)
#define SILENCELIST(x) ((Silence *)moddata_local_client(x, silence_md).ptr)
/* Forward declarations */
int _is_silenced(Client *, Client *);
@@ -71,7 +71,7 @@ MOD_INIT()
memset(&mreq, 0, sizeof(mreq));
mreq.name = "silence";
mreq.type = MODDATATYPE_LOCALCLIENT;
mreq.type = MODDATATYPE_LOCAL_CLIENT;
mreq.free = silence_md_free;
silence_md = ModDataAdd(modinfo->handle, mreq);
if (!silence_md)
@@ -159,7 +159,7 @@ int _del_silence(Client *sptr, const char *mask)
{
if (mycmp(mask, s->mask) == 0)
{
DelListItemUnchecked(s, moddata_localclient(sptr, silence_md).ptr);
DelListItemUnchecked(s, moddata_local_client(sptr, silence_md).ptr);
safe_free(s);
return 1;
}
@@ -199,7 +199,7 @@ int _add_silence(Client *sptr, const char *mask, int senderr)
/* Add the new entry */
s = safe_alloc(sizeof(Silence)+strlen(mask));
strcpy(s->mask, mask); /* safe, allocated above */
AddListItemUnchecked(s, moddata_localclient(sptr, silence_md).ptr);
AddListItemUnchecked(s, moddata_local_client(sptr, silence_md).ptr);
return 0;
}