From 38f1bc08374b8e6a5c67f21ca079c75c255c4560 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Fri, 12 Jun 2009 16:02:40 +0200 Subject: [PATCH] Remove variable with "WeeChat required version" in plugins, do not compare version any more (API comparison is enough) --- po/cs.po | 18 ++-- po/de.po | 18 ++-- po/es.po | 18 ++-- po/fr.po | 25 +----- po/hu.po | 18 ++-- po/pl.po | 8 +- po/ru.po | 18 ++-- po/weechat.pot | 8 +- src/core/wee-util.c | 96 --------------------- src/core/wee-util.h | 2 - src/plugins/alias/alias.c | 1 - src/plugins/aspell/weechat-aspell.c | 1 - src/plugins/charset/charset.c | 1 - src/plugins/demo/demo.c | 1 - src/plugins/fifo/fifo.c | 1 - src/plugins/irc/irc.c | 1 - src/plugins/jabber/jabber.c | 1 - src/plugins/logger/logger.c | 1 - src/plugins/plugin.c | 35 +------- src/plugins/relay/relay.c | 1 - src/plugins/scripts/lua/weechat-lua.c | 1 - src/plugins/scripts/perl/weechat-perl.c | 1 - src/plugins/scripts/python/weechat-python.c | 1 - src/plugins/scripts/ruby/weechat-ruby.c | 1 - src/plugins/scripts/tcl/weechat-tcl.c | 1 - src/plugins/trigger/trigger.c | 1 - src/plugins/weechat-plugin.h | 5 +- src/plugins/xfer/xfer.c | 1 - 28 files changed, 51 insertions(+), 234 deletions(-) diff --git a/po/cs.po b/po/cs.po index ac7e35911..a66bc1a81 100644 --- a/po/cs.po +++ b/po/cs.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-06-11 19:00+0200\n" +"POT-Creation-Date: 2009-06-12 16:00+0200\n" "PO-Revision-Date: 2009-05-11 13:02+0200\n" "Last-Translator: Jiri Golembiovsky \n" "Language-Team: weechat-dev \n" @@ -5033,14 +5033,6 @@ msgid "" msgstr "" "%s nemohu načíst plugin \"%s\": plugin se stejným jménem již existuje\n" -#, fuzzy, c-format -msgid "" -"%sError: plugin \"%s\" is compiled for WeeChat %s and you are running " -"version %s, failed to load" -msgstr "" -"%s funkce \"weechat_plugin_init\" nebyla v pluginu \"%s\" nalezena, načtení " -"selhalo\n" - #, fuzzy, c-format msgid "%sError: function \"%s\" not found in plugin \"%s\", failed to load" msgstr "" @@ -5852,6 +5844,14 @@ msgstr "%s DCC: nemohu nastavit 'neblokovaci' volbu na soket\n" msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s chybí argument pro volbu \"%s\"\n" +#, fuzzy +#~ msgid "" +#~ "%sError: plugin \"%s\" is compiled for WeeChat %s and you are running " +#~ "version %s, failed to load" +#~ msgstr "" +#~ "%s funkce \"weechat_plugin_init\" nebyla v pluginu \"%s\" nalezena, " +#~ "načtení selhalo\n" + #, fuzzy #~ msgid "" #~ "port number (or range of ports) that relay plugin listens on (syntax: a " diff --git a/po/de.po b/po/de.po index e8021ef2f..b5f211ceb 100644 --- a/po/de.po +++ b/po/de.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-06-11 19:00+0200\n" +"POT-Creation-Date: 2009-06-12 16:00+0200\n" "PO-Revision-Date: 2009-05-11 13:02+0200\n" "Last-Translator: Thomas Schuetz \n" "Language-Team: weechat-dev \n" @@ -4987,14 +4987,6 @@ msgstr "" "%s kann Plugin \"%s\" nicht laden: ein gleichnamiges Plugin existiert " "bereits\n" -#, fuzzy, c-format -msgid "" -"%sError: plugin \"%s\" is compiled for WeeChat %s and you are running " -"version %s, failed to load" -msgstr "" -"%s Funktion \"weechat_plugin_init\" nicht in Plugin \"%s\" gefunden Laden " -"gescheitert\n" - #, fuzzy, c-format msgid "%sError: function \"%s\" not found in plugin \"%s\", failed to load" msgstr "" @@ -5793,6 +5785,14 @@ msgstr "%s DCC: kann die 'nonblock'-Option für den Socket nicht festlegen\n" msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s fehlende Argumente für die \"--dir\"-Option\n" +#, fuzzy +#~ msgid "" +#~ "%sError: plugin \"%s\" is compiled for WeeChat %s and you are running " +#~ "version %s, failed to load" +#~ msgstr "" +#~ "%s Funktion \"weechat_plugin_init\" nicht in Plugin \"%s\" gefunden Laden " +#~ "gescheitert\n" + #, fuzzy #~ msgid "" #~ "port number (or range of ports) that relay plugin listens on (syntax: a " diff --git a/po/es.po b/po/es.po index a9d6e04b0..1291d55f1 100644 --- a/po/es.po +++ b/po/es.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-06-11 19:00+0200\n" +"POT-Creation-Date: 2009-06-12 16:00+0200\n" "PO-Revision-Date: 2009-05-11 13:02+0200\n" "Last-Translator: Roberto González Cardenete \n" "Language-Team: weechat-dev \n" @@ -4976,14 +4976,6 @@ msgstr "" "%s no ha sido posible cargar el plugin \"%s\": un plugin con el mismo nombre " "ya existe\n" -#, fuzzy, c-format -msgid "" -"%sError: plugin \"%s\" is compiled for WeeChat %s and you are running " -"version %s, failed to load" -msgstr "" -"%s función \"weechat_plugin_init\" no encontrada en el plugin \"%s\", " -"falló al cargar\n" - #, fuzzy, c-format msgid "%sError: function \"%s\" not found in plugin \"%s\", failed to load" msgstr "" @@ -5786,6 +5778,14 @@ msgstr "%s no es posible crear el servidor\n" msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s falta un argumento para la opción --dir\n" +#, fuzzy +#~ msgid "" +#~ "%sError: plugin \"%s\" is compiled for WeeChat %s and you are running " +#~ "version %s, failed to load" +#~ msgstr "" +#~ "%s función \"weechat_plugin_init\" no encontrada en el plugin \"%s\", " +#~ "falló al cargar\n" + #, fuzzy #~ msgid "" #~ "port number (or range of ports) that relay plugin listens on (syntax: a " diff --git a/po/fr.po b/po/fr.po index 1ae6c3993..50d95157e 100644 --- a/po/fr.po +++ b/po/fr.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-06-11 19:00+0200\n" -"PO-Revision-Date: 2009-06-11 19:01+0200\n" +"POT-Creation-Date: 2009-06-12 16:00+0200\n" +"PO-Revision-Date: 2009-06-12 16:00+0200\n" "Last-Translator: FlashCode \n" "Language-Team: weechat-dev \n" "MIME-Version: 1.0\n" @@ -5198,14 +5198,6 @@ msgstr "" "%sErreur: impossible de charger l'extension \"%s\": une extension avec le " "même nom existe déjà" -#, c-format -msgid "" -"%sError: plugin \"%s\" is compiled for WeeChat %s and you are running " -"version %s, failed to load" -msgstr "" -"%sErreur: l'extension \"%s\" est compilée pour WeeChat %s et vous utilisez " -"la version %s, échec de chargement" - #, c-format msgid "%sError: function \"%s\" not found in plugin \"%s\", failed to load" msgstr "" @@ -5998,16 +5990,3 @@ msgstr "%s%s: impossible de positionner l'option \"nonblock\" pour la socket" #, c-format msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s%s: délai d'attente dépassé pour \"%s\" avec %s" - -#~ msgid "control server buffers attachment" -#~ msgstr "contrôle de l'attachement des tampons de serveur" - -#~ msgid "" -#~ "attach server buffers into one buffer (optionally attached to core buffer)" -#~ msgstr "attachement des tampons des serveurs" - -#~ msgid "" -#~ "currently selected server (only if one buffer is used for all servers)" -#~ msgstr "" -#~ "serveur actuellement sélectionné (seulement si un tampon est utilisé pour " -#~ "tous les serveurs)" diff --git a/po/hu.po b/po/hu.po index 7dadf6d28..15387393a 100644 --- a/po/hu.po +++ b/po/hu.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-06-11 19:00+0200\n" +"POT-Creation-Date: 2009-06-12 16:00+0200\n" "PO-Revision-Date: 2009-05-11 13:02+0200\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -5045,14 +5045,6 @@ msgid "" "%sError: unable to load plugin \"%s\": a plugin with same name already exists" msgstr "%s nem sikerült a \"%s\" modult betölteni: már van ilyen nevű modul\n" -#, fuzzy, c-format -msgid "" -"%sError: plugin \"%s\" is compiled for WeeChat %s and you are running " -"version %s, failed to load" -msgstr "" -"%s a \"weechat_plugin_init\" függvény nem található a \"%s\" modulban, " -"betöltés sikertelen\n" - #, fuzzy, c-format msgid "%sError: function \"%s\" not found in plugin \"%s\", failed to load" msgstr "" @@ -5847,6 +5839,14 @@ msgstr "%s DCC: nem sikerült 'nonblock' opciót beállítani a csatornán\n" msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s hiányzó argumentum a(z) \"%s\" opciónak\n" +#, fuzzy +#~ msgid "" +#~ "%sError: plugin \"%s\" is compiled for WeeChat %s and you are running " +#~ "version %s, failed to load" +#~ msgstr "" +#~ "%s a \"weechat_plugin_init\" függvény nem található a \"%s\" modulban, " +#~ "betöltés sikertelen\n" + #, fuzzy #~ msgid "" #~ "port number (or range of ports) that relay plugin listens on (syntax: a " diff --git a/po/pl.po b/po/pl.po index 71c3c660b..f0341c35d 100644 --- a/po/pl.po +++ b/po/pl.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-06-11 19:00+0200\n" +"POT-Creation-Date: 2009-06-12 16:00+0200\n" "PO-Revision-Date: 2009-05-11 13:02+0200\n" "Last-Translator: \n" "Language-Team: Polish\n" @@ -4353,12 +4353,6 @@ msgid "" "%sError: unable to load plugin \"%s\": a plugin with same name already exists" msgstr "" -#, c-format -msgid "" -"%sError: plugin \"%s\" is compiled for WeeChat %s and you are running " -"version %s, failed to load" -msgstr "" - #, c-format msgid "%sError: function \"%s\" not found in plugin \"%s\", failed to load" msgstr "" diff --git a/po/ru.po b/po/ru.po index ffe4671ad..bab6157fa 100644 --- a/po/ru.po +++ b/po/ru.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-06-11 19:00+0200\n" +"POT-Creation-Date: 2009-06-12 16:00+0200\n" "PO-Revision-Date: 2009-05-11 13:02+0200\n" "Last-Translator: Pavel Shevchuk \n" "Language-Team: weechat-dev \n" @@ -5017,14 +5017,6 @@ msgid "" msgstr "" "%s не могу загрузить plugin \"%s\": одноимённый plugin уже существует\n" -#, fuzzy, c-format -msgid "" -"%sError: plugin \"%s\" is compiled for WeeChat %s and you are running " -"version %s, failed to load" -msgstr "" -"%s функция \"weechat_plugin_init\" не найдена в plugin'е \"%s\", загрузка не " -"удалась\n" - #, fuzzy, c-format msgid "%sError: function \"%s\" not found in plugin \"%s\", failed to load" msgstr "" @@ -5814,6 +5806,14 @@ msgstr "%s DCC: не могу установить неблокирующий р msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s нет аргумента для параметра \"%s\"\n" +#, fuzzy +#~ msgid "" +#~ "%sError: plugin \"%s\" is compiled for WeeChat %s and you are running " +#~ "version %s, failed to load" +#~ msgstr "" +#~ "%s функция \"weechat_plugin_init\" не найдена в plugin'е \"%s\", загрузка " +#~ "не удалась\n" + #, fuzzy #~ msgid "" #~ "port number (or range of ports) that relay plugin listens on (syntax: a " diff --git a/po/weechat.pot b/po/weechat.pot index 7453f0bff..501fb2dea 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-06-11 19:00+0200\n" +"POT-Creation-Date: 2009-06-12 16:00+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -4313,12 +4313,6 @@ msgid "" "%sError: unable to load plugin \"%s\": a plugin with same name already exists" msgstr "" -#, c-format -msgid "" -"%sError: plugin \"%s\" is compiled for WeeChat %s and you are running " -"version %s, failed to load" -msgstr "" - #, c-format msgid "%sError: function \"%s\" not found in plugin \"%s\", failed to load" msgstr "" diff --git a/src/core/wee-util.c b/src/core/wee-util.c index 39d235f1f..1aef2ac6f 100644 --- a/src/core/wee-util.c +++ b/src/core/wee-util.c @@ -355,99 +355,3 @@ util_search_full_lib_name (const char *filename, const char *sys_directory) return name_with_ext; } - -/* - * util_weechat_version_cmp: compare 2 weechat versions - * return -1 if version1 < version2 - * +1 if version1 > version2 - * 0 if version1 = version2 - */ - -int -util_weechat_version_cmp (const char *version1, const char *version2) -{ - char *v1, *v2, *ptr_v1, *ptr_v2, *pos1, *pos2, *next1, *next2; - char *error1, *error2; - int rc; - long number1, number2; - - if (!version1 && !version2) - return 0; - if (!version1 && version2) - return -1; - if (version1 && !version2) - return 1; - - v1 = strdup (version1); - v2 = strdup (version2); - - rc = 0; - - if (v1 && v2) - { - ptr_v1 = v1; - ptr_v2 = v2; - while (ptr_v1 && ptr_v1[0] && ptr_v2 && ptr_v2[0]) - { - pos1 = ptr_v1; - while (pos1[0] && isdigit (pos1[0])) - { - pos1++; - } - pos2 = ptr_v2; - while (pos2[0] && isdigit (pos2[0])) - { - pos2++; - } - next1 = (pos1[0] == '\0') ? NULL : pos1 + 1; - next2 = (pos2[0] == '\0') ? NULL : pos2 + 1; - pos1[0] = '\0'; - pos2[0] = '\0'; - - error1 = NULL; - number1 = strtol (ptr_v1, &error1, 10); - error2 = NULL; - number2 = strtol (ptr_v2, &error2, 10); - if (error1 && !error1[0] && (!error2 || error2[0])) - { - rc = 1; - break; - } - if (error2 && !error2[0] && (!error1 || error1[0])) - { - rc = 1; - break; - } - if (error1 && !error1[0] && error2 && !error2[0]) - { - if (number1 > number2) - { - rc = 1; - break; - } - if (number1 < number2) - { - rc = -1; - break; - } - } - ptr_v1 = next1; - while (ptr_v1 && ptr_v1[0] && !isdigit (ptr_v1[0])) - { - ptr_v1++; - } - ptr_v2 = next2; - while (ptr_v2 && ptr_v2[0] && !isdigit (ptr_v2[0])) - { - ptr_v2++; - } - } - } - - if (v1) - free (v1); - if (v2) - free (v2); - - return rc; -} diff --git a/src/core/wee-util.h b/src/core/wee-util.h index 8f6ec3981..5b9d8230a 100644 --- a/src/core/wee-util.h +++ b/src/core/wee-util.h @@ -33,7 +33,5 @@ extern void util_exec_on_files (const char *directory, void *data, const char *filename)); extern char *util_search_full_lib_name (const char *filename, const char *sys_directory); -extern int util_weechat_version_cmp (const char *version1, - const char *version2); #endif /* wee-util.h */ diff --git a/src/plugins/alias/alias.c b/src/plugins/alias/alias.c index 0b51c9bdd..fb215d1b8 100644 --- a/src/plugins/alias/alias.c +++ b/src/plugins/alias/alias.c @@ -32,7 +32,6 @@ WEECHAT_PLUGIN_NAME(ALIAS_PLUGIN_NAME); WEECHAT_PLUGIN_DESCRIPTION("Alias plugin for WeeChat"); WEECHAT_PLUGIN_AUTHOR("FlashCode "); WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION); -WEECHAT_PLUGIN_WEECHAT_VERSION(WEECHAT_VERSION); WEECHAT_PLUGIN_LICENSE("GPL3"); struct t_weechat_plugin *weechat_alias_plugin = NULL; diff --git a/src/plugins/aspell/weechat-aspell.c b/src/plugins/aspell/weechat-aspell.c index 98095f38a..c476c685b 100644 --- a/src/plugins/aspell/weechat-aspell.c +++ b/src/plugins/aspell/weechat-aspell.c @@ -35,7 +35,6 @@ WEECHAT_PLUGIN_NAME(ASPELL_PLUGIN_NAME); WEECHAT_PLUGIN_DESCRIPTION("Aspell plugin for WeeChat"); WEECHAT_PLUGIN_AUTHOR("FlashCode "); WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION); -WEECHAT_PLUGIN_WEECHAT_VERSION(WEECHAT_VERSION); WEECHAT_PLUGIN_LICENSE("GPL3"); struct t_weechat_plugin *weechat_aspell_plugin = NULL; diff --git a/src/plugins/charset/charset.c b/src/plugins/charset/charset.c index d9c48d067..a11841f1b 100644 --- a/src/plugins/charset/charset.c +++ b/src/plugins/charset/charset.c @@ -36,7 +36,6 @@ WEECHAT_PLUGIN_NAME(CHARSET_PLUGIN_NAME); WEECHAT_PLUGIN_DESCRIPTION("Charset plugin for WeeChat"); WEECHAT_PLUGIN_AUTHOR("FlashCode "); WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION); -WEECHAT_PLUGIN_WEECHAT_VERSION(WEECHAT_VERSION); WEECHAT_PLUGIN_LICENSE("GPL3"); #define CHARSET_CONFIG_NAME "charset" diff --git a/src/plugins/demo/demo.c b/src/plugins/demo/demo.c index 112394c79..7bd1061dc 100644 --- a/src/plugins/demo/demo.c +++ b/src/plugins/demo/demo.c @@ -37,7 +37,6 @@ WEECHAT_PLUGIN_NAME(DEMO_PLUGIN_NAME); WEECHAT_PLUGIN_DESCRIPTION("Demo plugin for WeeChat"); WEECHAT_PLUGIN_AUTHOR("FlashCode "); WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION); -WEECHAT_PLUGIN_WEECHAT_VERSION(WEECHAT_VERSION); WEECHAT_PLUGIN_LICENSE("GPL3"); struct t_weechat_plugin *weechat_demo_plugin = NULL; diff --git a/src/plugins/fifo/fifo.c b/src/plugins/fifo/fifo.c index 5e8fd14db..3b48be23d 100644 --- a/src/plugins/fifo/fifo.c +++ b/src/plugins/fifo/fifo.c @@ -36,7 +36,6 @@ WEECHAT_PLUGIN_NAME(FIFO_PLUGIN_NAME); WEECHAT_PLUGIN_DESCRIPTION("Fifo plugin for WeeChat"); WEECHAT_PLUGIN_AUTHOR("FlashCode "); WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION); -WEECHAT_PLUGIN_WEECHAT_VERSION(WEECHAT_VERSION); WEECHAT_PLUGIN_LICENSE("GPL3"); struct t_weechat_plugin *weechat_fifo_plugin = NULL; diff --git a/src/plugins/irc/irc.c b/src/plugins/irc/irc.c index d349fe7b7..46f41c1e1 100644 --- a/src/plugins/irc/irc.c +++ b/src/plugins/irc/irc.c @@ -43,7 +43,6 @@ WEECHAT_PLUGIN_NAME(IRC_PLUGIN_NAME); WEECHAT_PLUGIN_DESCRIPTION("IRC (Internet Relay Chat) plugin for WeeChat"); WEECHAT_PLUGIN_AUTHOR("FlashCode "); WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION); -WEECHAT_PLUGIN_WEECHAT_VERSION(WEECHAT_VERSION); WEECHAT_PLUGIN_LICENSE("GPL3"); struct t_weechat_plugin *weechat_irc_plugin = NULL; diff --git a/src/plugins/jabber/jabber.c b/src/plugins/jabber/jabber.c index 9f8f6a348..f83de9231 100644 --- a/src/plugins/jabber/jabber.c +++ b/src/plugins/jabber/jabber.c @@ -38,7 +38,6 @@ WEECHAT_PLUGIN_NAME(JABBER_PLUGIN_NAME); WEECHAT_PLUGIN_DESCRIPTION("Jabber plugin for WeeChat"); WEECHAT_PLUGIN_AUTHOR("FlashCode "); WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION); -WEECHAT_PLUGIN_WEECHAT_VERSION(WEECHAT_VERSION); WEECHAT_PLUGIN_LICENSE("GPL3"); struct t_weechat_plugin *weechat_jabber_plugin = NULL; diff --git a/src/plugins/logger/logger.c b/src/plugins/logger/logger.c index 96be9608c..62d17e9e0 100644 --- a/src/plugins/logger/logger.c +++ b/src/plugins/logger/logger.c @@ -47,7 +47,6 @@ WEECHAT_PLUGIN_NAME(LOGGER_PLUGIN_NAME); WEECHAT_PLUGIN_DESCRIPTION("Logger plugin for WeeChat"); WEECHAT_PLUGIN_AUTHOR("FlashCode "); WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION); -WEECHAT_PLUGIN_WEECHAT_VERSION(WEECHAT_VERSION); WEECHAT_PLUGIN_LICENSE("GPL3"); struct t_weechat_plugin *weechat_logger_plugin = NULL; diff --git a/src/plugins/plugin.c b/src/plugins/plugin.c index 913ebcbf9..037bb4f1a 100644 --- a/src/plugins/plugin.c +++ b/src/plugins/plugin.c @@ -156,7 +156,7 @@ plugin_load (const char *filename) char *ptr_home, *full_name, *full_name2; void *handle; char *name, *api_version, *author, *description, *version; - char *weechat_version, *license, *charset; + char *license, *charset; t_weechat_init_func *init_func; int rc, i, argc; char **argv; @@ -302,34 +302,6 @@ plugin_load (const char *filename) return NULL; } - /* look for WeeChat version required for plugin */ - weechat_version = dlsym (handle, "weechat_plugin_weechat_version"); - if (!weechat_version) - { - gui_chat_printf (NULL, - _("%sError: symbol \"%s\" not found in " - "plugin \"%s\", failed to load"), - gui_chat_prefix[GUI_CHAT_PREFIX_ERROR], - "weechat_plugin_weechat_version", - full_name); - dlclose (handle); - free (full_name); - return NULL; - } - if (util_weechat_version_cmp (PACKAGE_VERSION, weechat_version) != 0) - { - gui_chat_printf (NULL, - _("%sError: plugin \"%s\" is compiled for WeeChat " - "%s and you are running version %s, failed to " - "load"), - gui_chat_prefix[GUI_CHAT_PREFIX_ERROR], - full_name, - weechat_version, PACKAGE_VERSION); - dlclose (handle); - free (full_name); - return NULL; - } - /* look for plugin license */ license = dlsym (handle, "weechat_plugin_license"); if (!license) @@ -374,7 +346,6 @@ plugin_load (const char *filename) new_plugin->description = strdup (description); new_plugin->author = strdup (author); new_plugin->version = strdup (version); - new_plugin->weechat_version = strdup (weechat_version); new_plugin->license = strdup (license); new_plugin->charset = (charset) ? strdup (charset) : NULL; ptr_option = config_weechat_debug_get (name); @@ -825,8 +796,6 @@ plugin_remove (struct t_weechat_plugin *plugin) free (plugin->author); if (plugin->version) free (plugin->version); - if (plugin->weechat_version) - free (plugin->weechat_version); if (plugin->license) free (plugin->license); if (plugin->charset) @@ -1057,8 +1026,6 @@ plugin_add_to_infolist (struct t_infolist *infolist, return 0; if (!infolist_new_var_string (ptr_item, "version", plugin->version)) return 0; - if (!infolist_new_var_string (ptr_item, "weechat_version", plugin->weechat_version)) - return 0; if (!infolist_new_var_string (ptr_item, "license", plugin->license)) return 0; if (!infolist_new_var_string (ptr_item, "charset", plugin->charset)) diff --git a/src/plugins/relay/relay.c b/src/plugins/relay/relay.c index 632c2ac10..901345da5 100644 --- a/src/plugins/relay/relay.c +++ b/src/plugins/relay/relay.c @@ -36,7 +36,6 @@ WEECHAT_PLUGIN_DESCRIPTION("Network communication between WeeChat and " "remote application"); WEECHAT_PLUGIN_AUTHOR("FlashCode "); WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION); -WEECHAT_PLUGIN_WEECHAT_VERSION(WEECHAT_VERSION); WEECHAT_PLUGIN_LICENSE("GPL3"); struct t_weechat_plugin *weechat_relay_plugin = NULL; diff --git a/src/plugins/scripts/lua/weechat-lua.c b/src/plugins/scripts/lua/weechat-lua.c index 7020034dc..8f19b8e97 100644 --- a/src/plugins/scripts/lua/weechat-lua.c +++ b/src/plugins/scripts/lua/weechat-lua.c @@ -37,7 +37,6 @@ WEECHAT_PLUGIN_NAME(LUA_PLUGIN_NAME); WEECHAT_PLUGIN_DESCRIPTION("Lua plugin for WeeChat"); WEECHAT_PLUGIN_AUTHOR("FlashCode "); WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION); -WEECHAT_PLUGIN_WEECHAT_VERSION(WEECHAT_VERSION); WEECHAT_PLUGIN_LICENSE("GPL3"); struct t_weechat_plugin *weechat_lua_plugin; diff --git a/src/plugins/scripts/perl/weechat-perl.c b/src/plugins/scripts/perl/weechat-perl.c index ac968f930..8c9ca43a4 100644 --- a/src/plugins/scripts/perl/weechat-perl.c +++ b/src/plugins/scripts/perl/weechat-perl.c @@ -35,7 +35,6 @@ WEECHAT_PLUGIN_NAME(PERL_PLUGIN_NAME); WEECHAT_PLUGIN_DESCRIPTION("Perl plugin for WeeChat"); WEECHAT_PLUGIN_AUTHOR("FlashCode "); WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION); -WEECHAT_PLUGIN_WEECHAT_VERSION(WEECHAT_VERSION); WEECHAT_PLUGIN_LICENSE("GPL3"); struct t_weechat_plugin *weechat_perl_plugin = NULL; diff --git a/src/plugins/scripts/python/weechat-python.c b/src/plugins/scripts/python/weechat-python.c index 2e8056425..19bcf9e0e 100644 --- a/src/plugins/scripts/python/weechat-python.c +++ b/src/plugins/scripts/python/weechat-python.c @@ -33,7 +33,6 @@ WEECHAT_PLUGIN_NAME(PYTHON_PLUGIN_NAME); WEECHAT_PLUGIN_DESCRIPTION("Python plugin for WeeChat"); WEECHAT_PLUGIN_AUTHOR("FlashCode "); WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION); -WEECHAT_PLUGIN_WEECHAT_VERSION(WEECHAT_VERSION); WEECHAT_PLUGIN_LICENSE("GPL3"); struct t_weechat_plugin *weechat_python_plugin = NULL; diff --git a/src/plugins/scripts/ruby/weechat-ruby.c b/src/plugins/scripts/ruby/weechat-ruby.c index 5d3c7db14..b59b8b213 100644 --- a/src/plugins/scripts/ruby/weechat-ruby.c +++ b/src/plugins/scripts/ruby/weechat-ruby.c @@ -36,7 +36,6 @@ WEECHAT_PLUGIN_NAME(RUBY_PLUGIN_NAME); WEECHAT_PLUGIN_DESCRIPTION("Ruby plugin for WeeChat"); WEECHAT_PLUGIN_AUTHOR("FlashCode "); WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION); -WEECHAT_PLUGIN_WEECHAT_VERSION(WEECHAT_VERSION); WEECHAT_PLUGIN_LICENSE("GPL3"); struct t_weechat_plugin *weechat_ruby_plugin = NULL; diff --git a/src/plugins/scripts/tcl/weechat-tcl.c b/src/plugins/scripts/tcl/weechat-tcl.c index 3a77e418b..757652ba2 100644 --- a/src/plugins/scripts/tcl/weechat-tcl.c +++ b/src/plugins/scripts/tcl/weechat-tcl.c @@ -38,7 +38,6 @@ WEECHAT_PLUGIN_NAME(TCL_PLUGIN_NAME); WEECHAT_PLUGIN_DESCRIPTION("Tcl plugin for WeeChat"); WEECHAT_PLUGIN_AUTHOR("Dmitry Kobylin "); WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION); -WEECHAT_PLUGIN_WEECHAT_VERSION(WEECHAT_VERSION); WEECHAT_PLUGIN_LICENSE("GPL3"); struct t_weechat_plugin *weechat_tcl_plugin = NULL; diff --git a/src/plugins/trigger/trigger.c b/src/plugins/trigger/trigger.c index e7ff0a225..0a8f75d78 100644 --- a/src/plugins/trigger/trigger.c +++ b/src/plugins/trigger/trigger.c @@ -33,7 +33,6 @@ WEECHAT_PLUGIN_NAME("trigger"); WEECHAT_PLUGIN_DESCRIPTION("Trigger plugin for WeeChat"); WEECHAT_PLUGIN_AUTHOR("FlashCode "); WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION); -WEECHAT_PLUGIN_WEECHAT_VERSION(WEECHAT_VERSION); WEECHAT_PLUGIN_LICENSE("GPL3"); t_weechat_trigger *weechat_trigger_list = NULL; diff --git a/src/plugins/weechat-plugin.h b/src/plugins/weechat-plugin.h index d8bd0d8f3..53d68c1d9 100644 --- a/src/plugins/weechat-plugin.h +++ b/src/plugins/weechat-plugin.h @@ -33,7 +33,7 @@ struct t_infolist; struct t_weelist; /* API version (used to check that plugin has same API and can be loaded) */ -#define WEECHAT_PLUGIN_API_VERSION "20090608-01" +#define WEECHAT_PLUGIN_API_VERSION "20090612-01" /* macros for defining plugin infos */ #define WEECHAT_PLUGIN_NAME(__name) \ @@ -45,8 +45,6 @@ struct t_weelist; char weechat_plugin_description[] = __desc; #define WEECHAT_PLUGIN_VERSION(__version) \ char weechat_plugin_version[] = __version; -#define WEECHAT_PLUGIN_WEECHAT_VERSION(__version) \ - char weechat_plugin_weechat_version[] = __version; #define WEECHAT_PLUGIN_LICENSE(__license) \ char weechat_plugin_license[] = __license; @@ -123,7 +121,6 @@ struct t_weechat_plugin char *description; /* description */ char *author; /* author */ char *version; /* plugin version */ - char *weechat_version; /* weechat version required */ char *license; /* license */ char *charset; /* charset used by plugin */ int debug; /* debug level for plugin (0=off) */ diff --git a/src/plugins/xfer/xfer.c b/src/plugins/xfer/xfer.c index 8ebd638fc..0f12668ec 100644 --- a/src/plugins/xfer/xfer.c +++ b/src/plugins/xfer/xfer.c @@ -47,7 +47,6 @@ WEECHAT_PLUGIN_DESCRIPTION("Xfer (file transfer and direct chat) plugin for " "WeeChat"); WEECHAT_PLUGIN_AUTHOR("FlashCode "); WEECHAT_PLUGIN_VERSION(WEECHAT_VERSION); -WEECHAT_PLUGIN_WEECHAT_VERSION(WEECHAT_VERSION); WEECHAT_PLUGIN_LICENSE("GPL3"); struct t_weechat_plugin *weechat_xfer_plugin = NULL;