diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2006-03-21 11:41:02 +0000 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2006-03-21 11:41:02 +0000 |
commit | 27fd4beca7b46c87cd77c7ba5a9c9382a7bca8eb (patch) | |
tree | ff756671526ca78c337b9eb94ee57b910f1b2788 /src/plugins | |
parent | 6a55ee4f793bfdd678a76668e4d99426e8dfd508 (diff) | |
download | weechat-27fd4beca7b46c87cd77c7ba5a9c9382a7bca8eb.zip |
Aliases are executed before WeeChat/IRC commands, /builtin command added
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/plugins-interface.c | 6 | ||||
-rw-r--r-- | src/plugins/plugins.c | 10 |
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) |