From 63d01191b61ce775795b686cfbb37d27b899c9e0 Mon Sep 17 00:00:00 2001 From: Přemysl Janouch Date: Sun, 19 Apr 2015 21:34:52 +0200 Subject: degesch: fix sending messages Now that the data model has changed. --- degesch.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/degesch.c b/degesch.c index 1918914..eca8a89 100644 --- a/degesch.c +++ b/degesch.c @@ -2211,9 +2211,14 @@ send_message_to_current_buffer (struct app_context *ctx, char *message) buffer_send_error (ctx, buffer, "This buffer is not a channel"); break; case BUFFER_CHANNEL: + // TODO: autosplit + irc_send (ctx, "PRIVMSG %s :%s", buffer->channel->name, message); + buffer_send (ctx, buffer, BUFFER_LINE_PRIVMSG, 0, + ctx->irc_nickname, NULL, "%s", message); + break; case BUFFER_PM: // TODO: autosplit - irc_send (ctx, "PRIVMSG %s :%s", buffer->name, message); + irc_send (ctx, "PRIVMSG %s :%s", buffer->user->nickname, message); buffer_send (ctx, buffer, BUFFER_LINE_PRIVMSG, 0, ctx->irc_nickname, NULL, "%s", message); break; -- cgit v1.2.3-70-g09d2