plugins/commands.lua

changeset 102
b7c9a3707e68
parent 58
3e5b57d44fa0
child 159
7ca948b157df
--- a/plugins/commands.lua	Sat May 25 21:35:27 2013 +0200
+++ b/plugins/commands.lua	Sat May 25 21:35:27 2013 +0200
@@ -19,6 +19,12 @@
 	
 		if not command then
 			command, hasparam, param = body:match("%[([%a%-%_%d]+)(%s?)(.*)%]");
+			if event.room then
+				local direct_to = body:match"^(.-)[,:]"
+				if event.room.occupants[direct_to] then
+					event.reply_to = direct_to
+				end
+			end
 		end
 		
 		if hasparam ~= " " then param = nil; end

mercurial