%% note: pos_integer() should always be used, but we allow anything else coded
%% as binary, so one can have a custom implementation of nodetree with custom
%% indexing (see nodetree_virtual). this also allows to use any kind of key for
-%% indexing nodes, as this can be usefull with external backends such as sql.
+%% indexing nodes, as this can be useful with external backends such as sql.
-type(itemId() :: binary()).
%% @type itemId() = string().
%%%----------------------------------------------------------------------
%%% File : ejabberd_auth.erl
%%% Author : Alexey Shchepin <alexey@process-one.net>
-%%% Purpose : Authentification
+%%% Purpose : Authentication
%%% Created : 23 Nov 2002 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%%----------------------------------------------------------------------
%%% File : ejabberd_auth_external.erl
%%% Author : Alexey Shchepin <alexey@process-one.net>
-%%% Purpose : Authentification via LDAP external script
+%%% Purpose : Authentication via LDAP external script
%%% Created : 12 Dec 2004 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%%----------------------------------------------------------------------
%%% File : ejabberd_auth_jwt.erl
%%% Author : Mickael Remond <mremond@process-one.net>
-%%% Purpose : Authentification using JWT tokens
+%%% Purpose : Authentication using JWT tokens
%%% Created : 16 Mar 2019 by Mickael Remond <mremond@process-one.net>
%%%
%%%
%%%----------------------------------------------------------------------
%%% File : ejabberd_auth_ldap.erl
%%% Author : Alexey Shchepin <alexey@process-one.net>
-%%% Purpose : Authentification via LDAP
+%%% Purpose : Authentication via LDAP
%%% Created : 12 Dec 2004 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%%----------------------------------------------------------------------
%%% File : ejabberd_auth_mnesia.erl
%%% Author : Alexey Shchepin <alexey@process-one.net>
-%%% Purpose : Authentification via mnesia
+%%% Purpose : Authentication via mnesia
%%% Created : 12 Dec 2004 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%%----------------------------------------------------------------------
%%% File : ejabberd_auth_riak.erl
%%% Author : Evgeniy Khramtsov <ekhramtsov@process-one.net>
-%%% Purpose : Authentification via Riak
+%%% Purpose : Authentication via Riak
%%% Created : 12 Nov 2012 by Evgeniy Khramtsov <ekhramtsov@process-one.net>
%%%
%%%
%%%----------------------------------------------------------------------
%%% File : ejabberd_auth_sql.erl
%%% Author : Alexey Shchepin <alexey@process-one.net>
-%%% Purpose : Authentification via ODBC
+%%% Purpose : Authentication via ODBC
%%% Created : 12 Dec 2004 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%%% command.
%%% TODO: consider this feature:
-%%% All commands are catched. If an error happens, return the restuple:
+%%% All commands are caught. If an error happens, return the restuple:
%%% {error, flattened error string}
%%% This means that ecomm call APIs (ejabberd_ctl, ejabberd_xmlrpc)
%%% need to allows this. And ejabberd_xmlrpc must be prepared to
-spec list_commands(integer()) -> [{atom(), [aterm()], string()}].
%% @doc Get a list of all the available commands, arguments and
-%% description in a given API verion.
+%% description in a given API version.
list_commands(Version) ->
Commands = get_commands_definition(Version),
[{Name, Args, Desc} || #ejabberd_commands{name = Name,
format_error({error, {exception, Class, Reason, St}}) ->
lists:flatten(
io_lib:format(
- "Exception occured during configuration processing. "
+ "Exception occurred during configuration processing. "
"This is most likely due to faulty/incompatible validator in "
"third-party code. If you are not running any third-party "
"code, please report the bug with ejabberd configuration "
eredis_subscribe(Pid, Channels),
{reply, ok, State#state{subscriptions = Subs1}};
handle_call(Request, _From, State) ->
- ?WARNING_MSG("Unexepected call: ~p", [Request]),
+ ?WARNING_MSG("Unexpected call: ~p", [Request]),
{noreply, State}.
handle_cast(_Msg, State) ->
-define(DEFAULT_MAX_S2S_CONNECTIONS_NUMBER_PER_NODE, 1).
-define(S2S_OVERLOAD_BLOCK_PERIOD, 60).
-%% once a server is temporarly blocked, it stay blocked for 60 seconds
+%% once a server is temporary blocked, it stay blocked for 60 seconds
-record(s2s, {fromto :: {binary(), binary()},
pid :: pid()}).
%%%----------------------------------------------------------------------
%%% File : ejabberd_tmp_sup.erl
%%% Author : Alexey Shchepin <alexey@process-one.net>
-%%% Purpose : Supervisor for temporary processess
+%%% Purpose : Supervisor for temporary processes
%%% Created : 18 Jul 2003 by Alexey Shchepin <alexey@process-one.net>
%%%
%%%
%% This page only displays vhosts that the user is admin:
get_acl_rule([<<"vhosts">>], _) ->
{<<"localhost">>, [all]};
-%% The pages of a vhost are only accesible if the user is admin of that vhost:
+%% The pages of a vhost are only accessible if the user is admin of that vhost:
get_acl_rule([<<"server">>, VHost | _RPath], Method)
when Method =:= 'GET' orelse Method =:= 'HEAD' ->
{VHost, [configure, webadmin_view]};
[Module, Fun, Arity, Ret]);
_ ->
io_lib:format("Internal error of module ~s has "
- "occured during ~s:~n"
+ "occurred during ~s:~n"
"** Options: ~p~n"
"** ~s",
[Module, Fun, Opts,
Referer = find_header('Referer', Request#request.headers, "-"),
%% Pseudo Combined Apache log format:
%% 127.0.0.1 - - [28/Mar/2007:18:41:55 +0200] "GET / HTTP/1.1" 302 303 "-" "tsung"
- %% TODO some fields are harcoded/missing:
+ %% TODO some fields are hardcoded/missing:
%% The date/time integers should have always 2 digits. For example day "7" should be "07"
%% Month should be 3*letter, not integer 1..12
%% Missing time zone = (`+' | `-') 4*digit
{stop, Status, State1} ->
{stop, Status, State1#state{stop_reason = {replaced, Pid}}};
{noreply, State1, _} ->
- ?DEBUG("Transfering MQTT session state to ~p at ~s", [Pid, node(Pid)]),
+ ?DEBUG("Transferring MQTT session state to ~p at ~s", [Pid, node(Pid)]),
Q1 = p1_queue:file_to_ram(State1#state.queue),
p1_server:reply(From, {ok, State1#state{queue = Q1}}),
SessionExpiry = timer:seconds(State1#state.session_expiry),
%% B) The only participant of a temporary room leaves it
%% C) mod_muc:stop was called, and each room is being terminated
%% In this case, the mod_muc process died before the room processes
-%% So the message sending must be catched
+%% So the message sending must be caught
-spec room_destroyed(binary(), binary(), pid(), binary()) -> ok.
room_destroyed(Host, Room, Pid, ServerHost) ->
Proc = procname(ServerHost, {Room, Host}),
Pid
end.
-%% It is required to put explicitely all the options because
+%% It is required to put explicitly all the options because
%% the record elements are replaced at compile time.
%% So, this can't be parametrized.
change_option(Option, Value, Config) ->
end, ok, Users).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Detect messange stanzas that don't have meaninful content
+%% Detect messange stanzas that don't have meaningful content
-spec has_body_or_subject(message()) -> boolean().
has_body_or_subject(#message{body = Body, subject = Subj}) ->
Body /= [] orelse Subj /= [].
message | iq | presence_in | presence_out | other,
ljid(), none | both | from | to, [binary()]) ->
allow | deny.
-%% Ptype = mesage | iq | presence_in | presence_out | other
+%% Ptype = message | iq | presence_in | presence_out | other
check_packet_aux([], _PType, _JID, _Subscription,
_Groups) ->
allow;
-spec presence_probe(jid(), jid(), pid()) -> ok.
presence_probe(#jid{luser = U, lserver = S}, #jid{luser = U, lserver = S}, _Pid) ->
- %% ignore presence_probe from my other ressources
+ %% ignore presence_probe from my other resources
ok;
presence_probe(#jid{lserver = S} = From, #jid{lserver = S} = To, _Pid) ->
send_last_pep(To, From);
Error
end.
-%% @doc <p>Delete specified node and all childs.</p>
+%% @doc <p>Delete specified node and all children.</p>
%%<p>There are several reasons why the node deletion request might fail:</p>
%%<ul>
%%<li>The requesting entity does not have sufficient privileges to delete the node.</li>
PersistentFeature = lists:member(<<"persistent-items">>, Features),
DeleteFeature = lists:member(<<"delete-items">>, Features),
PublishModel = get_option(Options, publish_model),
- if %%-> iq_pubsub just does that matchs
+ if %%-> iq_pubsub just does that matches
%% %% Request does not specify an item
%% {error, extended_error(?ERR_BAD_REQUEST, "item-required")};
not PersistentFeature ->
%% {@link mod_pubsub:pubsubState()} will be considered as already stored and
%% no further persistence operation will be performed. This case is used,
%% when the plugin module is doing the persistence by itself or when it want
-%% to completly disable persistence.</li></ul>
+%% to completely disable persistence.</li></ul>
%% </p>
%% <p>In the default plugin module, the record is unchanged.</p>
subscribe_node(Nidx, Sender, Subscriber, AccessModel,
%% {@link mod_pubsub:pubsubItem()} will be considered as already stored and
%% no further persistence operation will be performed. This case is used,
%% when the plugin module is doing the persistence by itself or when it want
-%% to completly disable persistence.</li></ul>
+%% to completely disable persistence.</li></ul>
%% </p>
%% <p>In the default plugin module, the record is unchanged.</p>
publish_item(Nidx, Publisher, PublishModel, MaxItems, ItemId, Payload,
%%% <p>PubSub node tree plugins are using the {@link gen_nodetree} behaviour.</p>
%%% <p><strong>The API isn't stabilized yet</strong>. The pubsub plugin
%%% development is still a work in progress. However, the system is already
-%%% useable and useful as is. Please, send us comments, feedback and
+%%% usable and useful as is. Please, send us comments, feedback and
%%% improvements.</p>
-module(nodetree_tree).
%%% <p>PubSub node tree plugins are using the {@link gen_nodetree} behaviour.</p>
%%% <p><strong>The API isn't stabilized yet</strong>. The pubsub plugin
%%% development is still a work in progress. However, the system is already
-%%% useable and useful as is. Please, send us comments, feedback and
+%%% usable and useful as is. Please, send us comments, feedback and
%%% improvements.</p>
-module(nodetree_tree_sql).