aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorterminaldweller <devi@terminaldweller.com>2024-11-04 18:43:06 +0000
committerterminaldweller <devi@terminaldweller.com>2024-11-04 18:43:06 +0000
commitdb0110393f70987c9b87643594d18df935ef91d5 (patch)
treeb61219f1d4238f4b5ad1d3d2b4d8d611115a0f11 /plugins
parentadded openrouter as a provider (diff)
downloadmilla-db0110393f70987c9b87643594d18df935ef91d5.tar.gz
milla-db0110393f70987c9b87643594d18df935ef91d5.zip
added the ability to use channels with password, fixes 35
Diffstat (limited to '')
-rw-r--r--plugins.go7
1 files changed, 6 insertions, 1 deletions
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
}