mirror of
https://github.com/weechat/weechat.git
synced 2026-06-28 05:46:38 +02:00
core: limit hook_command_run to the exact given command (when no "*" are in command hook)
This commit is contained in:
+6
-3
@@ -1013,9 +1013,12 @@ hook_command_run_exec (struct t_gui_buffer *buffer, const char *command)
|
||||
if (!hook_matching
|
||||
&& !strchr (HOOK_COMMAND_RUN(ptr_hook, command), ' '))
|
||||
{
|
||||
hook_matching = (string_strncasecmp (ptr_command,
|
||||
HOOK_COMMAND_RUN(ptr_hook, command),
|
||||
utf8_strlen (HOOK_COMMAND_RUN(ptr_hook, command))) == 0);
|
||||
length = strlen (HOOK_COMMAND_RUN(ptr_hook, command));
|
||||
hook_matching = ((string_strncasecmp (ptr_command,
|
||||
HOOK_COMMAND_RUN(ptr_hook, command),
|
||||
utf8_strlen (HOOK_COMMAND_RUN(ptr_hook, command))) == 0)
|
||||
&& ((ptr_command[length] == ' ')
|
||||
|| (ptr_command[length] == '\0')));
|
||||
}
|
||||
|
||||
if (hook_matching)
|
||||
|
||||
Reference in New Issue
Block a user