···39 configuration. The table has the following required fields:
4041 - *server*: string, the server URL
42- - *user*: string, username used in SASL
43 - *nick*: string, nickname to identify as
44 - *password*: string, password to use in SASL
45- - *real_name*: string, user's real name
4647 The following optional fields are available:
4849 - *port*: uint16 (default=6697 (tls) or 6667), port to use for
50 connection
051 - *tls*: boolean (default=true), when true, use an encrypted connection
05253*comlink.log*
54 Accepts a string and inserts a log statement into the comlink
···39 configuration. The table has the following required fields:
4041 - *server*: string, the server URL
042 - *nick*: string, nickname to identify as
43 - *password*: string, password to use in SASL
04445 The following optional fields are available:
4647 - *port*: uint16 (default=6697 (tls) or 6667), port to use for
48 connection
49+ - *real_name*: string, user's real name
50 - *tls*: boolean (default=true), when true, use an encrypted connection
51+ - *user*: string, username used in SASL
5253*comlink.log*
54 Accepts a string and inserts a log statement into the comlink
+2-2
docs/comlink.lua
···18---@class ConnectionConfiguration
19---
20---@field server string The server to connect to, eg "chat.sr.ht"
21----@field user string Username for server connection
22---@field nick string Nick to use when connecting via SASL to IRC
23---@field password string Password for server
24----@field real_name string Real name of user
25---@field tls? boolean Whether to encrypt connections
26---@field port? number Optional port to use for server connection. Defaults to 6697 for TLS connections and 6667 for plaintext connections
27
···18---@class ConnectionConfiguration
19---
20---@field server string The server to connect to, eg "chat.sr.ht"
21+---@field user? string Username for server connection
22---@field nick string Nick to use when connecting via SASL to IRC
23---@field password string Password for server
24+---@field real_name? string Real name of user
25---@field tls? boolean Whether to encrypt connections
26---@field port? number Optional port to use for server connection. Defaults to 6697 for TLS connections and 6667 for plaintext connections
27
+27-9
src/lua.zig
···315 lua.argCheck(lua.isTable(1), 1, "expected a table");
316317 // [table]
318- var lua_type = lua.getField(1, "user"); // [table,string]
319- lua.argCheck(lua_type == .string, 1, "expected a string for field 'user'");
320- const user = lua.toString(-1) catch unreachable;
321- lua.pop(1); // [table]
322-323- lua_type = lua.getField(1, "nick"); // [table,string]
324 lua.argCheck(lua_type == .string, 1, "expected a string for field 'nick'");
325 const nick = lua.toString(-1) catch unreachable;
326 lua.pop(1); // [table]
32700000000000000328 lua_type = lua.getField(1, "password"); // [table, string]
329 lua.argCheck(lua_type == .string, 1, "expected a string for field 'password'");
330 const password = lua.toString(-1) catch unreachable;
331 lua.pop(1); // [table]
332333 lua_type = lua.getField(1, "real_name"); // [table, string]
334- lua.argCheck(lua_type == .string, 1, "expected a string for field 'real_name'");
335- const real_name = lua.toString(-1) catch unreachable;
336- lua.pop(1); // [table]
000000000337338 lua_type = lua.getField(1, "server"); // [table, string]
339 lua.argCheck(lua_type == .string, 1, "expected a string for field 'server'");