diff options
author | B. Watson <yalhcru@gmail.com> | 2019-03-13 04:04:08 -0400 |
---|---|---|
committer | B. Watson <yalhcru@gmail.com> | 2019-03-13 04:04:08 -0400 |
commit | 6c7c9ce1611a7d5f437f47f4f5da99772d7600a3 (patch) | |
tree | a32d34439e8a4158af460fc7e1255195be243fbf /src/commands.c | |
parent | 293037f30ee89933551421df1a5193c4322179ab (diff) | |
download | fujichat-6c7c9ce1611a7d5f437f47f4f5da99772d7600a3.tar.gz |
fix /msg and /quit commands (quote argument with colon)
Diffstat (limited to 'src/commands.c')
-rw-r--r-- | src/commands.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/commands.c b/src/commands.c index 001f384..c7e0f9a 100644 --- a/src/commands.c +++ b/src/commands.c @@ -13,7 +13,7 @@ void cmd_msg(void); void cmd_nick(void); void cmd_part(void); void cmd_ping(void); -// void cmd_quit(void); +void cmd_quit(void); void cmd_quote(void); void cmd_ver(void); void do_me(void); @@ -30,7 +30,7 @@ fuji_cmd_t cmd_list[] = { { "NICK", ARGTYPE_REQUIRED, cmd_nick }, { "PART", ARGTYPE_NONE, cmd_part }, { "PING", ARGTYPE_REQUIRED, cmd_ping }, - // { "QUIT", ARGTYPE_OPT, cmd_quit }, + { "QUIT", ARGTYPE_OPT, cmd_quit }, { "QUOTE", ARGTYPE_REQUIRED, cmd_quote }, { "VER", ARGTYPE_REQUIRED, cmd_ver }, { "VERSION", ARGTYPE_REQUIRED, cmd_ver }, @@ -104,7 +104,12 @@ void cmd_part(void) { } void cmd_msg(void) { - send_server_cmd("PRIVMSG", cmd_arg); + send_server_cmd_2arg("PRIVMSG", cmd_arg); +} + +void cmd_quit(void) { + joined_channel = 0; + send_server_cmd("QUIT", cmd_arg); } void cmd_quote(void) { |