1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-07-06 03:37:55 +02:00

Throws in a bell when a message is recieved, to warn to user

This commit is contained in:
Sean Qureshi 2013-08-05 15:39:32 -07:00
parent aaf3ce9761
commit e9ca1321b0

3
chat.c
View File

@ -32,7 +32,7 @@ void execute(ToxWindow* self, ChatContext* ctx, char* cmd);
static void chat_onMessage(ToxWindow* self, int num, uint8_t* msg, uint16_t len) { static void chat_onMessage(ToxWindow* self, int num, uint8_t* msg, uint16_t len) {
ChatContext* ctx = (ChatContext*) self->x; ChatContext* ctx = (ChatContext*) self->x;
uint8_t nick[MAX_NAME_LENGTH] = {0}; uint8_t nick[MAX_NAME_LENGTH] = {0};
time_t now; time_t now;
time(&now); time(&now);
struct tm * timeinfo; struct tm * timeinfo;
@ -58,6 +58,7 @@ static void chat_onMessage(ToxWindow* self, int num, uint8_t* msg, uint16_t len)
wprintw(ctx->history, "%s\n", msg); wprintw(ctx->history, "%s\n", msg);
self->blink = true; self->blink = true;
beep();
} }
static void chat_onNickChange(ToxWindow* self, int num, uint8_t* nick, uint16_t len) { static void chat_onNickChange(ToxWindow* self, int num, uint8_t* nick, uint16_t len) {