1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-06-29 04:56:37 +02:00

Add moddata_client_get_raw() to get the ModData *.

This probably should not be used much as normally you
should not rely on structures created by modules in
other modules / other code.
This commit is contained in:
Bram Matthys
2021-08-17 17:03:00 +02:00
parent 796cac7a63
commit 58abc0da5b
2 changed files with 14 additions and 0 deletions
+13
View File
@@ -360,6 +360,19 @@ char *moddata_client_get(Client *client, char *varname)
return md->serialize(&moddata_client(client, md)); /* can be NULL */
}
/** Get ModData for client (via variable name) */
ModData *moddata_client_get_raw(Client *client, char *varname)
{
ModDataInfo *md;
md = findmoddata_byname(varname, MODDATATYPE_CLIENT);
if (!md)
return NULL;
return &moddata_client(client, md); /* can be NULL */
}
/** Set ModData for LocalClient (via variable name, string value) */
int moddata_local_client_set(Client *client, char *varname, char *value)
{