mirror of
https://github.com/Tha14/toxic.git
synced 2025-07-05 17:56:45 +02:00
Merge pull request #213 from plutooo/master
Added chat windows, and some clean up.
This commit is contained in:
4
prompt.c
4
prompt.c
@ -221,7 +221,7 @@ static void execute(ToxWindow* self, char* cmd) {
|
||||
msg[0] = 0;
|
||||
msg++;
|
||||
|
||||
if(m_sendmessage(atoi(id), (uint8_t*) msg, strlen(msg)+1) != 1) {
|
||||
if(m_sendmessage(atoi(id), (uint8_t*) msg, strlen(msg)+1) < 0) {
|
||||
wprintw(self->window, "Error occurred while sending message.\n");
|
||||
}
|
||||
else {
|
||||
@ -312,6 +312,8 @@ static void prompt_onInit(ToxWindow* self) {
|
||||
ToxWindow new_prompt() {
|
||||
ToxWindow ret;
|
||||
|
||||
memset(&ret, 0, sizeof(ret));
|
||||
|
||||
ret.onKey = &prompt_onKey;
|
||||
ret.onDraw = &prompt_onDraw;
|
||||
ret.onInit = &prompt_onInit;
|
||||
|
Reference in New Issue
Block a user