Fixed merge problem and set better default names.

This commit is contained in:
irungentoo 2013-08-13 07:39:04 -04:00
parent d0cd78fbea
commit 8fe1dec5d6
2 changed files with 8 additions and 2 deletions

View File

@ -181,7 +181,7 @@ static void chat_onKey(ToxWindow *self, Messenger *m, int key)
/* make sure the string has at least non-space character */
if (!string_is_empty(ctx->line)) {
uint8_t selfname[MAX_NAME_LENGTH];
getself_name(m, selfname);
getself_name(m, selfname, sizeof(selfname));
fix_name(selfname);
wattron(ctx->history, COLOR_PAIR(2));

View File

@ -140,7 +140,13 @@ static void init_tox()
m_callback_namechange(m, on_nickchange, NULL);
m_callback_statusmessage(m, on_statuschange, NULL);
m_callback_action(m, on_action, NULL);
setname(m, (uint8_t*) "n00b", strlen("n00b")+1);
#ifdef __linux__
setname(m, (uint8_t*) "Cool guy", sizeof("Cool guy"));
#elif WIN32
setname(m, (uint8_t*) "I should install GNU/Linux", sizeof("I should install GNU/Linux"));
#else
setname(m, (uint8_t*) "Hipster", sizeof("Hipster"));
#endif
}
#define MAXLINE 90 /* Approx max number of chars in a sever line (IP + port + key) */