# HG changeset patch # User Matthew Wild # Date 1600092319 -3600 # Node ID ee8e7f5196b4f32929ca7932ba06917f0e43e1a4 # Parent d3c7be9e36d9cb53fd726972d123a774ea202414 mod_invites_register: Fix traceback for non-invite registrations diff -r d3c7be9e36d9 -r ee8e7f5196b4 mod_invites_register/mod_invites_register.lua --- a/mod_invites_register/mod_invites_register.lua Mon Sep 14 15:55:29 2020 +0200 +++ b/mod_invites_register/mod_invites_register.lua Mon Sep 14 15:05:19 2020 +0100 @@ -89,6 +89,11 @@ event.allowed = false; event.reason = "Registration on this server is through invitation only"; return; + elseif not validated_invite then + -- This registration is not using an invite, but + -- the server is not in invite-only mode, so nothing + -- for this module to do... + return; end if validated_invite and validated_invite.additional_data and validated_invite.additional_data.allow_reset then event.allow_reset = validated_invite.additional_data.allow_reset;