From cb39cdbe5ec9002d2c52e6f4f938e1c370acbc9b Mon Sep 17 00:00:00 2001 From: Sean Qureshi Date: Mon, 5 Aug 2013 15:39:32 -0700 Subject: Throws in a bell when a message is recieved, to warn to user --- testing/toxic/chat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/testing/toxic/chat.c b/testing/toxic/chat.c index ff7a1667..ee68dc9f 100644 --- a/testing/toxic/chat.c +++ b/testing/toxic/chat.c @@ -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) { ChatContext* ctx = (ChatContext*) self->x; uint8_t nick[MAX_NAME_LENGTH] = {0}; - + time_t now; time(&now); 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); self->blink = true; + beep(); } static void chat_onNickChange(ToxWindow* self, int num, uint8_t* nick, uint16_t len) { -- cgit v1.2.3