summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/plugins-interface.c6
-rw-r--r--src/plugins/plugins.c10
2 files changed, 13 insertions, 3 deletions
diff --git a/src/plugins/plugins-interface.c b/src/plugins/plugins-interface.c
index 282987dd1..b0d83cdfe 100644
--- a/src/plugins/plugins-interface.c
+++ b/src/plugins/plugins-interface.c
@@ -365,11 +365,11 @@ weechat_plugin_exec_command (t_weechat_plugin *plugin,
else
{
if (ptr_server && ptr_channel)
- user_command (ptr_server, ptr_channel, command);
+ user_command (ptr_server, ptr_channel, command, 0);
else if (ptr_server && (ptr_server->buffer))
- user_command (ptr_server, NULL, command);
+ user_command (ptr_server, NULL, command, 0);
else
- user_command (NULL, NULL, command);
+ user_command (NULL, NULL, command, 0);
}
}
diff --git a/src/plugins/plugins.c b/src/plugins/plugins.c
index 305a64af3..cbd5b276a 100644
--- a/src/plugins/plugins.c
+++ b/src/plugins/plugins.c
@@ -262,6 +262,16 @@ plugin_cmd_handler_add (t_weechat_plugin *plugin, char *command,
WEECHAT_ERROR, plugin->name, command);
return NULL;
}
+
+ if (ascii_strcasecmp (command, "builtin") == 0)
+ {
+ irc_display_prefix (NULL, NULL, PREFIX_ERROR);
+ gui_printf (NULL,
+ _("%s plugin %s: unable to add handler for \"%s\" command "
+ "(forbidden)\n"),
+ WEECHAT_ERROR, plugin->name, command);
+ return NULL;
+ }
new_handler = (t_plugin_handler *)malloc (sizeof (t_plugin_handler));
if (new_handler)