Beispiel #1
0
/*
** 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;
}
Beispiel #2
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;
}
Beispiel #3
0
/*
** 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;
}