summaryrefslogtreecommitdiff
path: root/src/mod_configure2.erl
diff options
context:
space:
mode:
authorAlexey Shchepin <alexey@process-one.net>2003-12-17 20:13:21 +0000
committerAlexey Shchepin <alexey@process-one.net>2003-12-17 20:13:21 +0000
commitb3b09bcfd83ce7afe5349259a421e6424440df1c (patch)
tree2156729d2e4843e1eb0a262aa14664c76a35595e /src/mod_configure2.erl
parent* src/ejabberd_local.erl: Replaced register_local_route to (diff)
* src/jlib.hrl: Added declaration of "iq" record
* (all): Updated to use "iq" record SVN Revision: 186
Diffstat (limited to 'src/mod_configure2.erl')
-rw-r--r--src/mod_configure2.erl12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mod_configure2.erl b/src/mod_configure2.erl
index d805728d..6878c061 100644
--- a/src/mod_configure2.erl
+++ b/src/mod_configure2.erl
@@ -32,16 +32,16 @@ stop() ->
gen_iq_handler:remove_iq_handler(ejabberd_sm, ?NS_IQDATA).
-process_local_iq(From, _To, {iq, ID, Type, XMLNS, SubEl}) ->
+process_local_iq(From, _To, #iq{type = Type, sub_el = SubEl} = IQ) ->
case acl:match_rule(configure, From) of
deny ->
- {iq, ID, error, XMLNS, [SubEl, ?ERR_NOT_ALLOWED]};
+ IQ#iq{type = error, sub_el = [SubEl, ?ERR_NOT_ALLOWED]};
allow ->
%Lang = xml:get_tag_attr_s("xml:lang", SubEl),
case Type of
set ->
- {iq, ID, error, XMLNS,
- [SubEl, ?ERR_FEATURE_NOT_IMPLEMENTED]};
+ IQ#iq{type = error,
+ sub_el = [SubEl, ?ERR_FEATURE_NOT_IMPLEMENTED]};
%case xml:get_tag_attr_s("type", SubEl) of
% "cancel" ->
% {iq, ID, result, XMLNS,
@@ -76,9 +76,9 @@ process_local_iq(From, _To, {iq, ID, Type, XMLNS, SubEl}) ->
get ->
case process_get(SubEl) of
{result, Res} ->
- {iq, ID, result, XMLNS, [Res]};
+ IQ#iq{type = result, sub_el = [Res]};
{error, Error} ->
- {iq, ID, error, XMLNS, [SubEl, Error]}
+ IQ#iq{type = error, sub_el = [SubEl, Error]}
end
end
end.