From ce4c11f5fed97792711b79cce0e61436b819b3c4 Mon Sep 17 00:00:00 2001 From: Badlop Date: Wed, 16 Sep 2015 10:32:42 +0200 Subject: [PATCH] Add mod_opt_type function (#121) --- mod_log_chat/src/mod_log_chat.erl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/mod_log_chat/src/mod_log_chat.erl b/mod_log_chat/src/mod_log_chat.erl index 47f2bc6..57ab8b3 100644 --- a/mod_log_chat/src/mod_log_chat.erl +++ b/mod_log_chat/src/mod_log_chat.erl @@ -14,7 +14,8 @@ init/1, stop/1, log_packet_send/4, - log_packet_receive/5]). + log_packet_receive/5, + mod_opt_type/1]). -ifndef(LAGER). -define(LAGER, 1). @@ -268,3 +269,9 @@ css() -> ".ressource {color: #336699; }~n"++ ".messagetext {color: black; margin: 0.2em; clear: both; display: block;}~n"++ "//-->~n~n". + +mod_opt_type(path) -> fun iolist_to_binary/1; +mod_opt_type(format) -> + fun (A) when is_atom(A) -> A end; +mod_opt_type(_) -> + [path, format].