Added a notice for friends going offline.
This commit is contained in:
parent
0fb2d0b205
commit
e02f0db030
1 changed files with 13 additions and 6 deletions
|
@ -82,17 +82,24 @@ tox_weechat_connection_status_callback(Tox *tox,
|
||||||
uint8_t status,
|
uint8_t status,
|
||||||
void *data)
|
void *data)
|
||||||
{
|
{
|
||||||
if (status == 1)
|
|
||||||
{
|
|
||||||
struct t_tox_weechat_identity *identity = data;
|
struct t_tox_weechat_identity *identity = data;
|
||||||
char *name = tox_weechat_get_name_nt(identity->tox, friend_number);
|
char *name = tox_weechat_get_name_nt(identity->tox, friend_number);
|
||||||
|
|
||||||
|
if (status == 0)
|
||||||
|
{
|
||||||
weechat_printf(identity->buffer,
|
weechat_printf(identity->buffer,
|
||||||
"%s%s just went online!",
|
"%s%s just went offline.",
|
||||||
weechat_prefix("network"),
|
weechat_prefix("network"),
|
||||||
name);
|
name);
|
||||||
free(name);
|
|
||||||
}
|
}
|
||||||
|
else if (status == 1)
|
||||||
|
{
|
||||||
|
weechat_printf(identity->buffer,
|
||||||
|
"%s%s just came online.",
|
||||||
|
weechat_prefix("network"),
|
||||||
|
name);
|
||||||
|
}
|
||||||
|
free(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in a new issue