From 6e5439db5c8a5d0b897ebb76cdf3b32aba2bd887 Mon Sep 17 00:00:00 2001 From: Evgeniy Khramtsov Date: Sat, 27 Jan 2018 19:35:38 +0300 Subject: [PATCH] Find and fix typos using 'codespell' --- src/acme_challenge.erl | 2 +- src/ejabberd_access_permissions.erl | 2 +- src/ejabberd_commands.erl | 8 ++++---- src/ejabberd_ctl.erl | 4 ++-- src/ejabberd_http.erl | 2 +- src/ejabberd_listener.erl | 4 ++-- src/eldap_filter.erl | 2 +- src/mod_admin_extra.erl | 2 +- src/mod_http_api.erl | 4 ++-- src/mod_pubsub.erl | 2 +- src/mod_roster.erl | 4 ++-- src/node_flat.erl | 22 +++++++++++----------- 12 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/acme_challenge.erl b/src/acme_challenge.erl index f4fde4e73..5e8c09944 100644 --- a/src/acme_challenge.erl +++ b/src/acme_challenge.erl @@ -100,7 +100,7 @@ solve_challenge1(Chal = #challenge{type = <<"http-01">>, token=Tkn}, Key) -> ets_put_key_authorization(Tkn, KeyAuthz), {ok, Chal#challenge.uri, KeyAuthz}; solve_challenge1(Challenge, _Key) -> - ?ERROR_MSG("Unkown Challenge Type: ~p", [Challenge]), + ?ERROR_MSG("Unknown Challenge Type: ~p", [Challenge]), {error, unknown_challenge}. diff --git a/src/ejabberd_access_permissions.erl b/src/ejabberd_access_permissions.erl index 8151e9553..ca38ad0dc 100644 --- a/src/ejabberd_access_permissions.erl +++ b/src/ejabberd_access_permissions.erl @@ -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} end; 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]) end; ({scope, ScopeList}) -> diff --git a/src/ejabberd_commands.erl b/src/ejabberd_commands.erl index 0ace10e52..d9523ace5 100644 --- a/src/ejabberd_commands.erl +++ b/src/ejabberd_commands.erl @@ -259,9 +259,9 @@ get_commands_spec() -> "documentation should be stored", "Regexp matching names of commands or modules " "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"], - 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"], result_example = ok}, #ejabberd_commands{name = gen_markdown_doc_for_commands, tags = [documentation], @@ -273,9 +273,9 @@ get_commands_spec() -> "documentation should be stored", "Regexp matching names of commands or modules " "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"], - 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"], result_example = ok}]. diff --git a/src/ejabberd_ctl.erl b/src/ejabberd_ctl.erl index 804f3e8fa..408e489e6 100644 --- a/src/ejabberd_ctl.erl +++ b/src/ejabberd_ctl.erl @@ -133,7 +133,7 @@ code_change(_OldVsn, State, _Extra) -> {ok, State}. %%----------------------------- -%% ejabberdctl Command managment +%% ejabberdctl Command management %%----------------------------- register_commands(CmdDescs, Module, Function) -> @@ -866,7 +866,7 @@ print(Format, Args) -> io:format(lists:flatten(Format), Args). %%----------------------------- -%% Command managment +%% Command management %%----------------------------- %%+++ diff --git a/src/ejabberd_http.erl b/src/ejabberd_http.erl index 0152672be..05bdc4495 100644 --- a/src/ejabberd_http.erl +++ b/src/ejabberd_http.erl @@ -651,7 +651,7 @@ parse_lang(Langs) -> end. % 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. % Parts of this software is Copyright (c) Claes Wikstrom diff --git a/src/ejabberd_listener.erl b/src/ejabberd_listener.erl index 297a9c486..63842b626 100644 --- a/src/ejabberd_listener.erl +++ b/src/ejabberd_listener.erl @@ -107,7 +107,7 @@ init_udp(PortIP, Module, Opts, SockOpts, Port, IPS) -> {reuseaddr, true} | SockOpts]) of {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()}), application:ensure_started(ejabberd), 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) -> 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()}), application:ensure_started(ejabberd), start_module_sup(Port, Module), diff --git a/src/eldap_filter.erl b/src/eldap_filter.erl index 723b1059d..32cb85fd9 100644 --- a/src/eldap_filter.erl +++ b/src/eldap_filter.erl @@ -64,7 +64,7 @@ parse(L) -> %%% RFC2254_Filter = RegExp = Value = string(), %%% 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. %%% %%% Example: diff --git a/src/mod_admin_extra.erl b/src/mod_admin_extra.erl index a0679aefe..ec7376e1d 100644 --- a/src/mod_admin_extra.erl +++ b/src/mod_admin_extra.erl @@ -1025,7 +1025,7 @@ get_status_list(Host, Status_required) -> Sessions2 = [ {Session#session.usr, Session#session.sid, Session#session.priority} || Session <- Sessions], Fhost = case Host of <<"all">> -> - %% All hosts are requested, so dont filter at all + %% All hosts are requested, so don't filter at all fun(_, _) -> true end; _ -> %% Filter the list, only Host is interesting diff --git a/src/mod_http_api.erl b/src/mod_http_api.erl index d403e3aa9..e8ca866a1 100644 --- a/src/mod_http_api.erl +++ b/src/mod_http_api.erl @@ -43,7 +43,7 @@ %% add_commands allow exporting a class of commands, from %% 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. -%% 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. %% %% 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} -> {401, iolist_to_binary(Msg)}; 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} -> {403, 32, <<"AccessRules: Account does not have the right to perform the operation.">>}; throw:{invalid_parameter, Msg} -> diff --git a/src/mod_pubsub.erl b/src/mod_pubsub.erl index 436ed1f3e..80c93b4a7 100644 --- a/src/mod_pubsub.erl +++ b/src/mod_pubsub.erl @@ -2826,7 +2826,7 @@ get_options_for_subs(Host, Nidx, Subs, true) -> broadcast_stanza(Host, _Node, _Nidx, _Type, NodeOptions, SubsByDepth, NotifyType, BaseStanza, SHIM) -> 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( xmpp:set_from(BaseStanza, service_jid(Host)), NotificationType), diff --git a/src/mod_roster.erl b/src/mod_roster.erl index 68d987e0e..ed2a58887 100644 --- a/src/mod_roster.erl +++ b/src/mod_roster.erl @@ -273,8 +273,8 @@ write_roster_version(LUser, LServer, InTransaction) -> end, Ver. -%% Load roster from DB only if neccesary. -%% It is neccesary if +%% Load roster from DB only if necessary. +%% It is necessary if %% - roster versioning is disabled in server 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 diff --git a/src/node_flat.erl b/src/node_flat.erl index 639b24a93..2538a09a5 100644 --- a/src/node_flat.erl +++ b/src/node_flat.erl @@ -160,10 +160,10 @@ delete_node(Nodes) -> %% can decide to: +%%
  • allow it, but perform the needed persistence operations.
  • %%

    %%

    The selected behaviour depends on the return parameter: %%

    +%% 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. %%

    %%

    In the default plugin module, the record is unchanged.

    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. %%
  • This function gets the prepared record and several other parameters and can decide to:
      %%
    • reject the publication;
    • -%%
    • allow the publication as is, letting the main module perform the database persistance;
    • +%%
    • allow the publication as is, letting the main module perform the database persistence;
    • %%
    • allow the publication, modifying the record. The main module will store the modified record;
    • -%%
    • allow it, but perform the needed persistance operations.
    +%%
  • allow it, but perform the needed persistence operations.
  • %%

    %%

    The selected behaviour depends on the return parameter: %%

    +%% 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. %%

    %%

    In the default plugin module, the record is unchanged.

    publish_item(Nidx, Publisher, PublishModel, MaxItems, ItemId, Payload,