17 command, hasparam, param = body:match(direct_address_pattern); |
17 command, hasparam, param = body:match(direct_address_pattern); |
18 end |
18 end |
19 |
19 |
20 if not command then |
20 if not command then |
21 command, hasparam, param = body:match("%[([%a%-%_%d]+)(%s?)(.*)%]"); |
21 command, hasparam, param = body:match("%[([%a%-%_%d]+)(%s?)(.*)%]"); |
|
22 if event.room then |
|
23 local direct_to = body:match"^(.-)[,:]" |
|
24 if event.room.occupants[direct_to] then |
|
25 event.reply_to = direct_to |
|
26 end |
|
27 end |
22 end |
28 end |
23 |
29 |
24 if hasparam ~= " " then param = nil; end |
30 if hasparam ~= " " then param = nil; end |
25 |
31 |
26 if command then |
32 if command then |