Send a message from one of Prosody’s lua files

If you run a prosody server that allows for inline registration with the parameter allow_registration = true, you probably want to know when people are creating accounts. It is easy to do.

Near the bottom of /usr/lib/prosody/modules/mod_register_ibr.lua look for -- user created!

  session.send(st.reply(stanza)); -- user created!
  os.execute '/usr/local/bin/ "<MONOCLE> New user created on Prosody!" 1>/dev/null 2>&1 &';

Restart the prosody daemon for the change to be implemented.

Now you will know how often accounts are being created on your Prosody server!

Last modified December 6, 2020