equal
deleted
inserted
replaced
208 --]] |
208 --]] |
209 function lm.message.create ( a ) |
209 function lm.message.create ( a ) |
210 if type ( a ) ~= "table" then |
210 if type ( a ) ~= "table" then |
211 error "table expected as argument" |
211 error "table expected as argument" |
212 end |
212 end |
213 if not a.mtype or not a.to then |
213 if not a.mtype then |
214 error "you must specify message type and destination" |
214 error "you must specify message type" |
215 end |
215 end |
216 local mtype, subtype = a.mtype:match ( "(.-)%-(.+)" ) |
216 local mtype, subtype = a.mtype:match ( "(.-)%-(.+)" ) |
217 local m |
217 local m |
218 if not mtype then |
218 if not mtype then |
219 m = lm.message.new ( a.to, a.mtype ) |
219 m = lm.message.new ( a.to, a.mtype ) |