mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 23:05:10 +00:00
[MOD/WIP] Externalise and add errors to commands
Still need forms...
This commit is contained in:
parent
408888ef67
commit
a880769c48
9 changed files with 311 additions and 89 deletions
|
|
@ -108,13 +108,13 @@ XMPPCommandRequiresForm(XMPPCommand *cmd)
|
|||
return cmd ? !!cmd->options : false;
|
||||
}
|
||||
void
|
||||
XMPPExecuteCommand(XMPPCommandManager *m, XMPPCommand *cmd, XMLElement *to, HashMap *arg_table)
|
||||
XMPPExecuteCommand(XMPPCommandManager *m, XMPPCommand *cmd, char *from, XMLElement *to, HashMap *arg_table)
|
||||
{
|
||||
if (!m || !cmd || !to)
|
||||
if (!m || !cmd || !from || !to)
|
||||
{
|
||||
return;
|
||||
}
|
||||
cmd->callback(m, arg_table, to);
|
||||
cmd->callback(m, from, arg_table, to);
|
||||
|
||||
/* TODO Free arg_table's strings */
|
||||
HashMapFree(arg_table);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue