commit ccc197a5c38606970aaf1e030c0f69dc60b56f6c
parent 397b2b7bd425cf77413346a6aa7c6a1d64f2b4ca
Author: hhvn <dev@hhvn.uk>
Date: Wed, 17 Nov 2021 00:50:42 +0000
commands.c: multi word topics
Diffstat:
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/commands.c b/commands.c
@@ -354,7 +354,7 @@ command_names(struct Server *server, char *str) {
void
command_topic(struct Server *server, char *str) {
- char *channel, *topic, *save = NULL;
+ char *channel, *topic = NULL;
int clear = 0, ret;
enum { opt_clear, };
struct CommandOpts opts[] = {
@@ -372,8 +372,7 @@ command_topic(struct Server *server, char *str) {
}
}
- channel = strtok_r(str, " ", &save);
- topic = strtok_r(NULL, " ", &save);
+ channel = strtok_r(str, " ", &topic);
if (!channel && selected.channel) {
channel = selected.channel->name;