From 0909927ad9451e365d2a20e759c9e85e2533495c Mon Sep 17 00:00:00 2001 From: Marco Cirillo Date: Sat, 2 Jun 2018 23:04:02 +0200 Subject: [PATCH] {...}: refactor code. - Remove trailing dots - Fix check for anonymous hosts --- .../mod_incidents_handling.lua | 8 ++--- plugins/mod_auth_anonymous.lua | 12 +++---- plugins/mod_auth_internal_hashed.lua | 16 +++++----- plugins/mod_auth_internal_plain.lua | 10 +++--- plugins/mod_gate_guard.lua | 4 +-- plugins/mod_messagefilter.lua | 2 +- plugins/mod_muc_limits.lua | 2 +- plugins/mod_register.lua | 12 +++---- plugins/mod_server_presence.lua | 8 ++--- plugins/mod_vjud.lua | 14 ++++---- plugins/privacy/mod_privacy.lua | 8 ++--- plugins/privacy/privacy.lib.lua | 32 +++++++++---------- plugins/spim_block/mod_spim_block.lua | 2 +- 13 files changed, 65 insertions(+), 65 deletions(-) diff --git a/plugins/incidents_handling/mod_incidents_handling.lua b/plugins/incidents_handling/mod_incidents_handling.lua index 99c0e153..b8417c65 100644 --- a/plugins/incidents_handling/mod_incidents_handling.lua +++ b/plugins/incidents_handling/mod_incidents_handling.lua @@ -240,7 +240,7 @@ local function list_incidents_command_handler(self, data, state) local single_incident_layout = ih_lib.render_single(incidents[fields.ids]) return { status = "executing", actions = { "prev", "complete", default = "complete" }, form = single_incident_layout }, { step = 1, form_layout = single_incident_layout, id = fields.ids } else - return { status = "completed", error = { message = "You need to select the report ID to continue." } } + return { status = "completed", error = { message = "You need to select the report ID to continue" } } end end else @@ -264,7 +264,7 @@ local function send_inquiry_command_handler(self, data, state) local fields = send_inquiry_layout:data(data.form) if not fields.hostname or not fields.id or not fields.server then - return { status = "completed", error = { message = "You must supply the server to quest, the involved incident host and the incident ID." } } + return { status = "completed", error = { message = "You must supply the server to quest, the involved incident host and the incident ID" } } else local iq_send = st.iq({ from = my_host, to = fields.server, type = "get" }) :tag("inquiry", { xmlns = xmlns_inc }) @@ -273,7 +273,7 @@ local function send_inquiry_command_handler(self, data, state) module:log("debug", "Sending incident inquiry to %s", fields.server) module:send(iq_send) - return { status = "completed", info = "Inquiry sent, if an answer can be obtained from the remote server it'll be listed between incidents." } + return { status = "completed", info = "Inquiry sent, if an answer can be obtained from the remote server it'll be listed between incidents" } end else return { status = "executing", form = send_inquiry_layout }, "executing" @@ -282,7 +282,7 @@ end local function rr_command_handler(self, data, state, formtype) local send_layout = ih_lib.get_incident_layout(formtype) - local err_no_fields = { status = "completed", error = { message = "You need to fill all fields, except the eventual related incident." } } + local err_no_fields = { status = "completed", error = { message = "You need to fill all fields, except the eventual related incident" } } local err_proc = { status = "completed", error = { message = "There was an error processing your request, check out the syntax" } } if state then diff --git a/plugins/mod_auth_anonymous.lua b/plugins/mod_auth_anonymous.lua index 5ace695f..92057481 100644 --- a/plugins/mod_auth_anonymous.lua +++ b/plugins/mod_auth_anonymous.lua @@ -24,28 +24,28 @@ function new_default_provider(host) local provider = { name = "anonymous" }; function provider.test_password(username, password) - return nil, "Password based auth not supported."; + return nil, "Password based auth not supported"; end function provider.get_password(username) - return nil, "Password not available."; + return nil, "Password not available"; end function provider.set_password(username, password) - return nil, "Password based auth not supported."; + return nil, "Password based auth not supported"; end function provider.user_exists(username) local user_session = my_host.sessions[username]; if not user_session then - return nil, "No anonymous user connected with that username."; + return nil, "No anonymous user connected with that username"; end return true; end function provider.create_user(username, password) - return nil, "Account creation/modification not supported."; + return nil, "Account creation/modification not supported"; end function provider.get_sasl_handler(session) @@ -60,7 +60,7 @@ function new_default_provider(host) end if not test_mode and not multi_resourcing and my_host.sessions[username] then - return nil, "not-authorized", "You're allowed to have only one anonymous session at any given time, good bye."; + return nil, "not-authorized", "You're allowed to have only one anonymous session at any given time, good bye"; end session.is_anonymous = true; diff --git a/plugins/mod_auth_internal_hashed.lua b/plugins/mod_auth_internal_hashed.lua index 28ba42bb..7fa0e993 100644 --- a/plugins/mod_auth_internal_hashed.lua +++ b/plugins/mod_auth_internal_hashed.lua @@ -32,18 +32,18 @@ function new_hashpass_provider(host) if credentials.password ~= nil and string.len(credentials.password) ~= 0 then if credentials.password ~= password then - return nil, "Auth failed. Provided password is incorrect."; + return nil, "Auth failed, provided password is incorrect"; end if provider.set_password(username, credentials.password) == nil then - return nil, "Auth failed. Could not set hashed password from plaintext."; + return nil, "Auth failed, could not set hashed password from plaintext"; else return true; end end if credentials.iteration_count == nil or credentials.salt == nil or string.len(credentials.salt) == 0 then - return nil, "Auth failed. Stored salt and iteration count information is not complete."; + return nil, "Auth failed, stored salt and iteration count information is not complete"; end local valid, stored_key, server_key = getAuthenticationDatabaseSHA1(password, credentials.salt, credentials.iteration_count); @@ -54,7 +54,7 @@ function new_hashpass_provider(host) if valid and stored_key_hex == credentials.stored_key and server_key_hex == credentials.server_key then return true; else - return nil, "Auth failed. Invalid username, password, or password hash information."; + return nil, "Auth failed.. invalid username, password, or password hash information"; end end @@ -73,14 +73,14 @@ function new_hashpass_provider(host) account.password = nil; return datamanager.store(username, host, "accounts", account); end - return nil, "Account not available."; + return nil, "Account not available"; end function provider.user_exists(username) local account = datamanager.load(username, host, "accounts"); if not account then log("debug", "account not found for username '%s' at host '%s'", username, module.host); - return nil, "Auth failed. Invalid username"; + return nil, "Auth failed, invalid username"; end return true; end @@ -88,7 +88,7 @@ function new_hashpass_provider(host) function provider.is_locked(username) local account = datamanager.load(username, host, "accounts"); if not account then - return nil, "Auth failed. Invalid username"; + return nil, "Auth failed, invalid username"; elseif account and account.locked then return true; end @@ -98,7 +98,7 @@ function new_hashpass_provider(host) function provider.unlock_user(username) local account = datamanager.load(username, host, "accounts"); if not account then - return nil, "Auth failed. Invalid username"; + return nil, "Auth failed, invalid username"; elseif account and account.locked then account.locked = nil; local bare_session = bare_sessions[username.."@"..host]; diff --git a/plugins/mod_auth_internal_plain.lua b/plugins/mod_auth_internal_plain.lua index a589ac2d..e894105b 100644 --- a/plugins/mod_auth_internal_plain.lua +++ b/plugins/mod_auth_internal_plain.lua @@ -29,7 +29,7 @@ function new_default_provider(host) if password == credentials.password then return true; else - return nil, "Auth failed. Invalid username or password."; + return nil, "Auth failed, invalid username or password"; end end @@ -44,14 +44,14 @@ function new_default_provider(host) account.password = password; return datamanager.store(username, host, "accounts", account); end - return nil, "Account not available."; + return nil, "Account not available"; end function provider.user_exists(username) local account = datamanager.load(username, host, "accounts"); if not account then log("debug", "account not found for username '%s' at host '%s'", username, module.host); - return nil, "Auth failed. Invalid username"; + return nil, "Auth failed, invalid username"; end return true; end @@ -59,7 +59,7 @@ function new_default_provider(host) function provider.is_locked(username) local account = datamanager.load(username, host, "accounts"); if not account then - return nil, "Auth failed. Invalid username"; + return nil, "Auth failed, invalid username"; elseif account and account.locked then return true; end @@ -69,7 +69,7 @@ function new_default_provider(host) function provider.unlock_user(username) local account = datamanager.load(username, host, "accounts"); if not account then - return nil, "Auth failed. Invalid username"; + return nil, "Auth failed, invalid username"; elseif account and account.locked then account.locked = nil; local bare_session = bare_sessions[username.."@"..host]; diff --git a/plugins/mod_gate_guard.lua b/plugins/mod_gate_guard.lua index c94d587a..3da8fe6a 100644 --- a/plugins/mod_gate_guard.lua +++ b/plugins/mod_gate_guard.lua @@ -66,7 +66,7 @@ local function rr_hook(event) end module:log("info", "%s attempted to connect to a blocked remote host %s", stanza.attr.from or event.origin.full_jid, to_host); if stanza.attr.type ~= "error" then - send(error_reply(event.stanza, "cancel", "policy-violation", "Communicating with a blocked remote server is not allowed.")); + send(error_reply(event.stanza, "cancel", "policy-violation", "Communicating with a blocked remote server is not allowed")); end return true; end @@ -99,7 +99,7 @@ function module.add_host(module) module:set_component_inheritable(); local host = module.host; - if not host.anonymous then + if not host.anonymous_host then module:hook("route/remote", rr_hook, 500); module:hook("stanza/jabber:server:dialback:result", function(event) return filter(event.origin, event.stanza.attr.from, event.stanza.attr.to); diff --git a/plugins/mod_messagefilter.lua b/plugins/mod_messagefilter.lua index cb70291c..801ffe99 100644 --- a/plugins/mod_messagefilter.lua +++ b/plugins/mod_messagefilter.lua @@ -24,7 +24,7 @@ local function message_filter(event) if body_text then local host = ahosts:contains(fromhost) and hosts[fromhost]; - if not host or not host.anonymous then return; end + if not host or not host.anonymous_host then return; end for _, pattern in ipairs(patterns) do if body_text:match(pattern) then diff --git a/plugins/mod_muc_limits.lua b/plugins/mod_muc_limits.lua index 7ef6469b..f2b1c2f8 100644 --- a/plugins/mod_muc_limits.lua +++ b/plugins/mod_muc_limits.lua @@ -133,7 +133,7 @@ module:hook("muc-fields-process", function(room, fields, stanza, changed) room:set_option("limits_enabled", enabled, changed); if enabled then if not tonumber(stanzas) or not tonumber(seconds) then - return st.error_reply(stanza, "cancel", "forbidden", "You need to submit valid number values for muc_limits fields."); + return st.error_reply(stanza, "cancel", "forbidden", "You need to submit valid number values for muc_limits fields"); end stanzas, seconds = math.max(tonumber(stanzas), 1), math.max(tonumber(seconds), 0); room:set_option("limits_stanzas", stanzas, changed); diff --git a/plugins/mod_register.lua b/plugins/mod_register.lua index f7cba17a..c71c673f 100644 --- a/plugins/mod_register.lua +++ b/plugins/mod_register.lua @@ -30,7 +30,7 @@ local additional_fields = module:get_option("additional_registration_fields", {} local min_pass_len = module:get_option_number("register_min_pass_length", 8); local max_pass_len = module:get_option_number("register_max_pass_length", 30); local require_verification = module:get_option_boolean("register_require_verification", false); -local register_tos = module:get_option_string("register_tos", "By registering you implicitly accept our terms of service"); +local register_tos = module:get_option_string("register_tos", "By registering you implicitly accept our terms of service."); local field_map = { username = { name = "username", type = "text-single", label = "Username", required = true }; @@ -110,7 +110,7 @@ local function validate_password(stanza, session, password) session.send(st.error_reply(stanza, "modify", "policy-violation", "Passwords must contain at least one digit or one special character, one uppercase letter " .. "and must be at least " .. tostring(min_pass_len) .. " chars in length and not exceed " .. - tostring(max_pass_len) .. " chars." + tostring(max_pass_len) .. " chars" )); return false; end @@ -259,7 +259,7 @@ module:hook("stanza/iq/jabber:iq:register:query", function(event) else -- Check that the user is not blacklisted or registering too often if match_ip(session.ip) or (whitelist_only and not match_ip(session.ip, true)) then - session.send(st.error_reply(stanza, "cancel", "not-acceptable", "You are not allowed to register an account.")); + session.send(st.error_reply(stanza, "cancel", "not-acceptable", "You are not allowed to register an account")); return true; elseif min_seconds_between_registrations and not match_ip(session.ip, true) then if not recent_ips[session.ip] then @@ -280,13 +280,13 @@ module:hook("stanza/iq/jabber:iq:register:query", function(event) data.username, data.password = nil, nil; local host = module.host; if not username or username == "" then - session.send(st.error_reply(stanza, "modify", "not-acceptable", "The requested username is invalid.")); + session.send(st.error_reply(stanza, "modify", "not-acceptable", "The requested username is invalid")); elseif usermanager_user_exists(username, host) then - session.send(st.error_reply(stanza, "cancel", "conflict", "The requested username already exists.")); + session.send(st.error_reply(stanza, "cancel", "conflict", "The requested username already exists")); else if not validate_password(stanza, session, password) then return true; end - local error_reply = st.error_reply(stanza, "wait", "internal-server-error", "Failed to write data to disk."); + local error_reply = st.error_reply(stanza, "wait", "internal-server-error", "Failed to write data to disk"); if usermanager_create_user(username, password, host, require_verification and true) then if next(data) and not datamanager.store(username, host, "account_details", data) then usermanager_delete_user(username, host, "mod_register"); diff --git a/plugins/mod_server_presence.lua b/plugins/mod_server_presence.lua index 3b7e7e5f..a64d8c1a 100644 --- a/plugins/mod_server_presence.lua +++ b/plugins/mod_server_presence.lua @@ -91,18 +91,18 @@ local function subscribe_command_handler(self, data, state) local peer = fields.peerjid; if not peer or peer == "" then - return { status = "completed", error = { message = "You need to supply the server QDN." } }; + return { status = "completed", error = { message = "You need to supply the server QDN" } }; else if peer == my_host then return { status = "completed", error = { message = "I can't subscribe to myself!!! *rolls eyes*" } }; elseif subscribed[peer] then - return { status = "completed", error = { message = "I'm already subscribed to this entity." } }; + return { status = "completed", error = { message = "I'm already subscribed to this entity" } }; end local subscribe = st.presence({ to = peer, from = my_host, type = "subscribe" }); outbound[peer] = true; module:send(subscribe); datamanager.store("outbound", my_host, "server_presence", outbound); - return { status = "completed", info = "Subscription request sent." }; + return { status = "completed", info = "Subscription request sent" }; end else return { status = "executing", form = layout }, "executing" @@ -159,7 +159,7 @@ local function remove_command_handler(self, data, state) end if _changed then datamanager.store("subscribed", my_host, "server_presence", subscribed); end - return { status = "completed", info = "Done." }; + return { status = "completed", info = "Done" }; else return { status = "executing", form = layout }, "executing" end diff --git a/plugins/mod_vjud.lua b/plugins/mod_vjud.lua index 4485e134..6e6c18af 100644 --- a/plugins/mod_vjud.lua +++ b/plugins/mod_vjud.lua @@ -75,7 +75,7 @@ local function search_process_handler(event) if not form then origin.send(st.error_reply(stanza, "cancel", "service-unavailable")) return end if form.attr.type == "cancel" then origin.send(st.reply(stanza)) ; return end - if form.attr.type ~= "submit" then origin.send(st.error_reply(stanza, "cancel", "bad-request", "You need to submit the search form.")) ; return end + if form.attr.type ~= "submit" then origin.send(st.error_reply(stanza, "cancel", "bad-request", "You need to submit the search form")) ; return end local fields = search_form_layout():data(form) if fields.FORM_TYPE ~= "jabber:iq:search" then @@ -198,7 +198,7 @@ local function optin_command_handler(self, data, state) local fields = optin_layout:data(data.form) if restrict_to_hosts then local node, host = jid_split(data.from) - if not restrict_to_hosts:contains(host) then return { status = completed, error = { message = "Signup to this directory is restricted." } } end + if not restrict_to_hosts:contains(host) then return { status = completed, error = { message = "Signup to this directory is restricted" } } end end if not fields.nickname and not fields.realname and not fields.country and not fields.email then return { status = "completed", error = { message = "You need to fill at least one field." } } @@ -210,10 +210,10 @@ local function optin_command_handler(self, data, state) if datamanager.store("store", my_host, "directory", directory) then return { status = "completed", info = "Success." } else - return { status = "completed", error = { message = "Adding was successful but I failed to write to the directory store, please report to the admin." } } + return { status = "completed", error = { message = "Adding was successful but I failed to write to the directory store, please report to the admin" } } end else - return { status = "completed", error = { message = "You have already opted in, please opt out first, if you want to change your data." } } + return { status = "completed", error = { message = "You have already opted in, please opt out first, if you want to change your data" } } end end else @@ -226,7 +226,7 @@ local function optin_vcard_command_handler(self, data, state) local jid = jid_bare(data.from) if host ~= synchronize_to_host or not hosts[synchronize_to_host] then - return { status = completed, error = { message = "You can't signup to this directory sorry." } } + return { status = completed, error = { message = "You can't signup to this directory sorry" } } end local vcard = metronome.events.fire_event("vcard-synchronize", { node = node, host = host }) @@ -239,7 +239,7 @@ local function optin_vcard_command_handler(self, data, state) if datamanager.store("store", my_host, "directory", directory) then return { status = "completed", info = "Success." } else - return { status = "completed", error = { message = "Adding was successful but I failed to write to the directory store, please report to the admin." } } + return { status = "completed", error = { message = "Adding was successful but I failed to write to the directory store, please report to the admin" } } end end @@ -249,7 +249,7 @@ local function optout_command_handler(self, data, state) if datamanager.store("store", my_host, "directory", directory) then return { status = "completed", info = "You have been removed from the user directory." } else - return { status = "completed", error = { message = "Removal was successful but I failed to write to the directory store, please report to the admin." } } + return { status = "completed", error = { message = "Removal was successful but I failed to write to the directory store, please report to the admin" } } end else return { status = "completed", error = { message = "You need to optin first!" } } diff --git a/plugins/privacy/mod_privacy.lua b/plugins/privacy/mod_privacy.lua index 4e961f2d..9ea43129 100644 --- a/plugins/privacy/mod_privacy.lua +++ b/plugins/privacy/mod_privacy.lua @@ -112,7 +112,7 @@ module:hook("iq-set/self/"..blocking_xmlns..":block", function(data) simple_create_list(privacy_lists); local entries = simple_process_entries(block); if not entries then - origin.send(st.error_reply(stanza, "modify", "bad-request", "Item stanza is not well formed.")); + origin.send(st.error_reply(stanza, "modify", "bad-request", "Item stanza is not well formed")); return true; end @@ -121,7 +121,7 @@ module:hook("iq-set/self/"..blocking_xmlns..":block", function(data) origin.send(st.reply(stanza)); else - origin.send(st.error_reply(stanza, "modify", "bad-request", "You need to specify at least one item to add.")); + origin.send(st.error_reply(stanza, "modify", "bad-request", "You need to specify at least one item to add")); end store_save(origin.username, origin.host, "privacy", privacy_lists); @@ -133,7 +133,7 @@ module:hook("iq-set/self/"..blocking_xmlns..":unblock", function(data) local privacy_lists = store_load(origin.username); if not privacy_lists or not privacy_lists.lists.simple then - origin.send(st.error_reply(stanza, "cancel", "item-not-found", "Blocking list is empty.")); + origin.send(st.error_reply(stanza, "cancel", "item-not-found", "Blocking list is empty")); return true; end @@ -144,7 +144,7 @@ module:hook("iq-set/self/"..blocking_xmlns..":unblock", function(data) local entries = simple_process_entries(unblock); if not entries then - origin.send(st.error_reply(stanza, "modify", "bad-request", "Item stanza is not well formed.")); + origin.send(st.error_reply(stanza, "modify", "bad-request", "Item stanza is not well formed")); return true; end diff --git a/plugins/privacy/privacy.lib.lua b/plugins/privacy/privacy.lib.lua index 04c413a7..fd5b98a3 100644 --- a/plugins/privacy/privacy.lib.lua +++ b/plugins/privacy/privacy.lib.lua @@ -66,11 +66,11 @@ end local function priv_decline_list(privacy_lists, origin, stanza, which) if which == "default" then if privacy_lists.default == "simple" then - return { "cancel", "forbidden", "Can't decline current default list via privacy lists." }; + return { "cancel", "forbidden", "Can't decline current default list via privacy lists" }; end if priv_is_defaultlist_used(origin) then - return { "cancel", "conflict", "Another session is online and using the default list." }; + return { "cancel", "conflict", "Another session is online and using the default list" }; end privacy_lists.default = nil; origin.send(st.reply(stanza)); @@ -78,7 +78,7 @@ local function priv_decline_list(privacy_lists, origin, stanza, which) origin.active_privacylist = nil; origin.send(st.reply(stanza)); else - return { "modify", "bad-request", "Neither default nor active list specified to decline." }; + return { "modify", "bad-request", "Neither default nor active list specified to decline" }; end return true; end @@ -88,11 +88,11 @@ local function priv_activate_list(privacy_lists, origin, stanza, which, name) if which == "default" and list then if privacy_lists.default == "simple" then - return { "cancel", "forbidden", "Can't change current default list via privacy lists." }; + return { "cancel", "forbidden", "Can't change current default list via privacy lists" }; end if priv_is_defaultlist_used(origin) then - return { "cancel", "conflict", "Another session is online and using the default list." }; + return { "cancel", "conflict", "Another session is online and using the default list" }; end privacy_lists.default = name; @@ -104,7 +104,7 @@ local function priv_activate_list(privacy_lists, origin, stanza, which, name) elseif not list then return { "cancel", "item-not-found", "No such list: "..name }; else - return { "modify", "bad-request", "No list chosen to be active or default." }; + return { "modify", "bad-request", "No list chosen to be active or default" }; end return true; @@ -115,11 +115,11 @@ local function priv_delete_list(privacy_lists, origin, stanza, name) if list then if name == "simple" then - return { "modify", "policy-violation", "This list cannot be deleted via privacy lists." }; + return { "modify", "policy-violation", "This list cannot be deleted via privacy lists" }; end if priv_is_list_used(origin, name, privacy_lists) then - return { "cancel", "conflict", "Another session is online and using the list which should be deleted." }; + return { "cancel", "conflict", "Another session is online and using the list which should be deleted" }; end if privacy_lists.default == name then privacy_lists.default = nil; @@ -133,12 +133,12 @@ local function priv_delete_list(privacy_lists, origin, stanza, name) return true; end - return { "modify", "bad-request", "Not existing list specified to be deleted." }; + return { "modify", "bad-request", "Not existing list specified to be deleted" }; end local function priv_create_list(privacy_lists, origin, stanza, name, entries) if name == "simple" then - return { "modify", "policy-violation", "This list name is reserved and can't be created via privacy lists." }; + return { "modify", "policy-violation", "This list name is reserved and can't be created via privacy lists" }; end local bare_jid = origin.username.."@"..origin.host; @@ -156,12 +156,12 @@ local function priv_create_list(privacy_lists, origin, stanza, name, entries) for _, item in ipairs(entries) do if tonumber(item.attr.order) == nil or tonumber(item.attr.order) < 0 or order_check[item.attr.order] then - return { "modify", "bad-request", "Order attribute not valid." }; + return { "modify", "bad-request", "Order attribute not valid" }; end if item.attr.type ~= "jid" and item.attr.type ~= "subscription" and item.attr.type ~= "group" and item.attr.type ~= nil then - return { "modify", "bad-request", "Type attribute not valid." }; + return { "modify", "bad-request", "Type attribute not valid" }; end local tmp = {}; @@ -187,12 +187,12 @@ local function priv_create_list(privacy_lists, origin, stanza, name, entries) tmp.value ~= "to" and tmp.value ~= "from" and tmp.value ~= "none" then - return { "cancel", "bad-request", "Subscription value must be both, to, from or none." }; + return { "cancel", "bad-request", "Subscription value must be both, to, from or none" }; end end if tmp.action ~= "deny" and tmp.action ~= "allow" then - return { "cancel", "bad-request", "Action must be either deny or allow." }; + return { "cancel", "bad-request", "Action must be either deny or allow" }; end list.items[#list.items + 1] = tmp; end @@ -210,7 +210,7 @@ local function priv_create_list(privacy_lists, origin, stanza, name, entries) session.send(iq); end else - return { "cancel", "bad-request", "internal error." }; + return { "cancel", "bad-request", "Internal error" }; end return true; @@ -245,7 +245,7 @@ local function priv_get_list(privacy_lists, origin, stanza, name) reply:up(); end else - return {"cancel", "item-not-found", "Unknown list specified."}; + return {"cancel", "item-not-found", "Unknown list specified"}; end end diff --git a/plugins/spim_block/mod_spim_block.lua b/plugins/spim_block/mod_spim_block.lua index 79c64c2d..f0a1adb4 100644 --- a/plugins/spim_block/mod_spim_block.lua +++ b/plugins/spim_block/mod_spim_block.lua @@ -59,7 +59,7 @@ local function generate_secret(bytes) if secret then return secret; else - module:log("warn", "Failed to generate secret for SPIM token, the stanza will be allowed through."); + module:log("warn", "Failed to generate secret for SPIM token, the stanza will be allowed through"); return nil; end end