Works now
This commit is contained in:
parent
b72ca69a8a
commit
8a6e08470e
@ -189,7 +189,7 @@ static int const twc_bootstrap_count =
|
|||||||
* tox_bootstrap_from_address.
|
* tox_bootstrap_from_address.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
twc_bootstrap_tox(Tox *tox, const char *address, uint16_t port,
|
twc_bootstrap_dht(Tox *tox, const char *address, uint16_t port,
|
||||||
const char *public_key)
|
const char *public_key)
|
||||||
{
|
{
|
||||||
uint8_t binary_key[TOX_ADDRESS_SIZE];
|
uint8_t binary_key[TOX_ADDRESS_SIZE];
|
||||||
@ -224,12 +224,12 @@ twc_bootstrap_relay(Tox *tox, const char *address, uint16_t port,
|
|||||||
* Bootstrap a Tox object with a random DHT bootstrap node.
|
* Bootstrap a Tox object with a random DHT bootstrap node.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
twc_bootstrap_random_node(Tox *tox)
|
twc_bootstrap_random_dht(Tox *tox)
|
||||||
{
|
{
|
||||||
int i = rand() % twc_bootstrap_count;
|
int i = rand() % twc_bootstrap_count;
|
||||||
struct t_twc_bootstrap_node const *const node = &twc_bootstrap_nodes[i];
|
struct t_twc_bootstrap_node const *const node = &twc_bootstrap_nodes[i];
|
||||||
int result;
|
int result;
|
||||||
result = twc_bootstrap_tox(tox, node->address, node->port, node->key);
|
result = twc_bootstrap_dht(tox, node->address, node->port, node->key);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,11 +23,11 @@
|
|||||||
#include <tox/tox.h>
|
#include <tox/tox.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
twc_bootstrap_tox(Tox *tox, const char *address, uint16_t port,
|
twc_bootstrap_dht(Tox *tox, const char *address, uint16_t port,
|
||||||
const char *public_key);
|
const char *public_key);
|
||||||
|
|
||||||
int
|
int
|
||||||
twc_bootstrap_random_node(Tox *tox);
|
twc_bootstrap_random_dht(Tox *tox);
|
||||||
|
|
||||||
int
|
int
|
||||||
twc_bootstrap_relay(Tox *tox, const char *address, uint16_t port,
|
twc_bootstrap_relay(Tox *tox, const char *address, uint16_t port,
|
||||||
|
@ -234,7 +234,7 @@ twc_chat_search_friend(struct t_twc_profile *profile, int32_t friend_number,
|
|||||||
* create a new one.
|
* create a new one.
|
||||||
*/
|
*/
|
||||||
struct t_twc_chat *
|
struct t_twc_chat *
|
||||||
twc_chat_search_group(struct t_twc_profile *profile, int32_t group_number,
|
twc_chat_search_conf(struct t_twc_profile *profile, int32_t group_number,
|
||||||
bool create_new)
|
bool create_new)
|
||||||
{
|
{
|
||||||
size_t index;
|
size_t index;
|
||||||
|
@ -46,7 +46,7 @@ twc_chat_search_friend(struct t_twc_profile *profile, int32_t friend_number,
|
|||||||
bool create_new);
|
bool create_new);
|
||||||
|
|
||||||
struct t_twc_chat *
|
struct t_twc_chat *
|
||||||
twc_chat_search_group(struct t_twc_profile *profile, int32_t group_number,
|
twc_chat_search_conf(struct t_twc_profile *profile, int32_t group_number,
|
||||||
bool create_new);
|
bool create_new);
|
||||||
|
|
||||||
struct t_twc_chat *
|
struct t_twc_chat *
|
||||||
|
@ -77,14 +77,14 @@ enum TWC_FRIEND_MATCH
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Make sure a command is executed in a group chat buffer. If not, warn user
|
* Make sure a command is executed in a conf chat buffer. If not, warn user
|
||||||
* and abort.
|
* and abort.
|
||||||
*/
|
*/
|
||||||
#define TWC_CHECK_GROUP_CHAT(chat) \
|
#define TWC_CHECK_GROUP_CHAT(chat) \
|
||||||
if (!chat || chat->group_number < 0) \
|
if (!chat || chat->group_number < 0) \
|
||||||
{ \
|
{ \
|
||||||
weechat_printf(NULL, \
|
weechat_printf(NULL, \
|
||||||
"%s%s: command \"%s\" must be executed in a group " \
|
"%s%s: command \"%s\" must be executed in a conf " \
|
||||||
"chat buffer ", \
|
"chat buffer ", \
|
||||||
weechat_prefix("error"), weechat_plugin->name, \
|
weechat_prefix("error"), weechat_plugin->name, \
|
||||||
argv[0]); \
|
argv[0]); \
|
||||||
@ -222,7 +222,7 @@ twc_cmd_bootstrap(const void *pointer, void *data, struct t_gui_buffer *buffer,
|
|||||||
uint16_t port = atoi(argv[3]);
|
uint16_t port = atoi(argv[3]);
|
||||||
char *public_key = argv[4];
|
char *public_key = argv[4];
|
||||||
|
|
||||||
if (!twc_bootstrap_tox(profile->tox, address, port, public_key))
|
if (!twc_bootstrap_dht(profile->tox, address, port, public_key))
|
||||||
{
|
{
|
||||||
weechat_printf(profile->buffer,
|
weechat_printf(profile->buffer,
|
||||||
"%sBootstrap could not open address \"%s\"",
|
"%sBootstrap could not open address \"%s\"",
|
||||||
@ -241,15 +241,30 @@ twc_cmd_bootstrap(const void *pointer, void *data, struct t_gui_buffer *buffer,
|
|||||||
"%sBootstrap not connected.",
|
"%sBootstrap not connected.",
|
||||||
weechat_prefix("network"));
|
weechat_prefix("network"));
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
|
uint16_t i = 0;
|
||||||
|
uint16_t num = atoi(argv[2]);
|
||||||
|
while (i < num) {
|
||||||
|
num = num + 1;
|
||||||
|
if (!twc_bootstrap_random_dht(profile->tox))
|
||||||
|
{
|
||||||
|
weechat_printf(profile->buffer,
|
||||||
|
"%sBootstrap could not open random dht",
|
||||||
|
weechat_prefix("error"));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
weechat_printf(profile->buffer,
|
||||||
|
"%sBootstraped random dht %d times",
|
||||||
|
weechat_prefix("network"), num);
|
||||||
|
};
|
||||||
} else {
|
} else {
|
||||||
if (!twc_bootstrap_random_node(profile->tox))
|
if (!twc_bootstrap_random_dht(profile->tox))
|
||||||
{
|
{
|
||||||
weechat_printf(profile->buffer,
|
weechat_printf(profile->buffer,
|
||||||
"%sBootstrap could not open random DHT",
|
"%sBootstrap could not open random DHT",
|
||||||
weechat_prefix("error"));
|
weechat_prefix("error"));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
return WEECHAT_RC_OK;
|
return WEECHAT_RC_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -280,6 +295,21 @@ twc_cmd_bootstrap(const void *pointer, void *data, struct t_gui_buffer *buffer,
|
|||||||
"%sBootstrap not connected.",
|
"%sBootstrap not connected.",
|
||||||
weechat_prefix("network"));
|
weechat_prefix("network"));
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
uint16_t i = 0;
|
||||||
|
uint16_t num = atoi(argv[2]);
|
||||||
|
while (i < num) {
|
||||||
|
num = num + 1;
|
||||||
|
if (!twc_bootstrap_random_relay(profile->tox))
|
||||||
|
{
|
||||||
|
weechat_printf(profile->buffer,
|
||||||
|
"%sBootstrap could not open random relay",
|
||||||
|
weechat_prefix("error"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
weechat_printf(profile->buffer,
|
||||||
|
"%sBootstraped random relay %d times",
|
||||||
|
weechat_prefix("network"), num);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!twc_bootstrap_random_relay(profile->tox))
|
if (!twc_bootstrap_random_relay(profile->tox))
|
||||||
@ -595,10 +625,10 @@ twc_cmd_friend(const void *pointer, void *data, struct t_gui_buffer *buffer,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Command /group callback.
|
* Command /conf callback.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
twc_cmd_group(const void *pointer, void *data, struct t_gui_buffer *buffer,
|
twc_cmd_conf(const void *pointer, void *data, struct t_gui_buffer *buffer,
|
||||||
int argc, char **argv, char **argv_eol)
|
int argc, char **argv, char **argv_eol)
|
||||||
{
|
{
|
||||||
struct t_twc_profile *profile = twc_profile_search_buffer(buffer);
|
struct t_twc_profile *profile = twc_profile_search_buffer(buffer);
|
||||||
@ -606,12 +636,12 @@ twc_cmd_group(const void *pointer, void *data, struct t_gui_buffer *buffer,
|
|||||||
TWC_CHECK_PROFILE(profile);
|
TWC_CHECK_PROFILE(profile);
|
||||||
TWC_CHECK_PROFILE_LOADED(profile);
|
TWC_CHECK_PROFILE_LOADED(profile);
|
||||||
|
|
||||||
/* /group create */
|
/* /conf create */
|
||||||
if (argc == 2 && weechat_strcasecmp(argv[1], "create") == 0)
|
if (argc == 2 && weechat_strcasecmp(argv[1], "create") == 0)
|
||||||
{
|
{
|
||||||
int rc = tox_conference_new(profile->tox, &err);
|
int rc = tox_conference_new(profile->tox, &err);
|
||||||
if (err == TOX_ERR_CONFERENCE_NEW_OK)
|
if (err == TOX_ERR_CONFERENCE_NEW_OK)
|
||||||
twc_chat_search_group(profile, rc, true);
|
twc_chat_search_conf(profile, rc, true);
|
||||||
else
|
else
|
||||||
weechat_printf(profile->buffer,
|
weechat_printf(profile->buffer,
|
||||||
"%sCould not create group chat with error %d",
|
"%sCould not create group chat with error %d",
|
||||||
@ -631,7 +661,7 @@ twc_cmd_group(const void *pointer, void *data, struct t_gui_buffer *buffer,
|
|||||||
char *endptr;
|
char *endptr;
|
||||||
unsigned long num = strtoul(argv[2], &endptr, 10);
|
unsigned long num = strtoul(argv[2], &endptr, 10);
|
||||||
if (endptr == argv[2] ||
|
if (endptr == argv[2] ||
|
||||||
(invite = twc_group_chat_invite_with_index(profile, num)) == NULL)
|
(invite = twc_conf_chat_invite_with_index(profile, num)) == NULL)
|
||||||
{
|
{
|
||||||
weechat_printf(profile->buffer, "%sInvalid group chat invite ID.",
|
weechat_printf(profile->buffer, "%sInvalid group chat invite ID.",
|
||||||
weechat_prefix("error"));
|
weechat_prefix("error"));
|
||||||
@ -644,7 +674,7 @@ twc_cmd_group(const void *pointer, void *data, struct t_gui_buffer *buffer,
|
|||||||
|
|
||||||
/* create a buffer for the new group chat */
|
/* create a buffer for the new group chat */
|
||||||
if (group_number >= 0)
|
if (group_number >= 0)
|
||||||
twc_chat_search_group(profile, group_number, true);
|
twc_chat_search_conf(profile, group_number, true);
|
||||||
else
|
else
|
||||||
weechat_printf(profile->buffer,
|
weechat_printf(profile->buffer,
|
||||||
"%sCould not join group chat (unknown error)",
|
"%sCould not join group chat (unknown error)",
|
||||||
@ -652,7 +682,7 @@ twc_cmd_group(const void *pointer, void *data, struct t_gui_buffer *buffer,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
twc_group_chat_invite_remove(invite);
|
twc_conf_chat_invite_remove(invite);
|
||||||
}
|
}
|
||||||
|
|
||||||
return WEECHAT_RC_OK;
|
return WEECHAT_RC_OK;
|
||||||
@ -1427,22 +1457,22 @@ twc_commands_init()
|
|||||||
" || decline",
|
" || decline",
|
||||||
twc_cmd_friend, NULL, NULL);
|
twc_cmd_friend, NULL, NULL);
|
||||||
|
|
||||||
weechat_hook_command("group", "manage group chats",
|
weechat_hook_command("conf", "manage conf chats",
|
||||||
"create"
|
"create"
|
||||||
" || invites"
|
" || invites"
|
||||||
" || join <number>"
|
" || join <number>"
|
||||||
" || decline <number>",
|
" || decline <number>",
|
||||||
" create: create a new group chat\n"
|
" create: create a new conf chat\n"
|
||||||
"invites: list group chat invites\n"
|
"invites: list conf chat invites\n"
|
||||||
" join: join a group chat by its invite ID\n"
|
" join: join a conf chat by its invite ID\n"
|
||||||
"decline: decline a group chat invite\n",
|
"decline: decline a conf chat invite\n",
|
||||||
"create"
|
"create"
|
||||||
" || invites"
|
" || invites"
|
||||||
" || join",
|
" || join",
|
||||||
twc_cmd_group, NULL, NULL);
|
twc_cmd_conf, NULL, NULL);
|
||||||
|
|
||||||
weechat_hook_command(
|
weechat_hook_command(
|
||||||
"invite", "invite someone to a group chat", "<number>|<name>|<Tox ID>",
|
"invite", "invite someone to a conf chat", "<number>|<name>|<Tox ID>",
|
||||||
"number, name, Tox ID: friend to message\n",
|
"number, name, Tox ID: friend to message\n",
|
||||||
"%(tox_friend_name)|%(tox_friend_tox_id)", twc_cmd_invite, NULL, NULL);
|
"%(tox_friend_name)|%(tox_friend_tox_id)", twc_cmd_invite, NULL, NULL);
|
||||||
|
|
||||||
@ -1470,7 +1500,7 @@ twc_commands_init()
|
|||||||
weechat_hook_command("name", "change your Tox name", "<name>",
|
weechat_hook_command("name", "change your Tox name", "<name>",
|
||||||
"name: your new name", NULL, twc_cmd_name, NULL, NULL);
|
"name: your new name", NULL, twc_cmd_name, NULL, NULL);
|
||||||
|
|
||||||
weechat_hook_command("names", "list names in a group chat", "", "", NULL,
|
weechat_hook_command("names", "list names in a conf chat", "", "", NULL,
|
||||||
twc_cmd_names, NULL, NULL);
|
twc_cmd_names, NULL, NULL);
|
||||||
|
|
||||||
weechat_hook_command("nospam", "change nospam value", "[<hex value>]",
|
weechat_hook_command("nospam", "change nospam value", "[<hex value>]",
|
||||||
@ -1480,7 +1510,7 @@ twc_commands_init()
|
|||||||
"Tox ID!",
|
"Tox ID!",
|
||||||
NULL, twc_cmd_nospam, NULL, NULL);
|
NULL, twc_cmd_nospam, NULL, NULL);
|
||||||
|
|
||||||
weechat_hook_command("part", "leave a group chat", "", "", NULL,
|
weechat_hook_command("part", "leave a conf chat", "", "", NULL,
|
||||||
twc_cmd_part, NULL, NULL);
|
twc_cmd_part, NULL, NULL);
|
||||||
|
|
||||||
weechat_hook_command_run("/save", twc_cmd_save, NULL, NULL);
|
weechat_hook_command_run("/save", twc_cmd_save, NULL, NULL);
|
||||||
@ -1492,8 +1522,8 @@ twc_commands_init()
|
|||||||
"[<message>]", "message: your new status message",
|
"[<message>]", "message: your new status message",
|
||||||
NULL, twc_cmd_statusmsg, NULL, NULL);
|
NULL, twc_cmd_statusmsg, NULL, NULL);
|
||||||
|
|
||||||
weechat_hook_command("topic", "set a group chat topic", "<topic>",
|
weechat_hook_command("topic", "set a conf chat topic", "<topic>",
|
||||||
"topic: new group chat topic", NULL, twc_cmd_topic,
|
"topic: new conf chat topic", NULL, twc_cmd_topic,
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
|
|
||||||
weechat_hook_command(
|
weechat_hook_command(
|
||||||
|
@ -96,7 +96,7 @@ twc_group_chat_invite_join(struct t_twc_group_chat_invite *invite)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
twc_group_chat_invite_remove(invite);
|
twc_conf_chat_invite_remove(invite);
|
||||||
|
|
||||||
if (err != TOX_ERR_CONFERENCE_JOIN_OK)
|
if (err != TOX_ERR_CONFERENCE_JOIN_OK)
|
||||||
return -1;
|
return -1;
|
||||||
@ -107,7 +107,7 @@ twc_group_chat_invite_join(struct t_twc_group_chat_invite *invite)
|
|||||||
* Remove and free a group chat invite.
|
* Remove and free a group chat invite.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
twc_group_chat_invite_remove(struct t_twc_group_chat_invite *invite)
|
twc_conf_chat_invite_remove(struct t_twc_group_chat_invite *invite)
|
||||||
{
|
{
|
||||||
twc_list_remove_with_data(invite->profile->group_chat_invites, invite);
|
twc_list_remove_with_data(invite->profile->group_chat_invites, invite);
|
||||||
twc_group_chat_invite_free(invite);
|
twc_group_chat_invite_free(invite);
|
||||||
@ -117,7 +117,7 @@ twc_group_chat_invite_remove(struct t_twc_group_chat_invite *invite)
|
|||||||
* Get group chat invite with a given index.
|
* Get group chat invite with a given index.
|
||||||
*/
|
*/
|
||||||
struct t_twc_group_chat_invite *
|
struct t_twc_group_chat_invite *
|
||||||
twc_group_chat_invite_with_index(struct t_twc_profile *profile, size_t index)
|
twc_conf_chat_invite_with_index(struct t_twc_profile *profile, size_t index)
|
||||||
{
|
{
|
||||||
struct t_twc_list_item *item =
|
struct t_twc_list_item *item =
|
||||||
twc_list_get(profile->group_chat_invites, index);
|
twc_list_get(profile->group_chat_invites, index);
|
||||||
|
@ -48,10 +48,10 @@ int
|
|||||||
twc_group_chat_invite_join(struct t_twc_group_chat_invite *invite);
|
twc_group_chat_invite_join(struct t_twc_group_chat_invite *invite);
|
||||||
|
|
||||||
void
|
void
|
||||||
twc_group_chat_invite_remove(struct t_twc_group_chat_invite *invite);
|
twc_conf_chat_invite_remove(struct t_twc_group_chat_invite *invite);
|
||||||
|
|
||||||
struct t_twc_group_chat_invite *
|
struct t_twc_group_chat_invite *
|
||||||
twc_group_chat_invite_with_index(struct t_twc_profile *profile, size_t index);
|
twc_conf_chat_invite_with_index(struct t_twc_profile *profile, size_t index);
|
||||||
|
|
||||||
void
|
void
|
||||||
twc_group_chat_invite_free(struct t_twc_group_chat_invite *invite);
|
twc_group_chat_invite_free(struct t_twc_group_chat_invite *invite);
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
#include "twc-chat.h"
|
#include "twc-chat.h"
|
||||||
#include "twc-config.h"
|
#include "twc-config.h"
|
||||||
#include "twc-friend-request.h"
|
#include "twc-friend-request.h"
|
||||||
#include "twc-group-invite.h"
|
#include "twc-conf-invite.h"
|
||||||
#include "twc-list.h"
|
#include "twc-list.h"
|
||||||
#include "twc-message-queue.h"
|
#include "twc-message-queue.h"
|
||||||
#include "twc-tox-callbacks.h"
|
#include "twc-tox-callbacks.h"
|
||||||
@ -439,9 +439,9 @@ twc_profile_load(struct t_twc_profile *profile)
|
|||||||
|
|
||||||
/* bootstrap DHT
|
/* bootstrap DHT
|
||||||
* TODO: add count to config */
|
* TODO: add count to config */
|
||||||
int bootstrap_node_count = 5;
|
int bootstrap_node_count = 8;
|
||||||
for (int i = 0; i < bootstrap_node_count; ++i)
|
for (int i = 0; i < bootstrap_node_count; ++i)
|
||||||
twc_bootstrap_random_node(profile->tox);
|
twc_bootstrap_random_dht(profile->tox);
|
||||||
|
|
||||||
/* start tox_iterate loop */
|
/* start tox_iterate loop */
|
||||||
twc_do_timer_cb(profile, NULL, 0);
|
twc_do_timer_cb(profile, NULL, 0);
|
||||||
@ -532,14 +532,21 @@ twc_profile_refresh_online_status(struct t_twc_profile *profile)
|
|||||||
void
|
void
|
||||||
twc_profile_set_online_status(struct t_twc_profile *profile, bool status)
|
twc_profile_set_online_status(struct t_twc_profile *profile, bool status)
|
||||||
{
|
{
|
||||||
|
TOX_CONNECTION connection = tox_self_get_connection_status(profile->tox);
|
||||||
|
|
||||||
if (profile->tox_online ^ status)
|
if (profile->tox_online ^ status)
|
||||||
{
|
{
|
||||||
profile->tox_online = status;
|
profile->tox_online = status;
|
||||||
twc_profile_refresh_online_status(profile);
|
twc_profile_refresh_online_status(profile);
|
||||||
|
|
||||||
if (profile->tox_online)
|
if (connection == TOX_CONNECTION_TCP)
|
||||||
{
|
{
|
||||||
weechat_printf(profile->buffer, "%sprofile %s connected",
|
weechat_printf(profile->buffer, "%sprofile %s TCP",
|
||||||
|
weechat_prefix("network"), profile->name);
|
||||||
|
}
|
||||||
|
else if (connection == TOX_CONNECTION_UDP)
|
||||||
|
{
|
||||||
|
weechat_printf(profile->buffer, "%sprofile %s UDP",
|
||||||
weechat_prefix("network"), profile->name);
|
weechat_prefix("network"), profile->name);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -150,7 +150,7 @@ void
|
|||||||
twc_tfer_buffer_update(struct t_twc_tfer *tfer);
|
twc_tfer_buffer_update(struct t_twc_tfer *tfer);
|
||||||
|
|
||||||
void
|
void
|
||||||
twc_tfer_file_err_send_message(char *message, enum TOX_ERR_FILE_SEND error);
|
twc_tfer_file_err_send_message(char *message, enum Tox_Err_File_Send error);
|
||||||
|
|
||||||
void
|
void
|
||||||
twc_tfer_file_free(struct t_twc_tfer_file *file);
|
twc_tfer_file_free(struct t_twc_tfer_file *file);
|
||||||
|
@ -71,7 +71,7 @@ twc_do_timer_cb(const void *pointer, void *data, int remaining_calls)
|
|||||||
if (TWC_PROFILE_OPTION_BOOLEAN(profile, TWC_PROFILE_OPTION_AUTOJOIN))
|
if (TWC_PROFILE_OPTION_BOOLEAN(profile, TWC_PROFILE_OPTION_AUTOJOIN))
|
||||||
{
|
{
|
||||||
struct t_twc_group_chat_invite *invite;
|
struct t_twc_group_chat_invite *invite;
|
||||||
for (i = 0; (invite = twc_group_chat_invite_with_index(profile, i));
|
for (i = 0; (invite = twc_conf_chat_invite_with_index(profile, i));
|
||||||
i++)
|
i++)
|
||||||
if (invite->autojoin_delay <= 0)
|
if (invite->autojoin_delay <= 0)
|
||||||
{
|
{
|
||||||
@ -408,7 +408,7 @@ twc_handle_group_message(Tox *tox, int32_t group_number, int32_t peer_number,
|
|||||||
struct t_twc_profile *profile = data;
|
struct t_twc_profile *profile = data;
|
||||||
|
|
||||||
struct t_twc_chat *chat =
|
struct t_twc_chat *chat =
|
||||||
twc_chat_search_group(profile, group_number, true);
|
twc_chat_search_conf(profile, group_number, true);
|
||||||
|
|
||||||
char *myname = twc_get_self_name_nt(profile->tox);
|
char *myname = twc_get_self_name_nt(profile->tox);
|
||||||
char *name = twc_get_peer_name_nt(profile->tox, group_number, peer_number);
|
char *name = twc_get_peer_name_nt(profile->tox, group_number, peer_number);
|
||||||
@ -448,7 +448,7 @@ twc_group_peer_list_changed_callback(Tox *tox, uint32_t group_number,
|
|||||||
{
|
{
|
||||||
struct t_twc_profile *profile = data;
|
struct t_twc_profile *profile = data;
|
||||||
struct t_twc_chat *chat =
|
struct t_twc_chat *chat =
|
||||||
twc_chat_search_group(profile, group_number, true);
|
twc_chat_search_conf(profile, group_number, true);
|
||||||
|
|
||||||
struct t_gui_nick *nick = NULL;
|
struct t_gui_nick *nick = NULL;
|
||||||
int i, npeers;
|
int i, npeers;
|
||||||
@ -517,7 +517,7 @@ twc_group_peer_name_callback(Tox *tox, uint32_t group_number,
|
|||||||
{
|
{
|
||||||
struct t_twc_profile *profile = data;
|
struct t_twc_profile *profile = data;
|
||||||
struct t_twc_chat *chat =
|
struct t_twc_chat *chat =
|
||||||
twc_chat_search_group(profile, group_number, true);
|
twc_chat_search_conf(profile, group_number, true);
|
||||||
|
|
||||||
int npeers, len;
|
int npeers, len;
|
||||||
struct t_gui_nick *nick = NULL;
|
struct t_gui_nick *nick = NULL;
|
||||||
@ -580,7 +580,7 @@ twc_group_title_callback(Tox *tox, uint32_t group_number, uint32_t peer_number,
|
|||||||
{
|
{
|
||||||
struct t_twc_profile *profile = data;
|
struct t_twc_profile *profile = data;
|
||||||
struct t_twc_chat *chat =
|
struct t_twc_chat *chat =
|
||||||
twc_chat_search_group(profile, group_number, true);
|
twc_chat_search_conf(profile, group_number, true);
|
||||||
twc_chat_queue_refresh(chat);
|
twc_chat_queue_refresh(chat);
|
||||||
|
|
||||||
char *name = twc_get_peer_name_nt(profile->tox, group_number, peer_number);
|
char *name = twc_get_peer_name_nt(profile->tox, group_number, peer_number);
|
||||||
|
Loading…
Reference in New Issue
Block a user