aboutsummaryrefslogtreecommitdiff
path: root/degesch.c
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-04-19 21:34:52 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2015-04-19 21:34:52 +0200
commit63d01191b61ce775795b686cfbb37d27b899c9e0 (patch)
tree9e8cfded18a4ca204627ce0939ec23df18001976 /degesch.c
parentc3d96a8b2d00d0801fa0869574396aa3136b242b (diff)
downloadxK-63d01191b61ce775795b686cfbb37d27b899c9e0.tar.gz
xK-63d01191b61ce775795b686cfbb37d27b899c9e0.tar.xz
xK-63d01191b61ce775795b686cfbb37d27b899c9e0.zip
degesch: fix sending messages
Now that the data model has changed.
Diffstat (limited to 'degesch.c')
-rw-r--r--degesch.c7
1 files changed, 6 insertions, 1 deletions
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;