summaryrefslogtreecommitdiff
path: root/degesch.c
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-05-17 16:23:32 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2015-05-17 16:23:32 +0200
commit02160c897a37cfd33cf7151b32f79f8192339663 (patch)
tree07a07dd999bb86e475003f5a25b507ad36520fb6 /degesch.c
parent87352b33d05af4863e8f0fc7c589f5c4cfe8cedf (diff)
downloadxK-02160c897a37cfd33cf7151b32f79f8192339663.tar.gz
xK-02160c897a37cfd33cf7151b32f79f8192339663.tar.xz
xK-02160c897a37cfd33cf7151b32f79f8192339663.zip
degesch: fix sending the reason in /part
Diffstat (limited to 'degesch.c')
-rw-r--r--degesch.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/degesch.c b/degesch.c
index 2259e68..d064812 100644
--- a/degesch.c
+++ b/degesch.c
@@ -5205,9 +5205,14 @@ handle_command_part (struct app_context *ctx, char *arguments)
struct server *s = ctx->current_buffer->server;
if (*arguments)
+ {
// TODO: check if the arguments are in the form of "channel(,channel)*"
- // TODO: make sure to send the reason as one argument
- irc_send (s, "PART %s", arguments);
+ char *channels = cut_word (&arguments);
+ if (*arguments)
+ irc_send (s, "PART %s :%s", channels, arguments);
+ else
+ irc_send (s, "PART %s", channels);
+ }
else if (ctx->current_buffer->type != BUFFER_CHANNEL)
buffer_send_error (ctx, ctx->current_buffer,
"%s: %s", "Can't part",
@@ -5370,7 +5375,7 @@ g_command_handlers[] =
"[<channel>[,<channel>...]]",
handle_command_join },
{ "part", "Leave channels",
- "[<channel>[,<channel>...]]",
+ "[<channel>[,<channel>...]] [reason]",
handle_command_part },
NOT_IMPLEMENTED (cycle)