diff options
author | terminaldweller <devi@terminaldweller.com> | 2024-11-04 18:43:06 +0000 |
---|---|---|
committer | terminaldweller <devi@terminaldweller.com> | 2024-11-04 18:43:06 +0000 |
commit | db0110393f70987c9b87643594d18df935ef91d5 (patch) | |
tree | b61219f1d4238f4b5ad1d3d2b4d8d611115a0f11 /plugins.go | |
parent | added openrouter as a provider (diff) | |
download | milla-db0110393f70987c9b87643594d18df935ef91d5.tar.gz milla-db0110393f70987c9b87643594d18df935ef91d5.zip |
added the ability to use channels with password, fixes 35
Diffstat (limited to 'plugins.go')
-rw-r--r-- | plugins.go | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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 } |