/* * ms_motd - server message handler * * parv[0] - sender prefix * parv[1] - servername * * modified 30 mar 1995 by flux ([email protected]) * T line patch - display motd based on hostmask * modified again 7 sep 97 by Ghostwolf with code and ideas * stolen from comstud & Xorath. All motd files are read into * memory in read_motd() in s_conf.c * * Now using the motd_* family of functions defined in motd.c */ int ms_motd(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) { if (hunt_server_cmd(sptr, CMD_MOTD, cptr, 0, "%C", 1, parc, parv) != HUNTED_ISME) return 0; return motd_send(sptr); }
/* * m_motd - generic message handler * * parv[0] - sender prefix * parv[1] - servername * * modified 30 mar 1995 by flux ([email protected]) * T line patch - display motd based on hostmask * modified again 7 sep 97 by Ghostwolf with code and ideas * stolen from comstud & Xorath. All motd files are read into * memory in read_motd() in s_conf.c * * Now using the motd_* family of functions defined in motd.c */ int m_motd(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) { if (hunt_server_cmd(sptr, CMD_MOTD, cptr, feature_int(FEAT_HIS_REMOTE), "%C", 1, parc, parv) != HUNTED_ISME) return 0; return motd_send(sptr); }
/*! \brief Sends the "message of the day" and notifies irc-operators * about the MOTD request * * \param source_p Pointer to client to report to */ static void do_motd(struct Client *source_p) { sendto_realops_flags(UMODE_SPY, L_ALL, SEND_NOTICE, "MOTD requested by %s (%s@%s) [%s]", source_p->name, source_p->username, source_p->host, source_p->servptr->name); motd_send(source_p); }