summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/plugins-interface.c1
-rw-r--r--src/plugins/scripts/lua/weechat-lua.c4
-rw-r--r--src/plugins/scripts/perl/weechat-perl.c3
-rw-r--r--src/plugins/scripts/python/weechat-python.c2
-rw-r--r--src/plugins/scripts/ruby/weechat-ruby.c4
-rw-r--r--src/plugins/weechat-plugin.h1
6 files changed, 13 insertions, 2 deletions
diff --git a/src/plugins/plugins-interface.c b/src/plugins/plugins-interface.c
index 0355036bf..24a45e09b 100644
--- a/src/plugins/plugins-interface.c
+++ b/src/plugins/plugins-interface.c
@@ -1015,6 +1015,7 @@ weechat_plugin_get_nick_info (t_weechat_plugin *plugin, char *server, char *chan
{
new_nick_info->nick = (ptr_nick->nick) ? strdup (ptr_nick->nick) : strdup ("");
new_nick_info->flags = ptr_nick->flags;
+ new_nick_info->host = ptr_nick->host;
new_nick_info->prev_nick = last_nick_info;
new_nick_info->next_nick = NULL;
diff --git a/src/plugins/scripts/lua/weechat-lua.c b/src/plugins/scripts/lua/weechat-lua.c
index 889f2c300..a10711385 100644
--- a/src/plugins/scripts/lua/weechat-lua.c
+++ b/src/plugins/scripts/lua/weechat-lua.c
@@ -1488,6 +1488,10 @@ weechat_lua_get_nick_info (lua_State *L)
lua_pushstring (lua_current_interpreter, "flags");
lua_pushnumber (lua_current_interpreter, ptr_nick->flags);
lua_rawset (lua_current_interpreter, -3);
+
+ lua_pushstring (lua_current_interpreter, "host");
+ lua_pushstring (lua_current_interpreter, ptr_nick->host);
+ lua_rawset (lua_current_interpreter, -3);
lua_rawset (lua_current_interpreter, -3);
}
diff --git a/src/plugins/scripts/perl/weechat-perl.c b/src/plugins/scripts/perl/weechat-perl.c
index d2e3aa297..4bbddebb6 100644
--- a/src/plugins/scripts/perl/weechat-perl.c
+++ b/src/plugins/scripts/perl/weechat-perl.c
@@ -1280,7 +1280,8 @@ static XS (XS_weechat_get_nick_info)
{
HV *nick_hash_member = (HV *) sv_2mortal((SV *) newHV());
- hv_store (nick_hash_member, "flags", 5, newSViv (ptr_nick->flags), 0);
+ hv_store (nick_hash_member, "flags", 5, newSViv (ptr_nick->flags), 0);
+ hv_store (nick_hash_member, "host", 4, newSVpv (ptr_nick->host, 0), 0);
hv_store (nick_hash, ptr_nick->nick, strlen(ptr_nick->nick), newRV_inc((SV *) nick_hash_member), 0);
}
diff --git a/src/plugins/scripts/python/weechat-python.c b/src/plugins/scripts/python/weechat-python.c
index 572130906..ee089fa9c 100644
--- a/src/plugins/scripts/python/weechat-python.c
+++ b/src/plugins/scripts/python/weechat-python.c
@@ -1230,6 +1230,8 @@ weechat_python_get_nick_info (PyObject *self, PyObject *args)
{
PyDict_SetItem(nick_hash_member, Py_BuildValue("s", "flags"),
Py_BuildValue("i", ptr_nick->flags));
+ PyDict_SetItem(nick_hash_member, Py_BuildValue("s", "host"),
+ Py_BuildValue("s", ptr_nick->host));
PyDict_SetItem(nick_hash, Py_BuildValue("s", ptr_nick->nick), nick_hash_member);
}
diff --git a/src/plugins/scripts/ruby/weechat-ruby.c b/src/plugins/scripts/ruby/weechat-ruby.c
index 1f6b8d933..45d066cf0 100644
--- a/src/plugins/scripts/ruby/weechat-ruby.c
+++ b/src/plugins/scripts/ruby/weechat-ruby.c
@@ -1470,7 +1470,9 @@ weechat_ruby_get_nick_info (VALUE class, VALUE server, VALUE channel)
{
rb_hash_aset (nick_hash_member, rb_str_new2("flags"),
INT2FIX(ptr_nick->flags));
-
+ rb_hash_aset (nick_hash_member, rb_str_new2("host"),
+ rb_str_new2(ptr_nick->host));
+
rb_hash_aset (nick_hash, rb_str_new2(ptr_nick->nick), nick_hash_member);
}
}
diff --git a/src/plugins/weechat-plugin.h b/src/plugins/weechat-plugin.h
index 107baf206..c0c70995d 100644
--- a/src/plugins/weechat-plugin.h
+++ b/src/plugins/weechat-plugin.h
@@ -118,6 +118,7 @@ struct t_plugin_nick_info
{
char *nick; /* nickname */
int flags; /* chanowner/chanadmin (unrealircd), */
+ char *host; /* hostname */
/* op, halfop, voice, away */
t_plugin_nick_info *prev_nick; /* link to previous nick */
t_plugin_nick_info *next_nick; /* link to next nick */