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}.
{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}) ->
"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],
"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}].
{ok, State}.
%%-----------------------------
-%% ejabberdctl Command managment
+%% ejabberdctl Command management
%%-----------------------------
register_commands(CmdDescs, Module, Function) ->
io:format(lists:flatten(Format), Args).
%%-----------------------------
-%% Command managment
+%% Command management
%%-----------------------------
%%+++
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 <klacke@hyber.org>
{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),
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),
%%% 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:
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
%% 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:
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} ->
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),
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
%% can decide to:<ul>
%% <li>reject the subscription;</li>
%% <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
%% 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>
%% <p>The selected behaviour depends on the return parameter:
%% <ul>
%% passed in parameter <tt>SubscribeResult</tt>.</li>
%% <li><tt>{true, done}</tt>: Subscribe operation is allowed, but the
%% {@link mod_pubsub:pubsubState()} will be considered as already stored and
-%% no further persistance operation will be performed. This case is used,
-%% when the plugin module is doing the persistance by itself or when it want
-%% to completly disable persistance.</li></ul>
+%% 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>
%% </p>
%% <p>In the default plugin module, the record is unchanged.</p>
subscribe_node(Nidx, Sender, Subscriber, AccessModel,
%% 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>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 it, but perform the needed persistance operations.</li></ul>
+%% <li>allow it, but perform the needed persistence operations.</li></ul>
%% </li></ul></p>
%% <p>The selected behaviour depends on the return parameter:
%% <ul>
%% performed.</li>
%% <li><tt>{true, Item}</tt>: Publication operation is allowed, but the
%% {@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>
%% <li><tt>{true, done}</tt>: Publication operation is allowed, but the
%% {@link mod_pubsub:pubsubItem()} will be considered as already stored and
-%% no further persistance operation will be performed. This case is used,
-%% when the plugin module is doing the persistance by itself or when it want
-%% to completly disable persistance.</li></ul>
+%% 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>
%% </p>
%% <p>In the default plugin module, the record is unchanged.</p>
publish_item(Nidx, Publisher, PublishModel, MaxItems, ItemId, Payload,