1
0
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:
Sébastien Helleu
2023-09-08 11:35:12 +02:00
parent 63922ca038
commit 24d2ba3338
4 changed files with 315 additions and 345 deletions
-26
View File
@@ -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).
*/