diff options
author | June McEnroe <june@causal.agency> | 2020-02-08 03:19:56 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-02-08 03:19:56 -0500 |
commit | ff6424a87ce22586c3e2fe1ab57ed3407bef18ca (patch) | |
tree | 8a91a82af873a12915a9955e4b0c4470ec31ce96 | |
parent | Only show expected topic/names replies (diff) | |
download | catgirl-ff6424a87ce22586c3e2fe1ab57ed3407bef18ca.tar.gz catgirl-ff6424a87ce22586c3e2fe1ab57ed3407bef18ca.zip |
Add /names
-rw-r--r-- | catgirl.1 | 2 | ||||
-rw-r--r-- | command.c | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/catgirl.1 b/catgirl.1 index 3f8131f..ccf981b 100644 --- a/catgirl.1 +++ b/catgirl.1 @@ -130,6 +130,8 @@ can be typed Join a channel. .It Ic /me Op Ar action Send an action message. +.It Ic /names +List users in the channel. .It Ic /nick Ar nick Change nicknames. .It Ic /notice Ar message diff --git a/command.c b/command.c index 9879dbe..a6434bf 100644 --- a/command.c +++ b/command.c @@ -101,6 +101,12 @@ static void commandNick(size_t id, char *params) { ircFormat("NICK :%s\r\n", params); } +static void commandNames(size_t id, char *params) { + (void)params; + ircFormat("NAMES :%s\r\n", idNames[id]); + replies.names++; +} + static void commandQuery(size_t id, char *params) { if (!params) return; size_t query = idFor(params); @@ -137,6 +143,7 @@ static const struct Handler { { "/debug", commandDebug }, { "/join", commandJoin }, { "/me", commandMe }, + { "/names", commandNames }, { "/nick", commandNick }, { "/notice", commandNotice }, { "/part", commandPart }, |