mirror of
https://github.com/osmarks/ngircd.git
synced 2024-12-12 09:50:29 +00:00
Introduce_Client(): send MODES in RFC 1459 mode, too.
This commit is contained in:
parent
d070ec08ab
commit
92603f7c80
@ -390,7 +390,7 @@ IRC_NICK( CLIENT *Client, REQUEST *Req )
|
|||||||
|
|
||||||
Introduce_Client(Client, Req->argv[0],
|
Introduce_Client(Client, Req->argv[0],
|
||||||
atoi(Req->argv[1]) + 1, Req->argv[2],
|
atoi(Req->argv[1]) + 1, Req->argv[2],
|
||||||
Req->argv[3], intr_c, Req->argv[5], Req->argv[6]);
|
Req->argv[3], intr_c, modes, Req->argv[6]);
|
||||||
} else {
|
} else {
|
||||||
LogDebug("User \"%s\" is beeing registered (RFC 1459) ...",
|
LogDebug("User \"%s\" is beeing registered (RFC 1459) ...",
|
||||||
Client_Mask(c));
|
Client_Mask(c));
|
||||||
@ -410,7 +410,6 @@ GLOBAL bool
|
|||||||
IRC_USER(CLIENT * Client, REQUEST * Req)
|
IRC_USER(CLIENT * Client, REQUEST * Req)
|
||||||
{
|
{
|
||||||
CLIENT *c;
|
CLIENT *c;
|
||||||
char modes[CLIENT_MODE_LEN + 1] = "+";
|
|
||||||
#ifdef IDENTAUTH
|
#ifdef IDENTAUTH
|
||||||
char *ptr;
|
char *ptr;
|
||||||
#endif
|
#endif
|
||||||
@ -479,13 +478,12 @@ IRC_USER(CLIENT * Client, REQUEST * Req)
|
|||||||
|
|
||||||
/* RFC 1459 style user registration? Inform other servers! */
|
/* RFC 1459 style user registration? Inform other servers! */
|
||||||
if (Client_Type(c) == CLIENT_GOTNICK) {
|
if (Client_Type(c) == CLIENT_GOTNICK) {
|
||||||
strlcat(modes, Client_Modes(c), sizeof(modes));
|
|
||||||
Introduce_Client(Client, Client_ID(c), Client_Hops(c),
|
Introduce_Client(Client, Client_ID(c), Client_Hops(c),
|
||||||
Client_User(c), Client_Hostname(c),
|
Client_User(c), Client_Hostname(c),
|
||||||
Client_Introducer(c), modes,
|
Client_Introducer(c), Client_Modes(c),
|
||||||
Client_Info(c));
|
Client_Info(c));
|
||||||
LogDebug("User \"%s\" (%s) registered (via %s, on %s, %d hop%s).",
|
LogDebug("User \"%s\" (+%s) registered (via %s, on %s, %d hop%s).",
|
||||||
Client_Mask(c), modes, Client_ID(Client),
|
Client_Mask(c), Client_Modes(c), Client_ID(Client),
|
||||||
Client_ID(Client_Introducer(c)), Client_Hops(c),
|
Client_ID(Client_Introducer(c)), Client_Hops(c),
|
||||||
Client_Hops(c) > 1 ? "s": "");
|
Client_Hops(c) > 1 ? "s": "");
|
||||||
Client_SetType(c, CLIENT_USER);
|
Client_SetType(c, CLIENT_USER);
|
||||||
@ -817,10 +815,13 @@ cb_introduceClient(CLIENT *Client, CLIENT *Prefix, void *data)
|
|||||||
Conn_WriteStr(conn, ":%s USER %s %s %s :%s",
|
Conn_WriteStr(conn, ":%s USER %s %s %s :%s",
|
||||||
i->nick, i->user, i->host,
|
i->nick, i->user, i->host,
|
||||||
Client_ID(i->server), i->name);
|
Client_ID(i->server), i->name);
|
||||||
|
if (i->mode[0])
|
||||||
|
Conn_WriteStr(conn, ":%s MODE %s +%s",
|
||||||
|
i->nick, i->nick, i->mode);
|
||||||
} else {
|
} else {
|
||||||
/* RFC 2813 mode: one combined NICK command */
|
/* RFC 2813 mode: one combined NICK command */
|
||||||
IRC_WriteStrClientPrefix(Client, Prefix,
|
IRC_WriteStrClientPrefix(Client, Prefix,
|
||||||
"NICK %s %d %s %s %d %s :%s",
|
"NICK %s %d %s %s %d +%s :%s",
|
||||||
i->nick, i->hopcount, i->user, i->host,
|
i->nick, i->hopcount, i->user, i->host,
|
||||||
Client_MyToken(i->server), i->mode,
|
Client_MyToken(i->server), i->mode,
|
||||||
i->name);
|
i->name);
|
||||||
|
Loading…
Reference in New Issue
Block a user