lists.barton.de
Anmelden
Registrieren
Anmelden
Registrieren
Diese Liste verwalten
×
Tastenkürzel
Thread-Ansicht
j
: Nächste ungelesene Nachricht
k
: Vorherige ungelesene Nachricht
j a
: Zu allen Threads wechseln
j l
: Zur Listenübersicht springen
2024
Dezember
November
Oktober
September
August
Juli
Juni
Mai
April
März
Februar
Januar
2023
Dezember
November
Oktober
September
August
Juli
Juni
Mai
April
März
Februar
Januar
2022
Dezember
November
Oktober
September
August
Juli
Juni
Mai
April
März
Februar
Januar
2021
Dezember
November
Oktober
September
August
Juli
Juni
Mai
April
März
Februar
Januar
2020
Dezember
November
Oktober
September
August
Juli
Juni
Mai
April
März
Februar
Januar
2019
Dezember
November
Oktober
September
August
Juli
Juni
Mai
April
März
Februar
Januar
2018
Dezember
November
Oktober
September
August
Juli
Juni
Mai
April
März
Februar
Januar
2017
Dezember
November
Oktober
September
August
Juli
Juni
Mai
April
März
Februar
Januar
2016
Dezember
November
Oktober
September
August
Juli
Juni
Mai
April
März
Februar
Januar
2015
Dezember
November
Oktober
September
August
Juli
Juni
Mai
April
März
Februar
Januar
2014
Dezember
November
Oktober
September
August
Juli
Juni
Mai
April
März
Februar
Januar
2013
Dezember
November
Oktober
September
August
Juli
Juni
Mai
April
März
Februar
Januar
2012
Dezember
November
Oktober
September
August
Juli
Juni
Mai
April
März
Februar
Januar
2011
Dezember
November
Oktober
September
August
Juli
Juni
Mai
April
März
Februar
Januar
2010
Dezember
November
Oktober
September
August
Juli
Juni
Mai
April
März
Februar
Januar
2009
Dezember
November
Oktober
September
August
Juli
Juni
Mai
April
März
Februar
Januar
2008
Dezember
November
Oktober
September
August
Juli
Juni
Mai
April
März
Februar
Januar
2007
Dezember
November
Oktober
September
August
Juli
Juni
Mai
April
März
Februar
Januar
2006
Dezember
November
Oktober
September
August
Juli
Juni
Mai
April
März
Februar
Januar
2005
Dezember
November
Oktober
September
August
Juli
Juni
Mai
April
März
Listenübersicht
Herunterladen
ngIRCd GIT Updates
November 2012
----- 2024 -----
Dezember 2024
November 2024
Oktober 2024
September 2024
August 2024
Juli 2024
Juni 2024
Mai 2024
April 2024
März 2024
Februar 2024
Januar 2024
----- 2023 -----
Dezember 2023
November 2023
Oktober 2023
September 2023
August 2023
Juli 2023
Juni 2023
Mai 2023
April 2023
März 2023
Februar 2023
Januar 2023
----- 2022 -----
Dezember 2022
November 2022
Oktober 2022
September 2022
August 2022
Juli 2022
Juni 2022
Mai 2022
April 2022
März 2022
Februar 2022
Januar 2022
----- 2021 -----
Dezember 2021
November 2021
Oktober 2021
September 2021
August 2021
Juli 2021
Juni 2021
Mai 2021
April 2021
März 2021
Februar 2021
Januar 2021
----- 2020 -----
Dezember 2020
November 2020
Oktober 2020
September 2020
August 2020
Juli 2020
Juni 2020
Mai 2020
April 2020
März 2020
Februar 2020
Januar 2020
----- 2019 -----
Dezember 2019
November 2019
Oktober 2019
September 2019
August 2019
Juli 2019
Juni 2019
Mai 2019
April 2019
März 2019
Februar 2019
Januar 2019
----- 2018 -----
Dezember 2018
November 2018
Oktober 2018
September 2018
August 2018
Juli 2018
Juni 2018
Mai 2018
April 2018
März 2018
Februar 2018
Januar 2018
----- 2017 -----
Dezember 2017
November 2017
Oktober 2017
September 2017
August 2017
Juli 2017
Juni 2017
Mai 2017
April 2017
März 2017
Februar 2017
Januar 2017
----- 2016 -----
Dezember 2016
November 2016
Oktober 2016
September 2016
August 2016
Juli 2016
Juni 2016
Mai 2016
April 2016
März 2016
Februar 2016
Januar 2016
----- 2015 -----
Dezember 2015
November 2015
Oktober 2015
September 2015
August 2015
Juli 2015
Juni 2015
Mai 2015
April 2015
März 2015
Februar 2015
Januar 2015
----- 2014 -----
Dezember 2014
November 2014
Oktober 2014
September 2014
August 2014
Juli 2014
Juni 2014
Mai 2014
April 2014
März 2014
Februar 2014
Januar 2014
----- 2013 -----
Dezember 2013
November 2013
Oktober 2013
September 2013
August 2013
Juli 2013
Juni 2013
Mai 2013
April 2013
März 2013
Februar 2013
Januar 2013
----- 2012 -----
Dezember 2012
November 2012
Oktober 2012
September 2012
August 2012
Juli 2012
Juni 2012
Mai 2012
April 2012
März 2012
Februar 2012
Januar 2012
----- 2011 -----
Dezember 2011
November 2011
Oktober 2011
September 2011
August 2011
Juli 2011
Juni 2011
Mai 2011
April 2011
März 2011
Februar 2011
Januar 2011
----- 2010 -----
Dezember 2010
November 2010
Oktober 2010
September 2010
August 2010
Juli 2010
Juni 2010
Mai 2010
April 2010
März 2010
Februar 2010
Januar 2010
----- 2009 -----
Dezember 2009
November 2009
Oktober 2009
September 2009
August 2009
Juli 2009
Juni 2009
Mai 2009
April 2009
März 2009
Februar 2009
Januar 2009
----- 2008 -----
Dezember 2008
November 2008
Oktober 2008
September 2008
August 2008
Juli 2008
Juni 2008
Mai 2008
April 2008
März 2008
Februar 2008
Januar 2008
----- 2007 -----
Dezember 2007
November 2007
Oktober 2007
September 2007
August 2007
Juli 2007
Juni 2007
Mai 2007
April 2007
März 2007
Februar 2007
Januar 2007
----- 2006 -----
Dezember 2006
November 2006
Oktober 2006
September 2006
August 2006
Juli 2006
Juni 2006
Mai 2006
April 2006
März 2006
Februar 2006
Januar 2006
----- 2005 -----
Dezember 2005
November 2005
Oktober 2005
September 2005
August 2005
Juli 2005
Juni 2005
Mai 2005
April 2005
März 2005
ngircd-commits@lists.barton.de
1 Teilnehmer
34 Diskussionen
Einen n
N
euen Thread beginnen
Alexander Barton : Implement SVSNICK command to change remote nicknames
by alex@arthur.barton.de
02 Nov '12
02 Nov '12
Module: ngircd.git Branch: master Commit: e3f300d3231f56efe2831fb79f7b484d96d051f5 URL:
http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=e3f300d3…
Author: Alexander Barton <alex(a)barton.de> Date: Fri Nov 2 17:50:31 2012 +0100 Implement SVSNICK command to change remote nicknames The SVSNICK command allows other servers (and services on "pseudo-servers") to forcefully change nicknames of remote users. Syntax: ":<from> SVSNICK <oldnick> <newnick>" The SVSNICK command itself doesn't change the nickname, but it becomes forwarded to the server to which the user is connected to. And then this server initiates the real nickname changing using regular NICK commands. This allows to still run networks with old servers not supporting the SVSNICK command, because SVSNICK commands for nicknames on such servers are silently ignored and don't cause a desync of the network. --- src/ngircd/irc-login.c | 72 ++++++++++++++++++++++++++++++++++++++++-------- src/ngircd/irc-login.h | 3 +- src/ngircd/parse.c | 1 + 3 files changed, 64 insertions(+), 12 deletions(-) diff --git a/src/ngircd/irc-login.c b/src/ngircd/irc-login.c index c3f32b7..977fc54 100644 --- a/src/ngircd/irc-login.c +++ b/src/ngircd/irc-login.c @@ -1,6 +1,6 @@ /* * ngIRCd -- The Next Generation IRC Daemon - * Copyright (c)2001-2011 Alexander Barton (alex(a)barton.de) and Contributors. + * Copyright (c)2001-2012 Alexander Barton (alex(a)barton.de) and Contributors. * * 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 @@ -39,8 +39,8 @@ #include "irc-login.h" static void Kill_Nick PARAMS((char *Nick, char *Reason)); -static void Change_Nick PARAMS((CLIENT * Origin, CLIENT * Target, - char *NewNick, bool RegisterWhowas)); +static void Change_Nick PARAMS((CLIENT * Origin, CLIENT * Target, char *NewNick, + bool InformClient)); /** @@ -278,7 +278,8 @@ IRC_NICK( CLIENT *Client, REQUEST *Req ) Client_SetType( Client, CLIENT_GOTNICK ); } else { /* Nickname change */ - Change_Nick(Client, target, Req->argv[0], true); + Change_Nick(Client, target, Req->argv[0], + Client_Type(Client) == CLIENT_USER ? true : false); IRC_SetPenalty(target, 2); } @@ -360,6 +361,54 @@ IRC_NICK( CLIENT *Client, REQUEST *Req ) /** + * Handler for the IRC "SVSNICK" command. + * + * @param Client The client from which this command has been received. + * @param Req Request structure with prefix and all parameters. + * @return CONNECTED or DISCONNECTED. + */ +GLOBAL bool +IRC_SVSNICK(CLIENT *Client, REQUEST *Req) +{ + CLIENT *from, *target; + + assert(Client != NULL); + assert(Req != NULL); + + if (Req->argc != 2) + return IRC_WriteStrClient(Client, ERR_NEEDMOREPARAMS_MSG, + Client_ID(Client), Req->command); + + /* Search the originator */ + from = Client_Search(Req->prefix); + if (!from) + from = Client; + + /* Search the target */ + target = Client_Search(Req->argv[0]); + if (!target || Client_Type(target) != CLIENT_USER) { + return IRC_WriteStrClient(Client, ERR_NOSUCHNICK_MSG, + Client_ID(Client), Req->argv[0]); + } + + if (Client_Conn(target) <= NONE) { + /* We have to forward the message to the server handling + * this user; this is required to make sure all servers + * in the network do follow the nick name change! */ + return IRC_WriteStrClientPrefix(Client_NextHop(target), from, + "SVSNICK %s %s", + Req->argv[0], Req->argv[1]); + } + + /* Make sure that the new nickname is valid */ + if (!Client_CheckNick(from, Req->argv[1])) + return CONNECTED; + + Change_Nick(from, target, Req->argv[1], true); + return CONNECTED; +} + +/** * Handler for the IRC "USER" command. * * See RFC 2812, 3.1.3 "User message". @@ -904,7 +953,7 @@ Kill_Nick(char *Nick, char *Reason) * @param NewNick The new nickname. */ static void -Change_Nick(CLIENT *Origin, CLIENT *Target, char *NewNick, bool RegisterWhowas) +Change_Nick(CLIENT *Origin, CLIENT *Target, char *NewNick, bool InformClient) { if (Client_Conn(Target) > NONE) { /* Local client */ @@ -921,14 +970,15 @@ Change_Nick(CLIENT *Origin, CLIENT *Target, char *NewNick, bool RegisterWhowas) } /* Inform all servers and users (which have to know) of the new name */ - if (Client_Type(Origin) == CLIENT_USER) - IRC_WriteStrClientPrefix(Origin, Origin, "NICK :%s", NewNick); - IRC_WriteStrServersPrefix(Origin, Target, "NICK :%s", NewNick); + if (InformClient) { + IRC_WriteStrClientPrefix(Target, Origin, "NICK :%s", NewNick); + IRC_WriteStrServersPrefix(NULL, Target, "NICK :%s", NewNick); + } else + IRC_WriteStrServersPrefix(Origin, Target, "NICK :%s", NewNick); IRC_WriteStrRelatedPrefix(Target, Target, false, "NICK :%s", NewNick); - /* Register old nickname for WHOWAS queries, if required */ - if (RegisterWhowas) - Client_RegisterWhowas(Target); + /* Register old nickname for WHOWAS queries */ + Client_RegisterWhowas(Target); /* Save new nickname */ Client_SetID(Target, NewNick); diff --git a/src/ngircd/irc-login.h b/src/ngircd/irc-login.h index f3138f6..15be7b4 100644 --- a/src/ngircd/irc-login.h +++ b/src/ngircd/irc-login.h @@ -1,6 +1,6 @@ /* * ngIRCd -- The Next Generation IRC Daemon - * Copyright (c)2001-2010 Alexander Barton (alex(a)barton.de) + * Copyright (c)2001-2012 Alexander Barton (alex(a)barton.de) and Contributors. * * 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 @@ -26,6 +26,7 @@ GLOBAL bool IRC_PING PARAMS((CLIENT *Client, REQUEST *Req)); GLOBAL bool IRC_PONG PARAMS((CLIENT *Client, REQUEST *Req)); GLOBAL bool IRC_QUIT PARAMS((CLIENT *Client, REQUEST *Req)); GLOBAL bool IRC_QUIT_HTTP PARAMS((CLIENT *Client, REQUEST *Req)); +GLOBAL bool IRC_SVSNICK PARAMS(( CLIENT *Client, REQUEST *Req )); #endif diff --git a/src/ngircd/parse.c b/src/ngircd/parse.c index f3b04d0..446180b 100644 --- a/src/ngircd/parse.c +++ b/src/ngircd/parse.c @@ -99,6 +99,7 @@ static COMMAND My_Commands[] = { "SQUERY", IRC_SQUERY, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 }, { "SQUIT", IRC_SQUIT, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 }, { "STATS", IRC_STATS, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 }, + { "SVSNICK", IRC_SVSNICK, CLIENT_SERVER, 0, 0, 0 }, { "SUMMON", IRC_SUMMON, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 }, { "TIME", IRC_TIME, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 }, { "TOPIC", IRC_TOPIC, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 },
1
0
0
0
Alexander Barton : IRC_NICK(): Code cleanup, new function Change_Nick()
by alex@arthur.barton.de
02 Nov '12
02 Nov '12
Module: ngircd.git Branch: master Commit: 497edbaf3eb51e6c67975713ee5c52d2d1b48105 URL:
http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=497edbaf…
Author: Alexander Barton <alex(a)barton.de> Date: Fri Nov 2 14:36:29 2012 +0100 IRC_NICK(): Code cleanup, new function Change_Nick() --- src/ngircd/irc-login.c | 80 +++++++++++++++++++++++++++--------------------- 1 file changed, 45 insertions(+), 35 deletions(-) diff --git a/src/ngircd/irc-login.c b/src/ngircd/irc-login.c index 7d6e07d..c3f32b7 100644 --- a/src/ngircd/irc-login.c +++ b/src/ngircd/irc-login.c @@ -38,7 +38,10 @@ #include "exp.h" #include "irc-login.h" -static void Kill_Nick PARAMS(( char *Nick, char *Reason )); +static void Kill_Nick PARAMS((char *Nick, char *Reason)); +static void Change_Nick PARAMS((CLIENT * Origin, CLIENT * Target, + char *NewNick, bool RegisterWhowas)); + /** * Handler for the IRC "PASS" command. @@ -275,40 +278,8 @@ IRC_NICK( CLIENT *Client, REQUEST *Req ) Client_SetType( Client, CLIENT_GOTNICK ); } else { /* Nickname change */ - if (Client_Conn(target) > NONE) { - /* Local client */ - Log(LOG_INFO, - "%s \"%s\" changed nick (connection %d): \"%s\" -> \"%s\".", - Client_TypeText(target), Client_Mask(target), - Client_Conn(target), Client_ID(target), - Req->argv[0]); - Conn_UpdateIdle(Client_Conn(target)); - } else { - /* Remote client */ - LogDebug("%s \"%s\" changed nick: \"%s\" -> \"%s\".", - Client_TypeText(target), - Client_Mask(target), Client_ID(target), - Req->argv[0]); - } - - /* Inform all users and servers (which have to know) - * of this nickname change */ - if( Client_Type( Client ) == CLIENT_USER ) - IRC_WriteStrClientPrefix( Client, Client, - "NICK :%s", - Req->argv[0] ); - IRC_WriteStrServersPrefix( Client, target, - "NICK :%s", Req->argv[0] ); - IRC_WriteStrRelatedPrefix( target, target, false, - "NICK :%s", Req->argv[0] ); - - /* Register old nickname for WHOWAS queries */ - Client_RegisterWhowas( target ); - - /* Save new nickname */ - Client_SetID( target, Req->argv[0] ); - - IRC_SetPenalty( target, 2 ); + Change_Nick(Client, target, Req->argv[0], true); + IRC_SetPenalty(target, 2); } return CONNECTED; @@ -925,4 +896,43 @@ Kill_Nick(char *Nick, char *Reason) } /* Kill_Nick */ +/** + * Change the nickname of a client. + * + * @param Origin The client which caused the nickname change. + * @param Target The client of which the nickname should be changed. + * @param NewNick The new nickname. + */ +static void +Change_Nick(CLIENT *Origin, CLIENT *Target, char *NewNick, bool RegisterWhowas) +{ + if (Client_Conn(Target) > NONE) { + /* Local client */ + Log(LOG_INFO, + "%s \"%s\" changed nick (connection %d): \"%s\" -> \"%s\".", + Client_TypeText(Target), Client_Mask(Target), + Client_Conn(Target), Client_ID(Target), NewNick); + Conn_UpdateIdle(Client_Conn(Target)); + } else { + /* Remote client */ + LogDebug("%s \"%s\" changed nick: \"%s\" -> \"%s\".", + Client_TypeText(Target), + Client_Mask(Target), Client_ID(Target), NewNick); + } + + /* Inform all servers and users (which have to know) of the new name */ + if (Client_Type(Origin) == CLIENT_USER) + IRC_WriteStrClientPrefix(Origin, Origin, "NICK :%s", NewNick); + IRC_WriteStrServersPrefix(Origin, Target, "NICK :%s", NewNick); + IRC_WriteStrRelatedPrefix(Target, Target, false, "NICK :%s", NewNick); + + /* Register old nickname for WHOWAS queries, if required */ + if (RegisterWhowas) + Client_RegisterWhowas(Target); + + /* Save new nickname */ + Client_SetID(Target, NewNick); +} + + /* -eof- */
1
0
0
0
Alexander Barton : Spelling fix: "nick name" -> "nickname"
by alex@arthur.barton.de
02 Nov '12
02 Nov '12
Module: ngircd.git Branch: master Commit: 48326e061aacd954e24f76c53ded10448cbc28eb URL:
http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=48326e06…
Author: Alexander Barton <alex(a)barton.de> Date: Fri Nov 2 14:30:19 2012 +0100 Spelling fix: "nick name" -> "nickname" --- ChangeLog | 12 ++++++------ NEWS | 10 +++++----- doc/Protocol.txt | 2 +- doc/sample-ngircd.conf.tmpl | 10 +++++----- man/ngircd.conf.5.tmpl | 12 ++++++------ src/ngircd/client.c | 4 ++-- src/ngircd/client.h | 2 +- src/ngircd/conf.c | 14 +++++++------- src/ngircd/conf.h | 6 +++--- src/ngircd/defines.h | 2 +- src/ngircd/irc-info.c | 4 ++-- src/ngircd/irc-login.c | 8 ++++---- src/ngircd/lists.c | 2 +- src/ngircd/numeric.c | 8 ++++---- src/ngircd/sighandlers.c | 4 ++-- 15 files changed, 50 insertions(+), 50 deletions(-) Diff:
http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commitdiff;h=4832…
1
0
0
0
Alexander Barton : Xcode: correctly #define PACKAGE and PACKAGE_NAME
by alex@arthur.barton.de
02 Nov '12
02 Nov '12
Module: ngircd.git Branch: master Commit: 84e9dcbab080b03b2057df8b22327172895833be URL:
http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=84e9dcba…
Author: Alexander Barton <alex(a)barton.de> Date: Fri Nov 2 14:16:58 2012 +0100 Xcode: correctly #define PACKAGE and PACKAGE_NAME --- contrib/MacOSX/config.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/MacOSX/config.h b/contrib/MacOSX/config.h index bf94d32..6da7496 100644 --- a/contrib/MacOSX/config.h +++ b/contrib/MacOSX/config.h @@ -11,7 +11,8 @@ * Static configuration file for Mac OS X Xcode project */ -#define PACKAGE_NAME "ngircd" +#define PACKAGE_NAME "ngIRCd" +#define PACKAGE "ngircd" #ifndef VERSION #define VERSION "??("__DATE__")" #endif
1
0
0
0
← Neuer
1
2
3
4
Älter →
Springe zur Seite:
1
2
3
4
Ergebnisse pro Seite:
10
25
50
100
200