mirror of
https://github.com/weechat/weechat.git
synced 2026-06-26 04:46:37 +02:00
Added hostnames associeted to nicks in plugins/scripts
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user