mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-06-28 07:16:38 +02:00
- Changed IRCCommand::friend into IRCCommand::partner
This commit is contained in:
@@ -1688,3 +1688,5 @@ MOTDs
|
||||
functions above) if DISABLE_STACKED_EXTBANS is #defined (this is controled by Config). Modules will
|
||||
not compile/load if they try to use them anyway.
|
||||
This change should not break extban modules, and should need some more extensive testing.
|
||||
- Removed some more confusion in source (module IRC commands vs IRC commands)
|
||||
- Changed IRCCommand::friend into IRCCommand::partner
|
||||
|
||||
+3
-3
@@ -142,7 +142,7 @@ typedef struct ListOptions LOpts;
|
||||
typedef struct FloodOpt aFloodOpt;
|
||||
typedef struct MotdItem aMotd;
|
||||
typedef struct trecord aTrecord;
|
||||
typedef struct Command aCommand;
|
||||
typedef struct IRCCommand aCommand;
|
||||
typedef struct _cmdoverride Cmdoverride;
|
||||
typedef struct SMember Member;
|
||||
typedef struct SMembership Membership;
|
||||
@@ -1732,7 +1732,7 @@ extern MODVAR char *gnulicense[];
|
||||
#endif
|
||||
#define EVENT_HASHES EVENT_DRUGS
|
||||
#include "events.h"
|
||||
struct Command {
|
||||
struct IRCCommand {
|
||||
aCommand *prev, *next;
|
||||
char *cmd;
|
||||
int (*func) ();
|
||||
@@ -1741,7 +1741,7 @@ struct Command {
|
||||
unsigned parameters : 5;
|
||||
unsigned long bytes;
|
||||
Module *owner;
|
||||
aCommand *friend; /* cmd if token, token if cmd */
|
||||
aCommand *partner; /* cmd if token, token if cmd */
|
||||
Cmdoverride *overriders;
|
||||
Cmdoverride *overridetail;
|
||||
#ifdef DEBUGMODE
|
||||
|
||||
+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