diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2008-10-08 19:04:05 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2008-10-08 19:04:05 +0200 |
commit | 5d07aa14ed58bb7ba3a4566955d471861488f056 (patch) | |
tree | 59528af01029f965139a81bbf07bcd33007abbb6 /src/plugins/notify | |
parent | 0e053e072b9eb8755e0bd9418d18a58e4ae8f96d (diff) | |
download | weechat-5d07aa14ed58bb7ba3a4566955d471861488f056.zip |
Add function to get plugin name (return "core" for WeeChat core)
Diffstat (limited to 'src/plugins/notify')
-rw-r--r-- | src/plugins/notify/notify.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/plugins/notify/notify.c b/src/plugins/notify/notify.c index 25e519c81..9c4ed29e4 100644 --- a/src/plugins/notify/notify.c +++ b/src/plugins/notify/notify.c @@ -84,15 +84,12 @@ notify_build_option_name (struct t_gui_buffer *buffer) plugin_name = weechat_buffer_get_string (buffer, "plugin"); name = weechat_buffer_get_string (buffer, "name"); - length = ((plugin_name) ? strlen (plugin_name) : strlen ("core")) + 1 + - strlen (name) + 1; + length = strlen (plugin_name) + 1 + strlen (name) + 1; option_name = malloc (length); if (!option_name) return NULL; - snprintf (option_name, length, "%s.%s", - (plugin_name) ? plugin_name : "core", - name); + snprintf (option_name, length, "%s.%s", plugin_name, name); return option_name; } |