This session manager module implements the message of the day and the online user announcement functionality (undocumented). More...
#include "jsm.h"Data Structures | |
| struct | motd_struct |
| structure that holds the active message of the day More... | |
Typedefs | |
| typedef struct motd_struct * | motd |
| structure that holds the active message of the day | |
| typedef struct motd_struct | _motd |
Functions | |
| void | mod_announce (jsmi si) |
This session manager module implements the message of the day and the online user announcement functionality (undocumented).
This module implements the 'message of the day' and the 'announcement to online users' functionality.
message of the day: users with write admin access can send a message to serverdomain/announce/motd which will set the motd. The message is then broadcasted to all online users and to users coming online if the message is not older then their last session (do not deliver a message twice). By sending a message to serverdomain/announce/motd/update the motd is replaced but users that already got the old message won't get the new one. By sending a message to serverdomain/announce/delete a user with write admin access can delete the motd.
announcement to online users: users with write admin access can send a message to serverdomain/announce/online which will be broadcasted to all online users.
| typedef struct motd_struct _motd |
| typedef struct motd_struct * motd |
structure that holds the active message of the day
There is one instance of motd_struct per mod_announce instance. It is used to hold the active message of the day in the x element. If this is a NULL pointer there is no active motd.
In the set element the time when the motd has been set is kept. This is used to determine if a user that comes online has to receive the motd or if he already got it.
| void mod_announce | ( | jsmi | si | ) |
startup the mod_announce module
will register two callbacks: one for receiving configuration messages and one to be notified about new user sessions
| si | the session manager instance |
References e_SERVER, e_SESSION, js_mapi_register(), jsmi_struct::p, and pmalloco().
1.6.1