mod_selfregister

Self-service registration commands. Part of the bundled plug-ins.

mod_selfregister lets users register their own nick and change their own password from inside the hub, with !regme and !passwd.

It stores nothing itself. It is pure policy, and reaches user records through the hub's storage accessors, which route to whichever authentication storage plug-in is loaded — today mod_auth_sqlite, tomorrow any other backend. Load it alongside a storage plug-in; on its own it has nowhere to write.

New in uhub 0.8.0. These commands used to live behind the self_register parameter of mod_auth_sqlite, which has been removed — see Migrating.

Loading

Order matters: load the storage plug-in first.

plugin /var/lib/uhub/mod_auth_sqlite.so "file=/etc/uhub/users.db"
plugin /var/lib/uhub/mod_selfregister.so

Configuration

This plug-in takes no parameters.

Commands

CommandAccessDescription
!regme <password>guestRegister the nick you are currently using, with the given password.
!passwd <password>registeredChange the password of your registered nick.

Passwords must be 1–64 characters and may not contain spaces. After !regme, set the password in your client and reconnect to log in as a registered user — registering does not upgrade the session you are already in.

Any guest can permanently claim any unregistered nick. That is the point of self-registration, but it means the plug-in is only appropriate on hubs where that is acceptable. On a moderated or private hub, register accounts with uhub-passwd instead and leave this plug-in unloaded.

Migrating from mod_auth_sqlite self_register

The self_register parameter was removed in 0.8.0 and the hub refuses to start if it is still present, rather than quietly dropping a security-relevant setting. Drop the parameter and load this plug-in:

# before (0.7.x)
plugin /var/lib/uhub/mod_auth_sqlite.so "file=/etc/uhub/users.db self_register=true"

# after (0.8.0)
plugin /var/lib/uhub/mod_auth_sqlite.so "file=/etc/uhub/users.db"
plugin /var/lib/uhub/mod_selfregister.so

If you did not use self_register, simply do not load this plug-in — the commands disappear along with it. The user database format is unchanged either way.