---
Simple implementation. I implemented this while working on parsing
prefixes for members and figured I would go ahead and submit it.
src/App.zig | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/App.zig b/src/App.zig
index f4fec36..c33c977 100644
--- a/src/App.zig
+++ b/src/App.zig
@@ -1242,6 +1242,7 @@ pub const Command = enum {
@"prev-channel",
quit,
who,
+ names,
/// if we should append a space when completing
pub fn appendSpace(self: Command) bool {
@@ -1334,6 +1335,11 @@ pub fn handleCommand(self: *App, buffer: Buffer, cmd: []const u8) !void {
);
return self.queueWrite(client, msg);
},
+ .names => {
+ if (channel == null) return error.InvalidCommand;
+ const msg = try std.fmt.bufPrint(&buf, "NAMES {s}\r\n", .{channel.?.name});
+ return self.queueWrite(client, msg);
+ },
.@"next-channel" => self.nextChannel(),
.@"prev-channel" => self.prevChannel(),
.quit => self.should_quit = true,
Applied! Thanks!
--
2.45.2