From db0110393f70987c9b87643594d18df935ef91d5 Mon Sep 17 00:00:00 2001 From: terminaldweller Date: Mon, 4 Nov 2024 13:43:06 -0500 Subject: added the ability to use channels with password, fixes 35 --- plugins.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'plugins.go') diff --git a/plugins.go b/plugins.go index 0ffaba2..efde643 100644 --- a/plugins.go +++ b/plugins.go @@ -221,8 +221,13 @@ func registerLuaCommand(luaState *lua.LState, appConfig *TomlConfig) func(*lua.L func ircJoinChannelClosure(luaState *lua.LState, client *girc.Client) func(*lua.LState) int { return func(luaState *lua.LState) int { channel := luaState.CheckString(1) + password := luaState.CheckString(2) - client.Cmd.Join(channel) + if password != "" { + client.Cmd.JoinKey(channel, password) + } else { + client.Cmd.Join(channel) + } return 0 } -- cgit v1.2.3