diff options
author | Timo Sirainen <cras@irssi.org> | 2000-06-01 16:49:19 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-06-01 16:49:19 +0000 |
commit | 9bbd2847218700fcce6a795c93b4e49508dbf892 (patch) | |
tree | 6adf768ce6b191e0184a47030d3af0e46261cdaf /src/irc | |
parent | 6046bf4c5bd9c0c5047269bf690eed03a6848b0b (diff) | |
download | irssi-9bbd2847218700fcce6a795c93b4e49508dbf892.zip |
/topic -d [#channel] clears the topic.
When topic cleared, the topic bar wasn't refreshed immediately.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@258 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/irc')
-rw-r--r-- | src/irc/core/irc-commands.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/irc/core/irc-commands.c b/src/irc/core/irc-commands.c index fe2a6281..59d85da3 100644 --- a/src/irc/core/irc-commands.c +++ b/src/irc/core/irc-commands.c @@ -334,16 +334,18 @@ static void cmd_kick(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item) static void cmd_topic(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item) { - char *params, *channame, *topic; + char *params, *args, *channame, *topic; g_return_if_fail(data != NULL); if (server == NULL || !server->connected || !irc_server_check(server)) cmd_return_error(CMDERR_NOT_CONNECTED); - params = cmd_get_params(data, 2 | PARAM_FLAG_OPTCHAN | PARAM_FLAG_GETREST, item, &channame, &topic); + params = cmd_get_params(data, 3 | PARAM_FLAG_OPTCHAN | + PARAM_FLAG_OPTARGS | PARAM_FLAG_GETREST, + item, &args, &channame, &topic); - irc_send_cmdv(server, *topic == '\0' ? "TOPIC %s" : "TOPIC %s :%s", - channame, topic); + irc_send_cmdv(server, *topic == '\0' && strstr(args, "-d") == NULL ? + "TOPIC %s" : "TOPIC %s :%s", channame, topic); g_free(params); } |