summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2019-05-12 07:45:07 +0200
committerSébastien Helleu <flashcode@flashtux.org>2019-05-12 07:46:01 +0200
commita24817b141f1da76f56db9d034b18365effac37f (patch)
tree629d510611b0648f495f85808f6cf2d5f1a07e33
parente1fb8433cefe4467f9fd3ffc21237c0a98a88e4b (diff)
downloadweechat-a24817b141f1da76f56db9d034b18365effac37f.zip
irc: rename server variable "nick_host" to "host"
-rw-r--r--ChangeLog.adoc2
-rw-r--r--doc/de/autogen/plugin_api/hdata.adoc2
-rw-r--r--doc/en/autogen/plugin_api/hdata.adoc2
-rw-r--r--doc/fr/autogen/plugin_api/hdata.adoc2
-rw-r--r--doc/it/autogen/plugin_api/hdata.adoc2
-rw-r--r--doc/ja/autogen/plugin_api/hdata.adoc2
-rw-r--r--doc/pl/autogen/plugin_api/hdata.adoc2
-rw-r--r--src/plugins/irc/irc-bar-item.c8
-rw-r--r--src/plugins/irc/irc-channel.c2
-rw-r--r--src/plugins/irc/irc-protocol.c6
-rw-r--r--src/plugins/irc/irc-server.c38
-rw-r--r--src/plugins/irc/irc-server.h6
-rw-r--r--src/plugins/irc/irc-upgrade.c4
13 files changed, 39 insertions, 39 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc
index 08d04cc05..11ee9a17f 100644
--- a/ChangeLog.adoc
+++ b/ChangeLog.adoc
@@ -31,7 +31,7 @@ New features::
* api: add function command_options (issue #928)
* api: add function string_match_list
* irc: add bar items "irc_nick", "irc_host" and "irc_nick_host"
- * irc: add variable "nick_host" in server structure
+ * irc: add variable "host" in server structure
* relay: add option relay.weechat.commands (issue #928)
* script: use SHA-512 instead of MD5 for script checksum
* spell: rename aspell plugin to spell (issue #1299)
diff --git a/doc/de/autogen/plugin_api/hdata.adoc b/doc/de/autogen/plugin_api/hdata.adoc
index 3628b18e7..886430117 100644
--- a/doc/de/autogen/plugin_api/hdata.adoc
+++ b/doc/de/autogen/plugin_api/hdata.adoc
@@ -243,7 +243,7 @@ _nick_first_tried_   (integer) +
_nick_alternate_number_   (integer) +
_nick_   (string) +
_nick_modes_   (string) +
-_nick_host_   (string) +
+_host_   (string) +
_checking_cap_ls_   (integer) +
_cap_ls_   (hashtable) +
_checking_cap_list_   (integer) +
diff --git a/doc/en/autogen/plugin_api/hdata.adoc b/doc/en/autogen/plugin_api/hdata.adoc
index e23605b67..4d4f58e92 100644
--- a/doc/en/autogen/plugin_api/hdata.adoc
+++ b/doc/en/autogen/plugin_api/hdata.adoc
@@ -243,7 +243,7 @@ _nick_first_tried_   (integer) +
_nick_alternate_number_   (integer) +
_nick_   (string) +
_nick_modes_   (string) +
-_nick_host_   (string) +
+_host_   (string) +
_checking_cap_ls_   (integer) +
_cap_ls_   (hashtable) +
_checking_cap_list_   (integer) +
diff --git a/doc/fr/autogen/plugin_api/hdata.adoc b/doc/fr/autogen/plugin_api/hdata.adoc
index 859a73f97..c777bd715 100644
--- a/doc/fr/autogen/plugin_api/hdata.adoc
+++ b/doc/fr/autogen/plugin_api/hdata.adoc
@@ -243,7 +243,7 @@ _nick_first_tried_   (integer) +
_nick_alternate_number_   (integer) +
_nick_   (string) +
_nick_modes_   (string) +
-_nick_host_   (string) +
+_host_   (string) +
_checking_cap_ls_   (integer) +
_cap_ls_   (hashtable) +
_checking_cap_list_   (integer) +
diff --git a/doc/it/autogen/plugin_api/hdata.adoc b/doc/it/autogen/plugin_api/hdata.adoc
index e43aac32c..679e89163 100644
--- a/doc/it/autogen/plugin_api/hdata.adoc
+++ b/doc/it/autogen/plugin_api/hdata.adoc
@@ -243,7 +243,7 @@ _nick_first_tried_   (integer) +
_nick_alternate_number_   (integer) +
_nick_   (string) +
_nick_modes_   (string) +
-_nick_host_   (string) +
+_host_   (string) +
_checking_cap_ls_   (integer) +
_cap_ls_   (hashtable) +
_checking_cap_list_   (integer) +
diff --git a/doc/ja/autogen/plugin_api/hdata.adoc b/doc/ja/autogen/plugin_api/hdata.adoc
index 73ccde845..3a97d0fb0 100644
--- a/doc/ja/autogen/plugin_api/hdata.adoc
+++ b/doc/ja/autogen/plugin_api/hdata.adoc
@@ -243,7 +243,7 @@ _nick_first_tried_   (integer) +
_nick_alternate_number_   (integer) +
_nick_   (string) +
_nick_modes_   (string) +
-_nick_host_   (string) +
+_host_   (string) +
_checking_cap_ls_   (integer) +
_cap_ls_   (hashtable) +
_checking_cap_list_   (integer) +
diff --git a/doc/pl/autogen/plugin_api/hdata.adoc b/doc/pl/autogen/plugin_api/hdata.adoc
index 53c06ff50..e39115fc8 100644
--- a/doc/pl/autogen/plugin_api/hdata.adoc
+++ b/doc/pl/autogen/plugin_api/hdata.adoc
@@ -243,7 +243,7 @@ _nick_first_tried_   (integer) +
_nick_alternate_number_   (integer) +
_nick_   (string) +
_nick_modes_   (string) +
-_nick_host_   (string) +
+_host_   (string) +
_checking_cap_ls_   (integer) +
_cap_ls_   (hashtable) +
_checking_cap_list_   (integer) +
diff --git a/src/plugins/irc/irc-bar-item.c b/src/plugins/irc/irc-bar-item.c
index 2afb1027f..9a69a000b 100644
--- a/src/plugins/irc/irc-bar-item.c
+++ b/src/plugins/irc/irc-bar-item.c
@@ -437,10 +437,10 @@ irc_bar_item_host (const void *pointer, void *data,
return NULL;
irc_buffer_get_server_and_channel (buffer, &server, NULL);
- if (!server || !server->nick_host)
+ if (!server || !server->host)
return NULL;
- return strdup (server->nick_host);
+ return strdup (server->host);
}
/*
@@ -473,8 +473,8 @@ irc_bar_item_nick_host (const void *pointer, void *data,
snprintf (buf, sizeof (buf), "%s%s%s",
server->nick,
- (server->nick_host) ? "@" : "",
- (server->nick_host) ? server->nick_host : "");
+ (server->host) ? "@" : "",
+ (server->host) ? server->host : "");
return strdup (buf);
}
diff --git a/src/plugins/irc/irc-channel.c b/src/plugins/irc/irc-channel.c
index 96306fa6a..deee971b5 100644
--- a/src/plugins/irc/irc-channel.c
+++ b/src/plugins/irc/irc-channel.c
@@ -328,7 +328,7 @@ irc_channel_create_buffer (struct t_irc_server *server,
weechat_buffer_set (ptr_buffer, "localvar_set_type",
(channel_type == IRC_CHANNEL_TYPE_CHANNEL) ? "channel" : "private");
weechat_buffer_set (ptr_buffer, "localvar_set_nick", server->nick);
- weechat_buffer_set (ptr_buffer, "localvar_set_nick_host", server->nick_host);
+ weechat_buffer_set (ptr_buffer, "localvar_set_host", server->host);
weechat_buffer_set (ptr_buffer, "localvar_set_server", server->name);
weechat_buffer_set (ptr_buffer, "localvar_set_channel", channel_name);
if (server->is_away && server->away_message)
diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c
index bb16477f9..ef2f097ae 100644
--- a/src/plugins/irc/irc-protocol.c
+++ b/src/plugins/irc/irc-protocol.c
@@ -834,7 +834,7 @@ IRC_PROTOCOL_CALLBACK(chghost)
snprintf (str_host, length, "%s@%s", argv[2], pos_new_host);
if (local_chghost)
- irc_server_set_nick_host (server, str_host);
+ irc_server_set_host (server, str_host);
for (ptr_channel = server->channels; ptr_channel;
ptr_channel = ptr_channel->next_channel)
@@ -1201,7 +1201,7 @@ IRC_PROTOCOL_CALLBACK(join)
if (local_join)
{
- irc_server_set_nick_host (server, address);
+ irc_server_set_host (server, address);
irc_bar_item_update_channel ();
}
@@ -1524,7 +1524,7 @@ IRC_PROTOCOL_CALLBACK(nick)
if (local_nick)
{
irc_server_set_nick (server, new_nick);
- irc_server_set_nick_host (server, address);
+ irc_server_set_host (server, address);
}
ptr_nick_found = NULL;
diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c
index 28d0136af..03fd58093 100644
--- a/src/plugins/irc/irc-server.c
+++ b/src/plugins/irc/irc-server.c
@@ -761,33 +761,33 @@ irc_server_set_nick (struct t_irc_server *server, const char *nick)
}
/*
- * Sets nick host for server.
+ * Sets host for server.
*/
void
-irc_server_set_nick_host (struct t_irc_server *server, const char *host)
+irc_server_set_host (struct t_irc_server *server, const char *host)
{
struct t_irc_channel *ptr_channel;
/* if host is the same, just return */
- if ((!server->nick_host && !host)
- || (server->nick_host && host && strcmp (server->nick_host, host) == 0))
+ if ((!server->host && !host)
+ || (server->host && host && strcmp (server->host, host) == 0))
{
return;
}
/* update the nick host in server */
- if (server->nick_host)
- free (server->nick_host);
- server->nick_host = (host) ? strdup (host) : NULL;
+ if (server->host)
+ free (server->host);
+ server->host = (host) ? strdup (host) : NULL;
- /* set local variable "nick_host" for server and all channels/pv */
- weechat_buffer_set (server->buffer, "localvar_set_nick_host", host);
+ /* set local variable "host" for server and all channels/pv */
+ weechat_buffer_set (server->buffer, "localvar_set_host", host);
for (ptr_channel = server->channels; ptr_channel;
ptr_channel = ptr_channel->next_channel)
{
weechat_buffer_set (ptr_channel->buffer,
- "localvar_set_nick_host", host);
+ "localvar_set_host", host);
}
weechat_bar_item_update ("irc_host");
@@ -1379,7 +1379,7 @@ irc_server_alloc (const char *name)
new_server->nick_alternate_number = -1;
new_server->nick = NULL;
new_server->nick_modes = NULL;
- new_server->nick_host = NULL;
+ new_server->host = NULL;
new_server->checking_cap_ls = 0;
new_server->cap_ls = weechat_hashtable_new (32,
WEECHAT_HASHTABLE_STRING,
@@ -1907,8 +1907,8 @@ irc_server_free_data (struct t_irc_server *server)
free (server->nick);
if (server->nick_modes)
free (server->nick_modes);
- if (server->nick_host)
- free (server->nick_host);
+ if (server->host)
+ free (server->host);
if (server->isupport)
free (server->isupport);
if (server->prefix_modes)
@@ -5116,10 +5116,10 @@ irc_server_disconnect (struct t_irc_server *server, int switch_address,
weechat_bar_item_update ("input_prompt");
weechat_bar_item_update ("irc_nick_modes");
}
- if (server->nick_host)
+ if (server->host)
{
- free (server->nick_host);
- server->nick_host = NULL;
+ free (server->host);
+ server->host = NULL;
weechat_bar_item_update ("irc_host");
weechat_bar_item_update ("irc_nick_host");
}
@@ -5681,7 +5681,7 @@ irc_server_hdata_server_cb (const void *pointer, void *data,
WEECHAT_HDATA_VAR(struct t_irc_server, nick_alternate_number, INTEGER, 0, NULL, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, nick, STRING, 0, NULL, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, nick_modes, STRING, 0, NULL, NULL);
- WEECHAT_HDATA_VAR(struct t_irc_server, nick_host, STRING, 0, NULL, NULL);
+ WEECHAT_HDATA_VAR(struct t_irc_server, host, STRING, 0, NULL, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, checking_cap_ls, INTEGER, 0, NULL, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, cap_ls, HASHTABLE, 0, NULL, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, checking_cap_list, INTEGER, 0, NULL, NULL);
@@ -5907,7 +5907,7 @@ irc_server_add_to_infolist (struct t_infolist *infolist,
return 0;
if (!weechat_infolist_new_var_string (ptr_item, "nick_modes", server->nick_modes))
return 0;
- if (!weechat_infolist_new_var_string (ptr_item, "nick_host", server->nick_host))
+ if (!weechat_infolist_new_var_string (ptr_item, "host", server->host))
return 0;
if (!weechat_infolist_new_var_integer (ptr_item, "checking_cap_ls", server->checking_cap_ls))
return 0;
@@ -6295,7 +6295,7 @@ irc_server_print_log ()
weechat_log_printf (" nick_alternate_number: %d", ptr_server->nick_alternate_number);
weechat_log_printf (" nick . . . . . . . . : '%s'", ptr_server->nick);
weechat_log_printf (" nick_modes . . . . . : '%s'", ptr_server->nick_modes);
- weechat_log_printf (" nick_host. . . . . . : '%s'", ptr_server->nick_host);
+ weechat_log_printf (" host . . . . . . . . : '%s'", ptr_server->host);
weechat_log_printf (" checking_cap_ls. . . : %d", ptr_server->checking_cap_ls);
weechat_log_printf (" cap_ls . . . . . . . : 0x%lx (hashtable: '%s')",
ptr_server->cap_ls,
diff --git a/src/plugins/irc/irc-server.h b/src/plugins/irc/irc-server.h
index 831ce14cd..62c2c3063 100644
--- a/src/plugins/irc/irc-server.h
+++ b/src/plugins/irc/irc-server.h
@@ -192,7 +192,7 @@ struct t_irc_server
/* (nick____1, nick____2, ...) */
char *nick; /* current nickname */
char *nick_modes; /* nick modes */
- char *nick_host; /* nick host (set if known) */
+ char *host; /* self host (set if known) */
int checking_cap_ls; /* 1 if checking supported capabilities */
struct t_hashtable *cap_ls; /* list of supported capabilities */
int checking_cap_list; /* 1 if checking enabled capabilities */
@@ -295,8 +295,8 @@ extern void irc_server_set_nicks (struct t_irc_server *server,
const char *nicks);
extern void irc_server_set_nick (struct t_irc_server *server,
const char *nick);
-extern void irc_server_set_nick_host (struct t_irc_server *server,
- const char *nick_host);
+extern void irc_server_set_host (struct t_irc_server *server,
+ const char *host);
extern const char *irc_server_get_alternate_nick (struct t_irc_server *server);
extern const char *irc_server_get_isupport_value (struct t_irc_server *server,
const char *feature);
diff --git a/src/plugins/irc/irc-upgrade.c b/src/plugins/irc/irc-upgrade.c
index 35082bab4..4276d84fe 100644
--- a/src/plugins/irc/irc-upgrade.c
+++ b/src/plugins/irc/irc-upgrade.c
@@ -420,9 +420,9 @@ irc_upgrade_read_cb (const void *pointer, void *data,
str = weechat_infolist_string (infolist, "nick_modes");
if (str)
irc_upgrade_current_server->nick_modes = strdup (str);
- str = weechat_infolist_string (infolist, "nick_host");
+ str = weechat_infolist_string (infolist, "host");
if (str)
- irc_upgrade_current_server->nick_host = strdup (str);
+ irc_upgrade_current_server->host = strdup (str);
/*
* "cap_ls" and "cap_list" replace "cap_away_notify",
* "cap_account_notify" and "cap_extended_join"