From 8ab81cf1ed76a60f629473582f996b3d008476e1 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Wed, 13 Mar 2019 06:36:35 -0400 Subject: /part takes optional message --- src/commands.c | 9 +++++++-- src/fujichat.atr | Bin 92176 -> 92176 bytes src/fujitest.atr | Bin 92176 -> 92176 bytes 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/commands.c b/src/commands.c index dc9aec6..f23b81d 100644 --- a/src/commands.c +++ b/src/commands.c @@ -29,7 +29,7 @@ fuji_cmd_t cmd_list[] = { { "MSG", ARGTYPE_REQUIRED, cmd_msg }, { "M", ARGTYPE_REQUIRED, cmd_msg }, { "NICK", ARGTYPE_OPT, cmd_nick }, - { "PART", ARGTYPE_NONE, cmd_part }, + { "PART", ARGTYPE_OPT, cmd_part }, { "PING", ARGTYPE_REQUIRED, cmd_ping }, { "QUIT", ARGTYPE_OPT, cmd_quit }, { "QUOTE", ARGTYPE_REQUIRED, cmd_quote }, @@ -108,7 +108,12 @@ void cmd_join(void) { void cmd_part(void) { joined_channel = 0; - send_server_cmd("PART", channel); + if(cmd_arg) { + serv_msg_buf_len = sprintf(serv_msg_buf, "PART %s :%s%c", channel, cmd_arg, NL); + send_serv_msg_buf(); + } else { + send_server_cmd("PART", channel); + } } void cmd_msg(void) { diff --git a/src/fujichat.atr b/src/fujichat.atr index 92ec181..98d81b6 100644 Binary files a/src/fujichat.atr and b/src/fujichat.atr differ diff --git a/src/fujitest.atr b/src/fujitest.atr index 35fc257..98f0d4d 100644 Binary files a/src/fujitest.atr and b/src/fujitest.atr differ -- cgit v1.2.3