summaryrefslogtreecommitdiff
path: root/src/plugins/scripts/python/python.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2008-01-11 15:08:36 +0100
committerSebastien Helleu <flashcode@flashtux.org>2008-01-11 15:08:36 +0100
commitadd64d6f477c8c1768f98c8a8c03d7b207a87a6b (patch)
treeb8635079f0e165f15d654b7d62fc9a396677643c /src/plugins/scripts/python/python.c
parent8a6729991214cbf02fe200940d7e0a5e39c90efc (diff)
downloadweechat-add64d6f477c8c1768f98c8a8c03d7b207a87a6b.zip
New arguments for function "register" in scripts (author, license), with optional check of license when script is loaded
Diffstat (limited to 'src/plugins/scripts/python/python.c')
-rw-r--r--src/plugins/scripts/python/python.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/scripts/python/python.c b/src/plugins/scripts/python/python.c
index cdb6ad35c..6a243243e 100644
--- a/src/plugins/scripts/python/python.c
+++ b/src/plugins/scripts/python/python.c
@@ -2377,7 +2377,7 @@ weechat_python_unload (t_weechat_plugin *plugin, t_plugin_script *script)
"Unloading Python script \"%s\"",
script->name);
- if (script->shutdown_func[0])
+ if (script->shutdown_func && script->shutdown_func[0])
{
r = (int *) weechat_python_exec (plugin, script, SCRIPT_EXEC_INT,
script->shutdown_func, NULL, NULL, NULL);
@@ -2694,7 +2694,8 @@ weechat_plugin_init (t_weechat_plugin *plugin)
plugin->mkdir_home (plugin, "python");
plugin->mkdir_home (plugin, "python/autoload");
-
+
+ script_init (weechat_python_plugin);
weechat_script_auto_load (plugin, "python", weechat_python_load);
/* init ok */