#include "hash.h"
#include "s_conf.h"
-static int mr_pass(struct Client *, struct Client *, int, const char **);
+static int mr_pass(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
struct Message pass_msgtab = {
- "PASS", 0, 0, 0, MFLG_SLOW | MFLG_UNREG,
+ "PASS", 0, 0, 0, 0,
{{mr_pass, 2}, mg_reg, mg_ignore, mg_ignore, mg_ignore, mg_reg}
};
* parv[3] = optional TS version field -- needed for TS6
*/
static int
-mr_pass(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
+mr_pass(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
char *auth_user, *pass, *buf;
buf = LOCAL_COPY(parv[1]);
- if(client_p->localClient->passwd)
- {
- memset(client_p->localClient->passwd, 0,
- strlen(client_p->localClient->passwd));
- rb_free(client_p->localClient->passwd);
- client_p->localClient->passwd = NULL;
- }
-
- if (client_p->localClient->auth_user)
- {
- memset(client_p->localClient->auth_user, 0,
- strlen(client_p->localClient->auth_user));
- rb_free(client_p->localClient->auth_user);
- client_p->localClient->auth_user = NULL;
- }
+ if(client_p->localClient->passwd || client_p->localClient->auth_user)
+ return 0;
if ((pass = strchr(buf, ':')) != NULL)
{