The variables $invexpire_n and $invexpire_u was undefined, but
references multiple times in a conditional. Just removed them which
should cause no changed behaviour.
Fir ref to undefined $ihave variable in the Module\Invite::get() method.
The var was defined later in the method. Also refactor to fix some other
strange logic in the same area while I was there.
- Moved the logic to cound invites currently in use by a channel to a
private function. This should probably be moved further to a Regiter
class once we have these things more in order.
- Changed the logic checking the configuration for how many invites a
channel can use at the same time to just return 4 (the default)
instead of going via 'na' and then checking if it's 'na' to then use
the default value.
- Dropped setting the config to the default if the module is visited by
an admin. That belongs somewhere else.