]> granicus.if.org Git - ejabberd/commitdiff
Get rid of some fuzzy macros as it makes syntax tools getting mad
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>
Sun, 31 May 2015 14:56:16 +0000 (17:56 +0300)
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>
Mon, 1 Jun 2015 12:19:56 +0000 (15:19 +0300)
src/ejabberd_c2s.erl
src/mod_muc_admin.erl

index 5112db7dedec2ead5c58d1af57e8b063870fd845..b4cd285768741ae7f22cce2619c0b444a86c88d0 100644 (file)
 %% XEP-0198:
 
 -define(IS_STREAM_MGMT_TAG(Name),
-       Name == <<"enable">>;
-       Name == <<"resume">>;
-       Name == <<"a">>;
-       Name == <<"r">>).
+       (Name == <<"enable">>) or
+       (Name == <<"resume">>) or
+       (Name == <<"a">>) or
+       (Name == <<"r">>)).
 
 -define(IS_SUPPORTED_MGMT_XMLNS(Xmlns),
-       Xmlns == ?NS_STREAM_MGMT_2;
-       Xmlns == ?NS_STREAM_MGMT_3).
+       (Xmlns == ?NS_STREAM_MGMT_2) or
+       (Xmlns == ?NS_STREAM_MGMT_3)).
 
 -define(MGMT_FAILED(Condition, Xmlns),
        #xmlel{name = <<"failed">>,
index 1a6d8a865c8f09f4604e40d6757d517e257dfe60..1f8efe241db684da8336df644f0cb568aec67b4e 100644 (file)
@@ -876,27 +876,25 @@ set_room_affiliation(Name, Service, JID, AffiliationString) ->
            error
     end.
 
--define(MAKE_CONFIG_OPT(Opt), {Opt, Config#config.Opt}).
-
 make_opts(StateData) ->
     Config = StateData#state.config,
     [
-     ?MAKE_CONFIG_OPT(title),
-     ?MAKE_CONFIG_OPT(allow_change_subj),
-     ?MAKE_CONFIG_OPT(allow_query_users),
-     ?MAKE_CONFIG_OPT(allow_private_messages),
-     ?MAKE_CONFIG_OPT(public),
-     ?MAKE_CONFIG_OPT(public_list),
-     ?MAKE_CONFIG_OPT(persistent),
-     ?MAKE_CONFIG_OPT(moderated),
-     ?MAKE_CONFIG_OPT(members_by_default),
-     ?MAKE_CONFIG_OPT(members_only),
-     ?MAKE_CONFIG_OPT(allow_user_invites),
-     ?MAKE_CONFIG_OPT(password_protected),
-     ?MAKE_CONFIG_OPT(password),
-     ?MAKE_CONFIG_OPT(anonymous),
-     ?MAKE_CONFIG_OPT(logging),
-     ?MAKE_CONFIG_OPT(max_users),
+     {title, Config#config.title},
+     {allow_change_subj, Config#config.allow_change_subj},
+     {allow_query_users, Config#config.allow_query_users},
+     {allow_private_messages, Config#config.allow_private_messages},
+     {public, Config#config.public},
+     {public_list, Config#config.public_list},
+     {persistent, Config#config.persistent},
+     {moderated, Config#config.moderated},
+     {members_by_default, Config#config.members_by_default},
+     {members_only, Config#config.members_only},
+     {allow_user_invites, Config#config.allow_user_invites},
+     {password_protected, Config#config.password_protected},
+     {password, Config#config.password},
+     {anonymous, Config#config.anonymous},
+     {logging, Config#config.logging},
+     {max_users, Config#config.max_users},
      {affiliations, ?DICT:to_list(StateData#state.affiliations)},
      {subject, StateData#state.subject},
      {subject_author, StateData#state.subject_author}