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

Remove 'cptr' from all commands, hooks, etc. It only confuses people and

'sptr' is sufficient and in most cases the only one you should care about.
Should you need it, you can access sptr->direction in cases where you
need the old information (usually only for some sendto_* functions
and some protoctl checks), so 'cptr' was redundant too.

[!] This change likely introduces some bugs. This was many hours of work.
I only cut some corners in 4 functions, which will be fixed at a later
stage..... yes, more major changes to come.

On the plus side, I likely fixed some bugs in the process. Situations
where cptr vs sptr usage was incorrect. Eg using cptr->name (near server)
when sptr->name should be used (the actual source server), etc....
This commit is contained in:
Bram Matthys
2019-10-02 14:25:40 +02:00
parent 396ae3f218
commit 4ac8015f84
109 changed files with 918 additions and 1091 deletions
+1 -1
View File
@@ -80,7 +80,7 @@ CMD_FUNC(cmd_batch)
Client *acptr;
char buf[512];
if (!IsServer(cptr) || (parc < 3))
if (MyUser(sptr) || (parc < 3))
return 0;
acptr = find_client(parv[1], NULL);