# HG changeset patch # User Kim Alvefur # Date 1687551665 -7200 # Node ID 8ed3c95bf8805796944a7de00f4361f83c582347 # Parent 395ae8df5a9e10b8a0d6011578d88bb78a87c924 squishy: Move the verse namespace prefix into a single place Less repetition Seemed weird that ProsodyModule = VerseModule diff -r 395ae8df5a9e -r 8ed3c95bf880 squishy --- a/squishy Fri Jun 23 22:20:24 2023 +0200 +++ b/squishy Fri Jun 23 22:21:05 2023 +0200 @@ -1,8 +1,10 @@ Output "verse.lua" -local VerseModule = Module +local function VerseModule(s) + return Module("verse."..s); +end local function ProsodyModule(s) - return VerseModule("prosody." .. s) + return Module("prosody." .. s) end function ProsodyModules() @@ -110,28 +112,27 @@ } for _, plugin in ipairs(plugins) do - VerseModule("verse.plugins." .. plugin)("plugins/" .. plugin .. ".lua") + VerseModule("plugins." .. plugin)("plugins/" .. plugin .. ".lua") end -- Verse-specific versions of libraries -VerseModule "verse.util.adhoc" "libs/adhoc.lib.lua" -VerseModule "verse.util.bit" "libs/bit.lua" -VerseModule "verse.util.encodings" "libs/encodings.lua" -VerseModule "verse.util.hashes" "libs/hashes.lua" -VerseModule "verse.util.table" "libs/table.lua" -VerseModule "verse.util.vcard" "util/vcard.lua" +VerseModule "util.adhoc" "libs/adhoc.lib.lua" +VerseModule "util.encodings" "libs/encodings.lua" +VerseModule "util.hashes" "libs/hashes.lua" +VerseModule "util.table" "libs/table.lua" +VerseModule "util.vcard" "util/vcard.lua" -VerseModule "verse.server" "server.lua" +VerseModule "server" "server.lua" -- SASL client mechanisms -VerseModule "verse.util.sasl.scram" "util/sasl/scram.lua" -VerseModule "verse.util.sasl.plain" "util/sasl/plain.lua" -VerseModule "verse.util.sasl.anonymous" "util/sasl/anonymous.lua" -VerseModule "verse.util.sasl.oauthbearer" "util/sasl/oauthbearer.lua" +VerseModule "util.sasl.scram" "util/sasl/scram.lua" +VerseModule "util.sasl.plain" "util/sasl/plain.lua" +VerseModule "util.sasl.anonymous" "util/sasl/anonymous.lua" +VerseModule "util.sasl.oauthbearer" "util/sasl/oauthbearer.lua" -VerseModule "verse.client" "client.lua" -VerseModule "verse.component" "component.lua" -VerseModule "verse.bosh" "bosh.lua" +VerseModule "client" "client.lua" +VerseModule "component" "component.lua" +VerseModule "bosh" "bosh.lua" if GetOption "internal-bit-module" then Module "bit" "libs/bit.lua"