0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 18:22:50 +01:00

ircd:Ⓜ️ Set IRCd's presence status on startup and shutdown.

This commit is contained in:
Jason Volk 2018-03-02 07:45:32 -08:00
parent 1e2dcc41ef
commit f3d8cc7950

View file

@ -253,6 +253,13 @@ void
ircd::m::join_ircd_room()
try
{
static conf::item<std::string> online_status_msg
{
{ "name", "m.ircd.online.status_msg" },
{ "default", "Wanna chat? IRCd at your service!" }
};
me.presence("online", online_status_msg);
join(my_room, me.user_id);
}
catch(const m::ALREADY_MEMBER &e)
@ -263,7 +270,14 @@ catch(const m::ALREADY_MEMBER &e)
void
ircd::m::leave_ircd_room()
{
static conf::item<std::string> offline_status_msg
{
{ "name", "m.ircd.offline.status_msg" },
{ "default", "Catch ya on the flip side..." }
};
leave(my_room, me.user_id);
me.presence("offline", offline_status_msg);
}
///////////////////////////////////////////////////////////////////////////////