blob: cf3d3f142f1dc995d6e7d9e9f8246b3ca1fd3946 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#include "common.h"
INT_PTR CToxProto::SetMyNickname(WPARAM wParam, LPARAM lParam)
{
ptrT nickname((wParam & SMNN_UNICODE) ? mir_u2t((TCHAR*)lParam) : mir_a2t((char*)lParam));
setTString("Nick", nickname);
TOX_ERR_SET_INFO error;
if (!tox_self_set_name(tox, (uint8_t*)(char*)ptrA(mir_utf8encodeT(nickname)), mir_tstrlen(nickname), &error))
{
debugLogA(__FUNCTION__": failed to set nick name");
return 1;
}
return 0;
}
|