this repo has no description
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

irc: handle DEL commands

+14
+14
src/irc.zig
··· 1751 1751 try client.queueWrite("AUTHENTICATE PLAIN\r\n"); 1752 1752 } else if (mem.eql(u8, ack_or_nak, "NAK")) { 1753 1753 log.debug("CAP not supported {s}", .{cap}); 1754 + } else if (mem.eql(u8, ack_or_nak, "DEL")) { 1755 + client.del(cap); 1754 1756 } 1755 1757 } 1756 1758 }, ··· 2250 2252 2251 2253 pub fn nickname(self: *Client) []const u8 { 2252 2254 return self.config.network_nick orelse self.config.nick; 2255 + } 2256 + 2257 + pub fn del(self: *Client, cap: []const u8) void { 2258 + const info = @typeInfo(Capabilities); 2259 + assert(info == .Struct); 2260 + 2261 + inline for (info.Struct.fields) |field| { 2262 + if (std.mem.eql(u8, field.name, cap)) { 2263 + @field(self.caps, field.name) = false; 2264 + return; 2265 + } 2266 + } 2253 2267 } 2254 2268 2255 2269 pub fn ack(self: *Client, cap: []const u8) void {