aboutsummaryrefslogtreecommitdiffstats
path: root/plugins.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugins.go')
-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
}