/* ** m_motd ** parv[1] = servername */ static int m_motd(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]) { static time_t last_used = 0; if (parc < 2) { /* do nothing */ } else if ((last_used + ConfigFileEntry.pace_wait) > rb_current_time()) { /* safe enough to give this on a local connect only */ sendto_one(source_p, form_str(RPL_LOAD2HI), me.name, source_p->name, "MOTD"); sendto_one(source_p, form_str(RPL_ENDOFMOTD), me.name, source_p->name); return 0; } else { last_used = rb_current_time(); } if(hunt_server(client_p, source_p, ":%s MOTD :%s", 1, parc, parv) != HUNTED_ISME) return 0; motd_spy(source_p); send_user_motd(source_p); return 0; }
/* ** mo_motd ** parv[1] = servername */ static int mo_motd(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]) { if (hunt_server(client_p, source_p, ":%s MOTD :%s", 1, parc, parv) != HUNTED_ISME) return 0; motd_spy(source_p); send_user_motd(source_p); return 0; }
/* ** mo_motd ** parv[0] = sender prefix ** parv[1] = servername */ static void mo_motd(struct Client *client_p, struct Client *source_p, int parc, char *parv[]) { if (!IsClient(source_p)) return; if (hunt_server(client_p, source_p, ":%s MOTD :%s", 1,parc,parv)!=HUNTED_ISME) return; motd_spy(source_p); send_message_file(source_p,&ConfigFileEntry.motd); }
/* ** m_motd ** parv[0] = sender prefix ** parv[1] = servername */ static void m_motd(struct Client *client_p, struct Client *source_p, int parc, char *parv[]) { static time_t last_used = 0; if ((last_used + ConfigFileEntry.pace_wait) > CurrentTime) { /* safe enough to give this on a local connect only */ sendto_one(source_p,form_str(RPL_LOAD2HI),me.name,source_p->name); return; } else last_used = CurrentTime; if (hunt_server(client_p, source_p, ":%s MOTD :%s", 1,parc,parv)!=HUNTED_ISME) return; motd_spy(source_p); send_message_file(source_p,&ConfigFileEntry.motd); }
/* ** m_motd ** parv[0] = sender prefix ** parv[1] = servername */ static int m_motd(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]) { static time_t last_used = 0; if((last_used + ConfigFileEntry.pace_wait) > rb_current_time()) { /* safe enough to give this on a local connect only */ sendto_one_numeric(source_p, s_RPL(RPL_LOAD2HI), "MOTD"); sendto_one_numeric(source_p, s_RPL(RPL_ENDOFMOTD)); return 0; } else last_used = rb_current_time(); if(hunt_server(client_p, source_p, ":%s MOTD :%s", 1, parc, parv) != HUNTED_ISME) return 0; motd_spy(source_p); send_user_motd(source_p); return 0; }