* 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_server.c 3291 2007-03-28 14:30:10Z jilles $
*/
#include "stdinc.h"
#include "parse.h"
#include "modules.h"
-static int mr_server(struct Client *, struct Client *, int, const char **);
-static int ms_server(struct Client *, struct Client *, int, const char **);
-static int ms_sid(struct Client *, struct Client *, int, const char **);
+static int mr_server(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
+static int ms_server(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
+static int ms_sid(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
struct Message server_msgtab = {
- "SERVER", 0, 0, 0, MFLG_SLOW | MFLG_UNREG,
+ "SERVER", 0, 0, 0, 0,
{{mr_server, 4}, mg_reg, mg_ignore, {ms_server, 4}, mg_ignore, mg_reg}
};
struct Message sid_msgtab = {
- "SID", 0, 0, 0, MFLG_SLOW,
+ "SID", 0, 0, 0, 0,
{mg_ignore, mg_reg, mg_ignore, {ms_sid, 5}, mg_ignore, mg_reg}
};
mapi_clist_av1 server_clist[] = { &server_msgtab, &sid_msgtab, NULL };
-DECLARE_MODULE_AV1(server, NULL, NULL, server_clist, NULL, NULL, "$Revision: 3291 $");
+static const char server_desc[] = "Provides the SERVER and SID commands for TS6 use";
+
+DECLARE_MODULE_AV2(server, NULL, NULL, server_clist, NULL, NULL, NULL, NULL, server_desc);
int bogus_host(const char *host);
static int set_server_gecos(struct Client *, const char *);
* parv[3] = serverinfo
*/
static int
-mr_server(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
+mr_server(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
char info[REALLEN + 1];
const char *name;
* parv[3] = serverinfo
*/
static int
-ms_server(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
+ms_server(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
char info[REALLEN + 1];
/* same size as in s_misc.c */
ilog(L_SERVER, "Link %s cancelled, server %s already exists",
client_p->name, name);
- rb_snprintf(squitreason, sizeof squitreason,
+ snprintf(squitreason, sizeof squitreason,
"Server %s already exists",
name);
exit_client(client_p, client_p, &me, squitreason);
ilog(L_SERVER, "Non-Hub link %s introduced %s.",
client_p->name, name);
- rb_snprintf(squitreason, sizeof squitreason,
+ snprintf(squitreason, sizeof squitreason,
"No matching hub_mask for %s",
name);
exit_client(NULL, client_p, &me, squitreason);
ilog(L_SERVER, "Link %s introduced leafed server %s.",
client_p->name, name);
- rb_snprintf(squitreason, sizeof squitreason,
+ snprintf(squitreason, sizeof squitreason,
"Matching leaf_mask for %s",
name);
exit_client(NULL, client_p, &me, squitreason);
}
static int
-ms_sid(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
+ms_sid(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
struct Client *target_p;
struct remote_conf *hub_p;
ilog(L_SERVER, "Link %s cancelled, server %s already exists",
client_p->name, parv[1]);
- rb_snprintf(squitreason, sizeof squitreason,
+ snprintf(squitreason, sizeof squitreason,
"Server %s already exists",
parv[1]);
exit_client(NULL, client_p, &me, squitreason);
ilog(L_SERVER, "Link %s cancelled, SID %s for server %s already in use by %s",
client_p->name, parv[3], parv[1], target_p->name);
- rb_snprintf(squitreason, sizeof squitreason,
+ snprintf(squitreason, sizeof squitreason,
"SID %s for %s already in use by %s",
parv[3], parv[1], target_p->name);
exit_client(NULL, client_p, &me, squitreason);
ilog(L_SERVER, "Non-Hub link %s introduced %s.",
client_p->name, parv[1]);
- rb_snprintf(squitreason, sizeof squitreason,
+ snprintf(squitreason, sizeof squitreason,
"No matching hub_mask for %s",
parv[1]);
exit_client(NULL, client_p, &me, squitreason);
ilog(L_SERVER, "Link %s introduced leafed server %s.",
client_p->name, parv[1]);
- rb_snprintf(squitreason, sizeof squitreason,
+ snprintf(squitreason, sizeof squitreason,
"Matching leaf_mask for %s",
parv[1]);
exit_client(NULL, client_p, &me, squitreason);