1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-25 12:26:40 +02:00

Added new return code in plugin API to force highlight (for message handlers only)

This commit is contained in:
Sebastien Helleu
2007-03-06 16:42:39 +00:00
parent 00dd81761f
commit 7b9ef6b56e
16 changed files with 66 additions and 4 deletions
+11
View File
@@ -2228,6 +2228,16 @@ weechat_lua_constant_plugin_rc_ok_ignore_all (lua_State *L)
return 1;
}
static int
weechat_lua_constant_plugin_rc_ok_with_highlight (lua_State *L)
{
/* make C compiler happy */
(void) L;
lua_pushnumber (lua_current_interpreter, PLUGIN_RC_OK_WITH_HIGHLIGHT);
return 1;
}
/*
* Lua subroutines
*/
@@ -2272,6 +2282,7 @@ const struct luaL_reg weechat_lua_funcs[] = {
{ "PLUGIN_RC_OK_IGNORE_WEECHAT", weechat_lua_constant_plugin_rc_ok_ignore_weechat },
{ "PLUGIN_RC_OK_IGNORE_PLUGINS", weechat_lua_constant_plugin_rc_ok_ignore_plugins },
{ "PLUGIN_RC_OK_IGNORE_ALL", weechat_lua_constant_plugin_rc_ok_ignore_all },
{ "PLUGIN_RC_OK_WITH_HIGHLIGHT", weechat_lua_constant_plugin_rc_ok_with_highlight },
{ NULL, NULL }
};
+1
View File
@@ -1940,6 +1940,7 @@ weechat_perl_xs_init (pTHX)
newCONSTSUB (stash, "weechat::PLUGIN_RC_OK_IGNORE_WEECHAT", newSViv (PLUGIN_RC_OK_IGNORE_WEECHAT));
newCONSTSUB (stash, "weechat::PLUGIN_RC_OK_IGNORE_PLUGINS", newSViv (PLUGIN_RC_OK_IGNORE_PLUGINS));
newCONSTSUB (stash, "weechat::PLUGIN_RC_OK_IGNORE_ALL", newSViv (PLUGIN_RC_OK_IGNORE_ALL));
newCONSTSUB (stash, "weechat::PLUGIN_RC_OK_WITH_HIGHLIGHT", newSViv (PLUGIN_RC_OK_WITH_HIGHLIGHT));
}
/*
@@ -2296,6 +2296,7 @@ weechat_python_load (t_weechat_plugin *plugin, char *filename)
PyDict_SetItemString(weechat_dict, "PLUGIN_RC_OK_IGNORE_WEECHAT", PyInt_FromLong((long) PLUGIN_RC_OK_IGNORE_WEECHAT));
PyDict_SetItemString(weechat_dict, "PLUGIN_RC_OK_IGNORE_PLUGINS", PyInt_FromLong((long) PLUGIN_RC_OK_IGNORE_PLUGINS));
PyDict_SetItemString(weechat_dict, "PLUGIN_RC_OK_IGNORE_ALL", PyInt_FromLong((long) PLUGIN_RC_OK_IGNORE_ALL));
PyDict_SetItemString(weechat_dict, "PLUGIN_RC_OK_WITH_HIGHLIGHT", PyInt_FromLong((long) PLUGIN_RC_OK_WITH_HIGHLIGHT));
weechat_outputs = Py_InitModule("weechatOutputs", weechat_python_output_funcs);
if (weechat_outputs == NULL)
+2 -1
View File
@@ -2607,7 +2607,8 @@ weechat_plugin_init (t_weechat_plugin *plugin)
rb_define_const(ruby_mWeechat, "PLUGIN_RC_KO", INT2NUM(PLUGIN_RC_KO));
rb_define_const(ruby_mWeechat, "PLUGIN_RC_OK_IGNORE_WEECHAT", INT2NUM(PLUGIN_RC_OK_IGNORE_WEECHAT));
rb_define_const(ruby_mWeechat, "PLUGIN_RC_OK_IGNORE_PLUGINS", INT2NUM(PLUGIN_RC_OK_IGNORE_PLUGINS));
rb_define_const(ruby_mWeechat, "PLUGIN_RC_OK_IGNORE_ALL", INT2NUM(PLUGIN_RC_OK_IGNORE_ALL));
rb_define_const(ruby_mWeechat, "PLUGIN_RC_OK_IGNORE_ALL", INT2NUM(PLUGIN_RC_OK_IGNORE_ALL));
rb_define_const(ruby_mWeechat, "PLUGIN_RC_OK_WITH_HIGHLIGHT", INT2NUM(PLUGIN_RC_OK_WITH_HIGHLIGHT));
rb_define_module_function (ruby_mWeechat, "register", weechat_ruby_register, -1);
rb_define_module_function (ruby_mWeechat, "set_charset", weechat_ruby_set_charset, 1);
rb_define_module_function (ruby_mWeechat, "print", weechat_ruby_print, -1);