summaryrefslogtreecommitdiff
path: root/src/acl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/acl.c')
-rw-r--r--src/acl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/acl.c b/src/acl.c
index 6773403bd..e5dcf56b9 100644
--- a/src/acl.c
+++ b/src/acl.c
@@ -2518,8 +2518,8 @@ void addACLLogEntry(client *c, int reason, int context, int argpos, sds username
}
}
- client *realclient = c;
- if (realclient->flags & CLIENT_SCRIPT) realclient = server.script_caller;
+ /* if we have a real client from the network, use it (could be missing on module timers) */
+ client *realclient = server.current_client? server.current_client : c;
le->cinfo = catClientInfoString(sdsempty(),realclient);
le->context = context;