Find and fix typos using 'codespell'
This commit is contained in:
parent
5d582080be
commit
6e5439db5c
|
@ -100,7 +100,7 @@ solve_challenge1(Chal = #challenge{type = <<"http-01">>, token=Tkn}, Key) ->
|
||||||
ets_put_key_authorization(Tkn, KeyAuthz),
|
ets_put_key_authorization(Tkn, KeyAuthz),
|
||||||
{ok, Chal#challenge.uri, KeyAuthz};
|
{ok, Chal#challenge.uri, KeyAuthz};
|
||||||
solve_challenge1(Challenge, _Key) ->
|
solve_challenge1(Challenge, _Key) ->
|
||||||
?ERROR_MSG("Unkown Challenge Type: ~p", [Challenge]),
|
?ERROR_MSG("Unknown Challenge Type: ~p", [Challenge]),
|
||||||
{error, unknown_challenge}.
|
{error, unknown_challenge}.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -393,7 +393,7 @@ parse_who(Name, Defs, ParseOauth) when is_list(Defs) ->
|
||||||
{oauth, lists:foldl(fun({scope, S}, A) -> S ++ A end, [], Scopes), Rest}
|
{oauth, lists:foldl(fun({scope, S}, A) -> S ++ A end, [], Scopes), Rest}
|
||||||
end;
|
end;
|
||||||
scope ->
|
scope ->
|
||||||
report_error(<<"Oauth rule can't be embeded inside other oauth rule in 'who' section for api_permission '~s'">>,
|
report_error(<<"Oauth rule can't be embedded inside other oauth rule in 'who' section for api_permission '~s'">>,
|
||||||
[Name])
|
[Name])
|
||||||
end;
|
end;
|
||||||
({scope, ScopeList}) ->
|
({scope, ScopeList}) ->
|
||||||
|
|
|
@ -259,9 +259,9 @@ get_commands_spec() ->
|
||||||
"documentation should be stored",
|
"documentation should be stored",
|
||||||
"Regexp matching names of commands or modules "
|
"Regexp matching names of commands or modules "
|
||||||
"that will be included inside generated document",
|
"that will be included inside generated document",
|
||||||
"Comma separated list of languages (choosen from java, perl, xmlrpc, json)"
|
"Comma separated list of languages (chosen from java, perl, xmlrpc, json)"
|
||||||
"that will have example invocation include in markdown document"],
|
"that will have example invocation include in markdown document"],
|
||||||
result_desc = "0 if command failed, 1 when succedded",
|
result_desc = "0 if command failed, 1 when succeeded",
|
||||||
args_example = ["/home/me/docs/api.html", "mod_admin", "java,json"],
|
args_example = ["/home/me/docs/api.html", "mod_admin", "java,json"],
|
||||||
result_example = ok},
|
result_example = ok},
|
||||||
#ejabberd_commands{name = gen_markdown_doc_for_commands, tags = [documentation],
|
#ejabberd_commands{name = gen_markdown_doc_for_commands, tags = [documentation],
|
||||||
|
@ -273,9 +273,9 @@ get_commands_spec() ->
|
||||||
"documentation should be stored",
|
"documentation should be stored",
|
||||||
"Regexp matching names of commands or modules "
|
"Regexp matching names of commands or modules "
|
||||||
"that will be included inside generated document",
|
"that will be included inside generated document",
|
||||||
"Comma separated list of languages (choosen from java, perl, xmlrpc, json)"
|
"Comma separated list of languages (chosen from java, perl, xmlrpc, json)"
|
||||||
"that will have example invocation include in markdown document"],
|
"that will have example invocation include in markdown document"],
|
||||||
result_desc = "0 if command failed, 1 when succedded",
|
result_desc = "0 if command failed, 1 when succeeded",
|
||||||
args_example = ["/home/me/docs/api.html", "mod_admin", "java,json"],
|
args_example = ["/home/me/docs/api.html", "mod_admin", "java,json"],
|
||||||
result_example = ok}].
|
result_example = ok}].
|
||||||
|
|
||||||
|
|
|
@ -133,7 +133,7 @@ code_change(_OldVsn, State, _Extra) ->
|
||||||
{ok, State}.
|
{ok, State}.
|
||||||
|
|
||||||
%%-----------------------------
|
%%-----------------------------
|
||||||
%% ejabberdctl Command managment
|
%% ejabberdctl Command management
|
||||||
%%-----------------------------
|
%%-----------------------------
|
||||||
|
|
||||||
register_commands(CmdDescs, Module, Function) ->
|
register_commands(CmdDescs, Module, Function) ->
|
||||||
|
@ -866,7 +866,7 @@ print(Format, Args) ->
|
||||||
io:format(lists:flatten(Format), Args).
|
io:format(lists:flatten(Format), Args).
|
||||||
|
|
||||||
%%-----------------------------
|
%%-----------------------------
|
||||||
%% Command managment
|
%% Command management
|
||||||
%%-----------------------------
|
%%-----------------------------
|
||||||
|
|
||||||
%%+++
|
%%+++
|
||||||
|
|
|
@ -651,7 +651,7 @@ parse_lang(Langs) ->
|
||||||
end.
|
end.
|
||||||
|
|
||||||
% Code below is taken (with some modifications) from the yaws webserver, which
|
% Code below is taken (with some modifications) from the yaws webserver, which
|
||||||
% is distributed under the folowing license:
|
% is distributed under the following license:
|
||||||
%
|
%
|
||||||
% This software (the yaws webserver) is free software.
|
% This software (the yaws webserver) is free software.
|
||||||
% Parts of this software is Copyright (c) Claes Wikstrom <klacke@hyber.org>
|
% Parts of this software is Copyright (c) Claes Wikstrom <klacke@hyber.org>
|
||||||
|
|
|
@ -107,7 +107,7 @@ init_udp(PortIP, Module, Opts, SockOpts, Port, IPS) ->
|
||||||
{reuseaddr, true} |
|
{reuseaddr, true} |
|
||||||
SockOpts]) of
|
SockOpts]) of
|
||||||
{ok, Socket} ->
|
{ok, Socket} ->
|
||||||
%% Inform my parent that this port was opened succesfully
|
%% Inform my parent that this port was opened successfully
|
||||||
proc_lib:init_ack({ok, self()}),
|
proc_lib:init_ack({ok, self()}),
|
||||||
application:ensure_started(ejabberd),
|
application:ensure_started(ejabberd),
|
||||||
start_module_sup(Port, Module),
|
start_module_sup(Port, Module),
|
||||||
|
@ -133,7 +133,7 @@ init_udp(PortIP, Module, Opts, SockOpts, Port, IPS) ->
|
||||||
|
|
||||||
init_tcp(PortIP, Module, Opts, SockOpts, Port, IPS) ->
|
init_tcp(PortIP, Module, Opts, SockOpts, Port, IPS) ->
|
||||||
ListenSocket = listen_tcp(PortIP, Module, SockOpts, Port, IPS),
|
ListenSocket = listen_tcp(PortIP, Module, SockOpts, Port, IPS),
|
||||||
%% Inform my parent that this port was opened succesfully
|
%% Inform my parent that this port was opened successfully
|
||||||
proc_lib:init_ack({ok, self()}),
|
proc_lib:init_ack({ok, self()}),
|
||||||
application:ensure_started(ejabberd),
|
application:ensure_started(ejabberd),
|
||||||
start_module_sup(Port, Module),
|
start_module_sup(Port, Module),
|
||||||
|
|
|
@ -64,7 +64,7 @@ parse(L) ->
|
||||||
%%% RFC2254_Filter = RegExp = Value = string(),
|
%%% RFC2254_Filter = RegExp = Value = string(),
|
||||||
%%% N = integer().
|
%%% N = integer().
|
||||||
%%%
|
%%%
|
||||||
%%% Description: The same as parse/1, but substitutes N or all occurences
|
%%% Description: The same as parse/1, but substitutes N or all occurrences
|
||||||
%%% of RegExp with Value *after* parsing.
|
%%% of RegExp with Value *after* parsing.
|
||||||
%%%
|
%%%
|
||||||
%%% Example:
|
%%% Example:
|
||||||
|
|
|
@ -1025,7 +1025,7 @@ get_status_list(Host, Status_required) ->
|
||||||
Sessions2 = [ {Session#session.usr, Session#session.sid, Session#session.priority} || Session <- Sessions],
|
Sessions2 = [ {Session#session.usr, Session#session.sid, Session#session.priority} || Session <- Sessions],
|
||||||
Fhost = case Host of
|
Fhost = case Host of
|
||||||
<<"all">> ->
|
<<"all">> ->
|
||||||
%% All hosts are requested, so dont filter at all
|
%% All hosts are requested, so don't filter at all
|
||||||
fun(_, _) -> true end;
|
fun(_, _) -> true end;
|
||||||
_ ->
|
_ ->
|
||||||
%% Filter the list, only Host is interesting
|
%% Filter the list, only Host is interesting
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
%% add_commands allow exporting a class of commands, from
|
%% add_commands allow exporting a class of commands, from
|
||||||
%% open: methods is not risky and can be called by without any access check
|
%% open: methods is not risky and can be called by without any access check
|
||||||
%% restricted (default): the same, but will appear only in ejabberdctl list.
|
%% restricted (default): the same, but will appear only in ejabberdctl list.
|
||||||
%% admin – auth is required with XMLRPC and HTTP API and checked for admin priviledges, works as usual in ejabberdctl.
|
%% admin – auth is required with XMLRPC and HTTP API and checked for admin privileges, works as usual in ejabberdctl.
|
||||||
%% user - can be used through XMLRPC and HTTP API, even by user. Only admin can use the commands for other users.
|
%% user - can be used through XMLRPC and HTTP API, even by user. Only admin can use the commands for other users.
|
||||||
%%
|
%%
|
||||||
%% Then to perform an action, send a POST request to the following URL:
|
%% Then to perform an action, send a POST request to the following URL:
|
||||||
|
@ -301,7 +301,7 @@ handle(Call, Auth, Args, Version) when is_atom(Call), is_list(Args) ->
|
||||||
throw:{not_allowed, Msg} ->
|
throw:{not_allowed, Msg} ->
|
||||||
{401, iolist_to_binary(Msg)};
|
{401, iolist_to_binary(Msg)};
|
||||||
throw:{error, account_unprivileged} ->
|
throw:{error, account_unprivileged} ->
|
||||||
{403, 31, <<"Command need to be run with admin priviledge.">>};
|
{403, 31, <<"Command need to be run with admin privilege.">>};
|
||||||
throw:{error, access_rules_unauthorized} ->
|
throw:{error, access_rules_unauthorized} ->
|
||||||
{403, 32, <<"AccessRules: Account does not have the right to perform the operation.">>};
|
{403, 32, <<"AccessRules: Account does not have the right to perform the operation.">>};
|
||||||
throw:{invalid_parameter, Msg} ->
|
throw:{invalid_parameter, Msg} ->
|
||||||
|
|
|
@ -2826,7 +2826,7 @@ get_options_for_subs(Host, Nidx, Subs, true) ->
|
||||||
|
|
||||||
broadcast_stanza(Host, _Node, _Nidx, _Type, NodeOptions, SubsByDepth, NotifyType, BaseStanza, SHIM) ->
|
broadcast_stanza(Host, _Node, _Nidx, _Type, NodeOptions, SubsByDepth, NotifyType, BaseStanza, SHIM) ->
|
||||||
NotificationType = get_option(NodeOptions, notification_type, headline),
|
NotificationType = get_option(NodeOptions, notification_type, headline),
|
||||||
BroadcastAll = get_option(NodeOptions, broadcast_all_resources), %% XXX this is not standard, but usefull
|
BroadcastAll = get_option(NodeOptions, broadcast_all_resources), %% XXX this is not standard, but useful
|
||||||
Stanza = add_message_type(
|
Stanza = add_message_type(
|
||||||
xmpp:set_from(BaseStanza, service_jid(Host)),
|
xmpp:set_from(BaseStanza, service_jid(Host)),
|
||||||
NotificationType),
|
NotificationType),
|
||||||
|
|
|
@ -273,8 +273,8 @@ write_roster_version(LUser, LServer, InTransaction) ->
|
||||||
end,
|
end,
|
||||||
Ver.
|
Ver.
|
||||||
|
|
||||||
%% Load roster from DB only if neccesary.
|
%% Load roster from DB only if necessary.
|
||||||
%% It is neccesary if
|
%% It is necessary if
|
||||||
%% - roster versioning is disabled in server OR
|
%% - roster versioning is disabled in server OR
|
||||||
%% - roster versioning is not used by the client OR
|
%% - roster versioning is not used by the client OR
|
||||||
%% - roster versioning is used by server and client, BUT the server isn't storing versions on db OR
|
%% - roster versioning is used by server and client, BUT the server isn't storing versions on db OR
|
||||||
|
|
|
@ -160,10 +160,10 @@ delete_node(Nodes) ->
|
||||||
%% can decide to:<ul>
|
%% can decide to:<ul>
|
||||||
%% <li>reject the subscription;</li>
|
%% <li>reject the subscription;</li>
|
||||||
%% <li>allow it as is, letting the main module perform the database
|
%% <li>allow it as is, letting the main module perform the database
|
||||||
%% persistance;</li>
|
%% persistence;</li>
|
||||||
%% <li>allow it, modifying the record. The main module will store the
|
%% <li>allow it, modifying the record. The main module will store the
|
||||||
%% modified record;</li>
|
%% modified record;</li>
|
||||||
%% <li>allow it, but perform the needed persistance operations.</li></ul>
|
%% <li>allow it, but perform the needed persistence operations.</li></ul>
|
||||||
%% </li></ul></p>
|
%% </li></ul></p>
|
||||||
%% <p>The selected behaviour depends on the return parameter:
|
%% <p>The selected behaviour depends on the return parameter:
|
||||||
%% <ul>
|
%% <ul>
|
||||||
|
@ -177,9 +177,9 @@ delete_node(Nodes) ->
|
||||||
%% passed in parameter <tt>SubscribeResult</tt>.</li>
|
%% passed in parameter <tt>SubscribeResult</tt>.</li>
|
||||||
%% <li><tt>{true, done}</tt>: Subscribe operation is allowed, but the
|
%% <li><tt>{true, done}</tt>: Subscribe operation is allowed, but the
|
||||||
%% {@link mod_pubsub:pubsubState()} will be considered as already stored and
|
%% {@link mod_pubsub:pubsubState()} will be considered as already stored and
|
||||||
%% no further persistance operation will be performed. This case is used,
|
%% no further persistence operation will be performed. This case is used,
|
||||||
%% when the plugin module is doing the persistance by itself or when it want
|
%% when the plugin module is doing the persistence by itself or when it want
|
||||||
%% to completly disable persistance.</li></ul>
|
%% to completly disable persistence.</li></ul>
|
||||||
%% </p>
|
%% </p>
|
||||||
%% <p>In the default plugin module, the record is unchanged.</p>
|
%% <p>In the default plugin module, the record is unchanged.</p>
|
||||||
subscribe_node(Nidx, Sender, Subscriber, AccessModel,
|
subscribe_node(Nidx, Sender, Subscriber, AccessModel,
|
||||||
|
@ -329,9 +329,9 @@ delete_subscriptions(SubState, Subscriptions) ->
|
||||||
%% result of the preparation as a {@link mod_pubsub:pubsubItem()} record.</li>
|
%% result of the preparation as a {@link mod_pubsub:pubsubItem()} record.</li>
|
||||||
%% <li>This function gets the prepared record and several other parameters and can decide to:<ul>
|
%% <li>This function gets the prepared record and several other parameters and can decide to:<ul>
|
||||||
%% <li>reject the publication;</li>
|
%% <li>reject the publication;</li>
|
||||||
%% <li>allow the publication as is, letting the main module perform the database persistance;</li>
|
%% <li>allow the publication as is, letting the main module perform the database persistence;</li>
|
||||||
%% <li>allow the publication, modifying the record. The main module will store the modified record;</li>
|
%% <li>allow the publication, modifying the record. The main module will store the modified record;</li>
|
||||||
%% <li>allow it, but perform the needed persistance operations.</li></ul>
|
%% <li>allow it, but perform the needed persistence operations.</li></ul>
|
||||||
%% </li></ul></p>
|
%% </li></ul></p>
|
||||||
%% <p>The selected behaviour depends on the return parameter:
|
%% <p>The selected behaviour depends on the return parameter:
|
||||||
%% <ul>
|
%% <ul>
|
||||||
|
@ -343,13 +343,13 @@ delete_subscriptions(SubState, Subscriptions) ->
|
||||||
%% performed.</li>
|
%% performed.</li>
|
||||||
%% <li><tt>{true, Item}</tt>: Publication operation is allowed, but the
|
%% <li><tt>{true, Item}</tt>: Publication operation is allowed, but the
|
||||||
%% {@link mod_pubsub:pubsubItem()} record returned replaces the value passed
|
%% {@link mod_pubsub:pubsubItem()} record returned replaces the value passed
|
||||||
%% in parameter <tt>Item</tt>. The persistance will be performed by the main
|
%% in parameter <tt>Item</tt>. The persistence will be performed by the main
|
||||||
%% module.</li>
|
%% module.</li>
|
||||||
%% <li><tt>{true, done}</tt>: Publication operation is allowed, but the
|
%% <li><tt>{true, done}</tt>: Publication operation is allowed, but the
|
||||||
%% {@link mod_pubsub:pubsubItem()} will be considered as already stored and
|
%% {@link mod_pubsub:pubsubItem()} will be considered as already stored and
|
||||||
%% no further persistance operation will be performed. This case is used,
|
%% no further persistence operation will be performed. This case is used,
|
||||||
%% when the plugin module is doing the persistance by itself or when it want
|
%% when the plugin module is doing the persistence by itself or when it want
|
||||||
%% to completly disable persistance.</li></ul>
|
%% to completly disable persistence.</li></ul>
|
||||||
%% </p>
|
%% </p>
|
||||||
%% <p>In the default plugin module, the record is unchanged.</p>
|
%% <p>In the default plugin module, the record is unchanged.</p>
|
||||||
publish_item(Nidx, Publisher, PublishModel, MaxItems, ItemId, Payload,
|
publish_item(Nidx, Publisher, PublishModel, MaxItems, ItemId, Payload,
|
||||||
|
|
Loading…
Reference in New Issue