summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
a5735f6)
This new connection option CONN_RFC1459 indicates that the peer on this
link only supports the IRC protocol as defined in RFC 1459 and that the
compatibility mode (e. g. for outgoing commands like NICK) should be used.
/*
* ngIRCd -- The Next Generation IRC Daemon
/*
* ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001,2002 by Alexander Barton (alex@barton.de)
+ * Copyright (c)2001-2008 by Alexander Barton (alex@barton.de)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* (at your option) any later version.
* Please read the file COPYING, README and AUTHORS for more information.
*
* (at your option) any later version.
* Please read the file COPYING, README and AUTHORS for more information.
*
- * $Id: conn.h,v 1.46 2008/02/26 22:04:17 fw Exp $
- *
* Connection management (header)
*/
* Connection management (header)
*/
#define CONN_ISCLOSING 1 /* Conn_Close() already called */
#define CONN_ISCONNECTING 2 /* connect() in progress */
#define CONN_ISCLOSING 1 /* Conn_Close() already called */
#define CONN_ISCONNECTING 2 /* connect() in progress */
+#define CONN_RFC1459 4 /* RFC 1459 compatibility mode */
-#define CONN_ZIP 4 /* zlib compressed link */
+#define CONN_ZIP 8 /* zlib compressed link */
#endif
#include "conf-ssl.h"
#endif
#include "conf-ssl.h"
IRC_NICK( CLIENT *Client, REQUEST *Req )
{
CLIENT *intr_c, *target, *c;
IRC_NICK( CLIENT *Client, REQUEST *Req )
{
CLIENT *intr_c, *target, *c;
char *nick, *user, *hostname, *modes, *info;
int token, hops;
char *nick, *user, *hostname, *modes, *info;
int token, hops;
Client_ID(Client), Req->command);
if (Req->argc >= 7) {
Client_ID(Client), Req->command);
if (Req->argc >= 7) {
+ /* RFC 2813 compatible syntax */
nick = Req->argv[0];
hops = atoi(Req->argv[1]);
user = Req->argv[2];
nick = Req->argv[0];
hops = atoi(Req->argv[1]);
user = Req->argv[2];
modes = Req->argv[5] + 1;
info = Req->argv[6];
} else {
modes = Req->argv[5] + 1;
info = Req->argv[6];
} else {
+ /* RFC 1459 compatible syntax */
nick = Req->argv[0];
hops = 1;
user = Req->argv[0];
nick = Req->argv[0];
hops = 1;
user = Req->argv[0];
token = atoi(Req->argv[1]);
modes = "";
info = Req->argv[0];
token = atoi(Req->argv[1]);
modes = "";
info = Req->argv[0];
+
+ conn = Client_Conn(Client);
+ if (conn != NONE &&
+ !(Conn_Options(conn) & CONN_RFC1459)) {
+ Log(LOG_INFO,
+ "Switching connection %d (\"%s\") to RFC 1459 compatibility mode.",
+ conn, Client_ID(Client));
+ Conn_SetOption(conn, CONN_RFC1459);
+ }
}
/* Nick ueberpruefen */
}
/* Nick ueberpruefen */