diff options
Diffstat (limited to 'src/plugins')
16 files changed, 53 insertions, 53 deletions
diff --git a/src/plugins/scripts/CMakeLists.txt b/src/plugins/scripts/CMakeLists.txt index 89e995542..ad6865020 100644 --- a/src/plugins/scripts/CMakeLists.txt +++ b/src/plugins/scripts/CMakeLists.txt @@ -14,12 +14,26 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # -SET(LIB_SCRIPTS_SRC weechat-script.c weechat-script.h) +SET(LIB_SCRIPTS_SRC script.c script.h) ADD_DEFINITIONS(${CMAKE_SHARED_LIBRARY_C_FLAGS}) INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}) ADD_LIBRARY(weechat_scripts STATIC ${LIB_SCRIPTS_SRC}) +IF(NOT DISABLE_PERL) + FIND_PACKAGE(Perl) + IF(PERL_FOUND) + ADD_SUBDIRECTORY( perl ) + ENDIF(PERL_FOUND) +ENDIF(NOT DISABLE_PERL) + +IF(NOT DISABLE_PYTHON) + FIND_PACKAGE(Python) + IF(PYTHON_FOUND) + ADD_SUBDIRECTORY( python ) + ENDIF(PYTHON_FOUND) +ENDIF(NOT DISABLE_PYTHON) + IF(NOT DISABLE_RUBY) FIND_PACKAGE(Ruby) IF(RUBY_FOUND) @@ -33,17 +47,3 @@ IF(NOT DISABLE_LUA) ADD_SUBDIRECTORY( lua ) ENDIF(LUA_FOUND) ENDIF(NOT DISABLE_LUA) - -IF(NOT DISABLE_PYTHON) - FIND_PACKAGE(Python) - IF(PYTHON_FOUND) - ADD_SUBDIRECTORY( python ) - ENDIF(PYTHON_FOUND) -ENDIF(NOT DISABLE_PYTHON) - -IF(NOT DISABLE_PERL) - FIND_PACKAGE(Perl) - IF(PERL_FOUND) - ADD_SUBDIRECTORY( perl ) - ENDIF(PERL_FOUND) -ENDIF(NOT DISABLE_PERL) diff --git a/src/plugins/scripts/Makefile.am b/src/plugins/scripts/Makefile.am index b1f2d97ef..9135415fb 100644 --- a/src/plugins/scripts/Makefile.am +++ b/src/plugins/scripts/Makefile.am @@ -18,8 +18,8 @@ INCLUDES = -DLOCALEDIR=\"$(datadir)/locale\" noinst_LTLIBRARIES = lib_weechat_plugins_scripts.la -lib_weechat_plugins_scripts_la_SOURCES = weechat-script.h \ - weechat-script.c +lib_weechat_plugins_scripts_la_SOURCES = script.c \ + script.h if PLUGIN_PERL perl_dir = perl diff --git a/src/plugins/scripts/lua/CMakeLists.txt b/src/plugins/scripts/lua/CMakeLists.txt index a59ea35bf..ddd21bf16 100644 --- a/src/plugins/scripts/lua/CMakeLists.txt +++ b/src/plugins/scripts/lua/CMakeLists.txt @@ -14,7 +14,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # -ADD_LIBRARY(lua MODULE weechat-lua.c) +ADD_LIBRARY(lua MODULE lua.c) SET_TARGET_PROPERTIES(lua PROPERTIES PREFIX "") IF(LUA_FOUND) diff --git a/src/plugins/scripts/lua/Makefile.am b/src/plugins/scripts/lua/Makefile.am index b928b7d0c..c2cdb5f95 100644 --- a/src/plugins/scripts/lua/Makefile.am +++ b/src/plugins/scripts/lua/Makefile.am @@ -20,6 +20,6 @@ libdir = ${weechat_libdir}/plugins lib_LTLIBRARIES = lua.la -lua_la_SOURCES = weechat-lua.c +lua_la_SOURCES = lua.c lua_la_LDFLAGS = -module lua_la_LIBADD = ../lib_weechat_plugins_scripts.la $(LUA_LFLAGS) diff --git a/src/plugins/scripts/lua/weechat-lua.c b/src/plugins/scripts/lua/lua.c index 15ee43e95..572f71269 100644 --- a/src/plugins/scripts/lua/weechat-lua.c +++ b/src/plugins/scripts/lua/lua.c @@ -2644,18 +2644,18 @@ weechat_lua_cmd (t_weechat_plugin *plugin, plugin->print_server (plugin, " (none)"); break; case 1: - if (plugin->ascii_strcasecmp (plugin, argv[0], "autoload") == 0) + if (plugin->strcasecmp (plugin, argv[0], "autoload") == 0) weechat_script_auto_load (plugin, "lua", weechat_lua_load); - else if (plugin->ascii_strcasecmp (plugin, argv[0], "reload") == 0) + else if (plugin->strcasecmp (plugin, argv[0], "reload") == 0) { weechat_lua_unload_all (plugin); weechat_script_auto_load (plugin, "lua", weechat_lua_load); } - else if (plugin->ascii_strcasecmp (plugin, argv[0], "unload") == 0) + else if (plugin->strcasecmp (plugin, argv[0], "unload") == 0) weechat_lua_unload_all (plugin); break; case 2: - if (plugin->ascii_strcasecmp (plugin, argv[0], "load") == 0) + if (plugin->strcasecmp (plugin, argv[0], "load") == 0) { /* load Lua script */ path_script = weechat_script_search_full_name (plugin, "lua", argv[1]); @@ -2663,7 +2663,7 @@ weechat_lua_cmd (t_weechat_plugin *plugin, if (path_script) free (path_script); } - else if (plugin->ascii_strcasecmp (plugin, argv[0], "unload") == 0) + else if (plugin->strcasecmp (plugin, argv[0], "unload") == 0) { /* unload Lua script */ weechat_lua_unload_name (plugin, argv[1]); diff --git a/src/plugins/scripts/perl/CMakeLists.txt b/src/plugins/scripts/perl/CMakeLists.txt index f0b597b31..6794af2f3 100644 --- a/src/plugins/scripts/perl/CMakeLists.txt +++ b/src/plugins/scripts/perl/CMakeLists.txt @@ -14,7 +14,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # -ADD_LIBRARY(perl MODULE weechat-perl.c) +ADD_LIBRARY(perl MODULE perl.c) SET_TARGET_PROPERTIES(perl PROPERTIES PREFIX "") diff --git a/src/plugins/scripts/perl/Makefile.am b/src/plugins/scripts/perl/Makefile.am index e7310ab67..62635fd9f 100644 --- a/src/plugins/scripts/perl/Makefile.am +++ b/src/plugins/scripts/perl/Makefile.am @@ -20,6 +20,6 @@ libdir = ${weechat_libdir}/plugins lib_LTLIBRARIES = perl.la -perl_la_SOURCES = weechat-perl.c +perl_la_SOURCES = perl.c perl_la_LDFLAGS = -module perl_la_LIBADD = ../lib_weechat_plugins_scripts.la $(PERL_LFLAGS) diff --git a/src/plugins/scripts/perl/weechat-perl.c b/src/plugins/scripts/perl/perl.c index 748b47e3f..867257545 100644 --- a/src/plugins/scripts/perl/weechat-perl.c +++ b/src/plugins/scripts/perl/perl.c @@ -2327,18 +2327,18 @@ weechat_perl_cmd (t_weechat_plugin *plugin, break; case 1: - if (plugin->ascii_strcasecmp (plugin, argv[0], "autoload") == 0) + if (plugin->strcasecmp (plugin, argv[0], "autoload") == 0) weechat_script_auto_load (plugin, "perl", weechat_perl_load); - else if (plugin->ascii_strcasecmp (plugin, argv[0], "reload") == 0) + else if (plugin->strcasecmp (plugin, argv[0], "reload") == 0) { weechat_perl_unload_all (plugin); weechat_script_auto_load (plugin, "perl", weechat_perl_load); } - else if (plugin->ascii_strcasecmp (plugin, argv[0], "unload") == 0) + else if (plugin->strcasecmp (plugin, argv[0], "unload") == 0) weechat_perl_unload_all (plugin); break; case 2: - if (plugin->ascii_strcasecmp (plugin, argv[0], "load") == 0) + if (plugin->strcasecmp (plugin, argv[0], "load") == 0) { /* load Perl script */ path_script = weechat_script_search_full_name (plugin, "perl", argv[1]); @@ -2346,7 +2346,7 @@ weechat_perl_cmd (t_weechat_plugin *plugin, if (path_script) free (path_script); } - else if (plugin->ascii_strcasecmp (plugin, argv[0], "unload") == 0) + else if (plugin->strcasecmp (plugin, argv[0], "unload") == 0) { /* unload Perl script */ weechat_perl_unload_name (plugin, argv[1]); diff --git a/src/plugins/scripts/python/CMakeLists.txt b/src/plugins/scripts/python/CMakeLists.txt index 2cde978bf..4815a4e01 100644 --- a/src/plugins/scripts/python/CMakeLists.txt +++ b/src/plugins/scripts/python/CMakeLists.txt @@ -14,7 +14,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # -ADD_LIBRARY(python MODULE weechat-python.c) +ADD_LIBRARY(python MODULE python.c) SET_TARGET_PROPERTIES(python PROPERTIES PREFIX "") diff --git a/src/plugins/scripts/python/Makefile.am b/src/plugins/scripts/python/Makefile.am index e604b536b..f59727f00 100644 --- a/src/plugins/scripts/python/Makefile.am +++ b/src/plugins/scripts/python/Makefile.am @@ -20,6 +20,6 @@ libdir = ${weechat_libdir}/plugins lib_LTLIBRARIES = python.la -python_la_SOURCES = weechat-python.c +python_la_SOURCES = python.c python_la_LDFLAGS = -module python_la_LIBADD = ../lib_weechat_plugins_scripts.la $(PYTHON_LFLAGS) diff --git a/src/plugins/scripts/python/weechat-python.c b/src/plugins/scripts/python/python.c index f079572ce..ab939ec36 100644 --- a/src/plugins/scripts/python/weechat-python.c +++ b/src/plugins/scripts/python/python.c @@ -2604,18 +2604,18 @@ weechat_python_cmd (t_weechat_plugin *plugin, break; case 1: - if (plugin->ascii_strcasecmp (plugin, argv[0], "autoload") == 0) + if (plugin->strcasecmp (plugin, argv[0], "autoload") == 0) weechat_script_auto_load (plugin, "python", weechat_python_load); - else if (plugin->ascii_strcasecmp (plugin, argv[0], "reload") == 0) + else if (plugin->strcasecmp (plugin, argv[0], "reload") == 0) { weechat_python_unload_all (plugin); weechat_script_auto_load (plugin, "python", weechat_python_load); } - else if (plugin->ascii_strcasecmp (plugin, argv[0], "unload") == 0) + else if (plugin->strcasecmp (plugin, argv[0], "unload") == 0) weechat_python_unload_all (plugin); break; case 2: - if (plugin->ascii_strcasecmp (plugin, argv[0], "load") == 0) + if (plugin->strcasecmp (plugin, argv[0], "load") == 0) { /* load Python script */ path_script = weechat_script_search_full_name (plugin, "python", argv[1]); @@ -2623,7 +2623,7 @@ weechat_python_cmd (t_weechat_plugin *plugin, if (path_script) free (path_script); } - else if (plugin->ascii_strcasecmp (plugin, argv[0], "unload") == 0) + else if (plugin->strcasecmp (plugin, argv[0], "unload") == 0) { /* unload Python script */ weechat_python_unload_name (plugin, argv[1]); diff --git a/src/plugins/scripts/ruby/CMakeLists.txt b/src/plugins/scripts/ruby/CMakeLists.txt index 257aa00cd..d185c4767 100644 --- a/src/plugins/scripts/ruby/CMakeLists.txt +++ b/src/plugins/scripts/ruby/CMakeLists.txt @@ -14,7 +14,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # -ADD_LIBRARY(ruby MODULE weechat-ruby.c) +ADD_LIBRARY(ruby MODULE ruby.c) SET_TARGET_PROPERTIES(ruby PROPERTIES PREFIX "") diff --git a/src/plugins/scripts/ruby/Makefile.am b/src/plugins/scripts/ruby/Makefile.am index 4cb489e7f..951702538 100644 --- a/src/plugins/scripts/ruby/Makefile.am +++ b/src/plugins/scripts/ruby/Makefile.am @@ -20,6 +20,6 @@ libdir = ${weechat_libdir}/plugins lib_LTLIBRARIES = ruby.la -ruby_la_SOURCES = weechat-ruby.c +ruby_la_SOURCES = ruby.c ruby_la_LDFLAGS = -module ruby_la_LIBADD = ../lib_weechat_plugins_scripts.la $(RUBY_LFLAGS) diff --git a/src/plugins/scripts/ruby/weechat-ruby.c b/src/plugins/scripts/ruby/ruby.c index c50d51e82..c17c8c43e 100644 --- a/src/plugins/scripts/ruby/weechat-ruby.c +++ b/src/plugins/scripts/ruby/ruby.c @@ -2500,18 +2500,18 @@ weechat_ruby_cmd (t_weechat_plugin *plugin, plugin->print_server (plugin, " (none)"); break; case 1: - if (plugin->ascii_strcasecmp (plugin, argv[0], "autoload") == 0) + if (plugin->strcasecmp (plugin, argv[0], "autoload") == 0) weechat_script_auto_load (plugin, "ruby", weechat_ruby_load); - else if (plugin->ascii_strcasecmp (plugin, argv[0], "reload") == 0) + else if (plugin->strcasecmp (plugin, argv[0], "reload") == 0) { weechat_ruby_unload_all (plugin); weechat_script_auto_load (plugin, "ruby", weechat_ruby_load); } - else if (plugin->ascii_strcasecmp (plugin, argv[0], "unload") == 0) + else if (plugin->strcasecmp (plugin, argv[0], "unload") == 0) weechat_ruby_unload_all (plugin); break; case 2: - if (plugin->ascii_strcasecmp (plugin, argv[0], "load") == 0) + if (plugin->strcasecmp (plugin, argv[0], "load") == 0) { /* load Ruby script */ path_script = weechat_script_search_full_name (plugin, "ruby", argv[1]); @@ -2519,7 +2519,7 @@ weechat_ruby_cmd (t_weechat_plugin *plugin, if (path_script) free (path_script); } - else if (plugin->ascii_strcasecmp (plugin, argv[0], "unload") == 0) + else if (plugin->strcasecmp (plugin, argv[0], "unload") == 0) { /* unload Ruby script */ weechat_ruby_unload_name (plugin, argv[1]); diff --git a/src/plugins/scripts/weechat-script.c b/src/plugins/scripts/script.c index 8f0024912..b091f4d33 100644 --- a/src/plugins/scripts/weechat-script.c +++ b/src/plugins/scripts/script.c @@ -76,7 +76,7 @@ weechat_script_search (t_weechat_plugin *plugin, for (ptr_script = *list; ptr_script; ptr_script = ptr_script->next_script) { - if (plugin->ascii_strcasecmp (plugin, ptr_script->name, name) == 0) + if (plugin->strcasecmp (plugin, ptr_script->name, name) == 0) return ptr_script; } @@ -447,8 +447,8 @@ weechat_script_remove_handler (t_weechat_plugin *plugin, if ((ptr_arg1) && ((t_plugin_script *)ptr_handler->handler_pointer == script) - && (plugin->ascii_strcasecmp (plugin, ptr_arg1, arg1) == 0) - && (plugin->ascii_strcasecmp (plugin, ptr_handler->handler_args, arg2) == 0)) + && (plugin->strcasecmp (plugin, ptr_arg1, arg1) == 0) + && (plugin->strcasecmp (plugin, ptr_handler->handler_args, arg2) == 0)) { next_handler = ptr_handler->next_handler; plugin->handler_remove (plugin, ptr_handler); @@ -476,7 +476,7 @@ weechat_script_remove_timer_handler (t_weechat_plugin *plugin, { if ((ptr_handler->type == PLUGIN_HANDLER_TIMER) && ((t_plugin_script *)ptr_handler->handler_pointer == script) - && (plugin->ascii_strcasecmp (plugin, ptr_handler->handler_args, function) == 0)) + && (plugin->strcasecmp (plugin, ptr_handler->handler_args, function) == 0)) { next_handler = ptr_handler->next_handler; plugin->handler_remove (plugin, ptr_handler); @@ -504,7 +504,7 @@ weechat_script_remove_keyboard_handler (t_weechat_plugin *plugin, { if ((ptr_handler->type == PLUGIN_HANDLER_KEYBOARD) && ((t_plugin_script *)ptr_handler->handler_pointer == script) - && (plugin->ascii_strcasecmp (plugin, ptr_handler->handler_args, function) == 0)) + && (plugin->strcasecmp (plugin, ptr_handler->handler_args, function) == 0)) { next_handler = ptr_handler->next_handler; plugin->handler_remove (plugin, ptr_handler); @@ -532,7 +532,7 @@ weechat_script_remove_event_handler (t_weechat_plugin *plugin, { if ((ptr_handler->type == PLUGIN_HANDLER_EVENT) && ((t_plugin_script *)ptr_handler->handler_pointer == script) - && (plugin->ascii_strcasecmp (plugin, ptr_handler->handler_args, function) == 0)) + && (plugin->strcasecmp (plugin, ptr_handler->handler_args, function) == 0)) { next_handler = ptr_handler->next_handler; plugin->handler_remove (plugin, ptr_handler); @@ -576,8 +576,8 @@ weechat_script_remove_modifier (t_weechat_plugin *plugin, if ((ptr_arg2) && ((t_plugin_script *)ptr_modifier->modifier_pointer == script) - && (plugin->ascii_strcasecmp (plugin, ptr_arg2, arg2) == 0) - && (plugin->ascii_strcasecmp (plugin, ptr_modifier->modifier_args, arg3) == 0)) + && (plugin->strcasecmp (plugin, ptr_arg2, arg2) == 0) + && (plugin->strcasecmp (plugin, ptr_modifier->modifier_args, arg3) == 0)) { next_modifier = ptr_modifier->next_modifier; plugin->modifier_remove (plugin, ptr_modifier); diff --git a/src/plugins/scripts/weechat-script.h b/src/plugins/scripts/script.h index 87b1cad97..87b1cad97 100644 --- a/src/plugins/scripts/weechat-script.h +++ b/src/plugins/scripts/script.h |