* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
- *
- * $Id: m_squit.c 3161 2007-01-25 07:23:01Z nenolod $
*/
#include "stdinc.h"
#include "client.h"
-#include "common.h" /* FALSE bleah */
+#include "common.h"
#include "match.h"
#include "ircd.h"
#include "numeric.h"
#include "hash.h"
#include "s_newconf.h"
-static int ms_squit(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
-static int mo_squit(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
+static const char squit_desc[] = "Provides the SQUIT command to cause a server to quit";
+
+static void ms_squit(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
+static void mo_squit(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
struct Message squit_msgtab = {
"SQUIT", 0, 0, 0, 0,
mapi_clist_av1 squit_clist[] = { &squit_msgtab, NULL };
-DECLARE_MODULE_AV1(squit, NULL, NULL, squit_clist, NULL, NULL, "$Revision: 3161 $");
+DECLARE_MODULE_AV2(squit, NULL, NULL, squit_clist, NULL, NULL, NULL, NULL, squit_desc);
struct squit_parms
{
* parv[1] = server name
* parv[2] = comment
*/
-static int
+static void
mo_squit(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
struct squit_parms *found_squit;
{
sendto_one(source_p, form_str(ERR_NOPRIVS),
me.name, source_p->name, "remote");
- return 0;
+ return;
}
exit_client(client_p, found_squit->target_p, source_p, comment);
- return 0;
+ return;
}
else
{
sendto_one_numeric(source_p, ERR_NOSUCHSERVER, form_str(ERR_NOSUCHSERVER), parv[1]);
}
-
- return 0;
}
/*
* parv[1] = server name
* parv[2] = comment
*/
-static int
+static void
ms_squit(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
struct Client *target_p;
else
{
if((target_p = find_server(NULL, parv[1])) == NULL)
- return 0;
+ return;
if(IsMe(target_p))
target_p = client_p;
if(!IsServer(target_p))
- return 0;
+ return;
}
/* Server is closing its link */
ilog(L_SERVER, "SQUIT From %s : %s (%s)", source_p->name, target_p->name, comment);
}
exit_client(client_p, target_p, source_p, comment);
- return 0;
}