plugins/groupchat.lua: Add support for muc passwords

Fri, 02 Oct 2020 17:02:37 +0200

author
Seve Ferrer <seve@delape.net>
date
Fri, 02 Oct 2020 17:02:37 +0200
changeset 160
eb5a04a9877a
parent 159
7ca948b157df
child 161
c4df517edbc1

plugins/groupchat.lua: Add support for muc passwords

plugins/groupchat.lua file | annotate | diff | comparison | revisions
--- a/plugins/groupchat.lua	Tue Sep 22 14:59:25 2020 +0200
+++ b/plugins/groupchat.lua	Fri Oct 02 17:02:37 2020 +0200
@@ -27,9 +27,9 @@
 		end);
 	end
 
-	function bot:join_room(room_jid, nick)
+	function bot:join_room(room_jid, nick, password)
 		nick = nick or bot.config.nick or ("bot"..math.random(10000,99999));
-		local room = bot.stream:join_room(room_jid, nick)
+		local room = bot.stream:join_room(room_jid, nick, password)
 		room.bot = bot;
 		room:hook("message", function(event)
 			if event.nick == room.nick then

mercurial