mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-03 01:03:12 +02:00
- Changed IRCCommand::friend into IRCCommand::partner
This commit is contained in:
+3
-3
@@ -58,12 +58,12 @@ Command *CommandAdd(Module *module, char *cmd, char *tok, int (*func)(), unsigne
|
||||
command->cmd->owner = module;
|
||||
if (tok) {
|
||||
command->tok = add_Command_backend(tok,func,params,1,flags);
|
||||
command->cmd->friend = command->tok;
|
||||
command->tok->friend = command->cmd;
|
||||
command->cmd->partner = command->tok;
|
||||
command->tok->partner = command->cmd;
|
||||
command->tok->owner = module;
|
||||
}
|
||||
else
|
||||
command->cmd->friend = NULL;
|
||||
command->cmd->partner = NULL;
|
||||
if (module) {
|
||||
ModuleObject *cmdobj = (ModuleObject *)MyMallocEx(sizeof(ModuleObject));
|
||||
cmdobj->object.command = command;
|
||||
|
||||
+7
-7
@@ -1480,11 +1480,11 @@ Cmdoverride *CmdoverrideAdd(Module *module, char *name, iFP function)
|
||||
if (!p->overriders)
|
||||
p->overridetail = ovr;
|
||||
AddListItem(ovr, p->overriders);
|
||||
if (p->friend)
|
||||
if (p->partner)
|
||||
{
|
||||
if (!p->friend->overriders)
|
||||
p->friend->overridetail = ovr;
|
||||
AddListItem(ovr, p->friend->overriders);
|
||||
if (!p->partner->overriders)
|
||||
p->partner->overridetail = ovr;
|
||||
AddListItem(ovr, p->partner->overriders);
|
||||
}
|
||||
return ovr;
|
||||
}
|
||||
@@ -1496,11 +1496,11 @@ void CmdoverrideDel(Cmdoverride *cmd)
|
||||
DelListItem(cmd, cmd->command->overriders);
|
||||
if (!cmd->command->overriders)
|
||||
cmd->command->overridetail = NULL;
|
||||
if (cmd->command->friend)
|
||||
if (cmd->command->partner)
|
||||
{
|
||||
if (!cmd->prev)
|
||||
cmd->command->friend->overridetail = NULL;
|
||||
DelListItem(cmd, cmd->command->friend->overriders);
|
||||
cmd->command->partner->overridetail = NULL;
|
||||
DelListItem(cmd, cmd->command->partner->overriders);
|
||||
}
|
||||
if (cmd->owner)
|
||||
{
|
||||
|
||||
+6
-6
@@ -283,11 +283,11 @@ void add_Command(char *name, char *token, int (*func)(), unsigned char parameter
|
||||
if (token)
|
||||
{
|
||||
tok = add_Command_backend(token, func, parameters, 1, 0);
|
||||
tok->friend = cmd;
|
||||
cmd->friend = tok;
|
||||
tok->partner = cmd;
|
||||
cmd->partner = tok;
|
||||
}
|
||||
else
|
||||
cmd->friend = NULL;
|
||||
cmd->partner = NULL;
|
||||
}
|
||||
|
||||
void add_CommandX(char *name, char *token, int (*func)(), unsigned char parameters, int flags)
|
||||
@@ -297,11 +297,11 @@ void add_CommandX(char *name, char *token, int (*func)(), unsigned char param
|
||||
if (token != NULL)
|
||||
{
|
||||
tok = add_Command_backend(token, func, parameters, 1, flags);
|
||||
tok->friend = cmd;
|
||||
cmd->friend = tok;
|
||||
tok->partner = cmd;
|
||||
cmd->partner = tok;
|
||||
}
|
||||
else
|
||||
cmd->friend = NULL;
|
||||
cmd->partner = NULL;
|
||||
}
|
||||
|
||||
inline aCommand *find_CommandEx(char *cmd, int (*func)(), int token)
|
||||
|
||||
Reference in New Issue
Block a user