mirror of
https://github.com/weechat/weechat.git
synced 2026-06-28 13:56:37 +02:00
script: replace hook_process_hashtable by hook_url to download scripts and list of scripts (closes #1723)
This commit is contained in:
@@ -130,32 +130,6 @@ script_download_enabled (int display_error)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Builds download URL (to use with hook_process or hook_process_hashtable).
|
||||
*
|
||||
* Note: result must be freed after use.
|
||||
*/
|
||||
|
||||
char *
|
||||
script_build_download_url (const char *url)
|
||||
{
|
||||
char *result;
|
||||
int length;
|
||||
|
||||
if (!url || !url[0])
|
||||
return NULL;
|
||||
|
||||
/* length of url + "url:" */
|
||||
length = 4 + strlen (url) + 1;
|
||||
result = malloc (length);
|
||||
if (!result)
|
||||
return NULL;
|
||||
|
||||
snprintf (result, length, "url:%s", url);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* Gets loaded plugins (in array of integers).
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user