1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-25 20:36:38 +02:00

Many changes in IRC plugin

This commit is contained in:
Sebastien Helleu
2007-12-10 17:18:40 +01:00
parent 8b3980f508
commit 256557f900
27 changed files with 1374 additions and 1252 deletions
+17 -5
View File
@@ -161,6 +161,20 @@ plugin_api_strncasecmp (struct t_weechat_plugin *plugin,
return string_strncasecmp (string1, string2, max);
}
/*
* plugin_api_strcasestr: locale and case independent string search
*/
char *
plugin_api_strcasestr (struct t_weechat_plugin *plugin,
char *string1, char *string2)
{
/* make C compiler happy */
(void) plugin;
return string_strcasestr (string1, string2);
}
/*
* plugin_api_string_replace: replace a string by new one in a string
*/
@@ -919,10 +933,8 @@ plugin_api_plugin_config_set (struct t_weechat_plugin *plugin,
char *
plugin_api_prefix (struct t_weechat_plugin *plugin, char *prefix)
{
static char empty_prefix[] = "";
if (!plugin || !prefix)
return empty_prefix;
return gui_chat_prefix_empty;
if (string_strcasecmp (prefix, "info") == 0)
return gui_chat_prefix[GUI_CHAT_PREFIX_INFO];
@@ -937,7 +949,7 @@ plugin_api_prefix (struct t_weechat_plugin *plugin, char *prefix)
if (string_strcasecmp (prefix, "quit") == 0)
return gui_chat_prefix[GUI_CHAT_PREFIX_QUIT];
return empty_prefix;
return gui_chat_prefix_empty;
}
/*
@@ -1275,7 +1287,7 @@ plugin_api_buffer_close (struct t_weechat_plugin *plugin, void *buffer)
* plugin_api_buffer_get: get a buffer property
*/
char *
void *
plugin_api_buffer_get (struct t_weechat_plugin *plugin, void *buffer,
char *property)
{