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
September 2009
----- 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
2 Teilnehmer
36 Diskussionen
Einen n
N
euen Thread beginnen
Alexander Barton : Make sure forwarded CONNECT commands are handled correctly
by alex@arthur.barton.de
30 Sep '09
30 Sep '09
Module: ngircd.git Branch: master Commit: 55c04e691d2e069eebf1f2cc7d9992d2510f681f URL:
http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=55c04e69…
Author: Alexander Barton <alex(a)barton.de> Date: Wed Sep 9 23:00:45 2009 +0200 Make sure forwarded CONNECT commands are handled correctly --- src/ngircd/irc-oper.c | 20 ++++++++++++-------- 1 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/ngircd/irc-oper.c b/src/ngircd/irc-oper.c index 68b5eb6..17b6044 100644 --- a/src/ngircd/irc-oper.c +++ b/src/ngircd/irc-oper.c @@ -184,7 +184,8 @@ IRC_CONNECT(CLIENT * Client, REQUEST * Req) assert(Client != NULL); assert(Req != NULL); - if (!Op_Check(Client, Req)) + if (Client_Type(Client) != CLIENT_SERVER + && !Client_HasMode(Client, 'o')) return Op_NoPrivileges(Client, Req); /* Bad number of parameters? */ @@ -203,7 +204,7 @@ IRC_CONNECT(CLIENT * Client, REQUEST * Req) if (Req->argc == 3 || Req->argc == 6) { /* This CONNECT has a target parameter */ - if (Client_Type(Client) == CLIENT_SERVER) + if (Client_Type(Client) == CLIENT_SERVER && Req->prefix) from = Client_Search(Req->prefix); if (! from) return IRC_WriteStrClient(Client, ERR_NOSUCHNICK_MSG, @@ -230,12 +231,8 @@ IRC_CONNECT(CLIENT * Client, REQUEST * Req) return CONNECTED; } - Log(LOG_NOTICE | LOG_snotice, - "Got CONNECT command from \"%s\" for \"%s\".", Client_Mask(from), - Req->argv[0]); - IRC_SendWallops(Client_ThisServer(), Client_ThisServer(), - "Received CONNECT %s from %s", - Req->argv[0], Client_ID(from)); + if (!Op_Check(from, Req)) + return Op_NoPrivileges(Client, Req); switch (Req->argc) { case 1: @@ -263,6 +260,13 @@ IRC_CONNECT(CLIENT * Client, REQUEST * Req) Req->argv[0]); } + Log(LOG_NOTICE | LOG_snotice, + "Got CONNECT command from \"%s\" for \"%s\".", Client_Mask(from), + Req->argv[0]); + IRC_SendWallops(Client_ThisServer(), Client_ThisServer(), + "Received CONNECT %s from %s", + Req->argv[0], Client_ID(from)); + return CONNECTED; } /* IRC_CONNECT */
1
0
0
0
Alexander Barton : Generate WALLOPS message on operator-generated SQUIT
by alex@arthur.barton.de
30 Sep '09
30 Sep '09
Module: ngircd.git Branch: master Commit: 881b9af2512a9707cdd599f84628a03c4e22cf2b URL:
http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=881b9af2…
Author: Alexander Barton <alex(a)barton.de> Date: Tue May 19 23:06:28 2009 +0200 Generate WALLOPS message on operator-generated SQUIT --- src/ngircd/irc-server.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/ngircd/irc-server.c b/src/ngircd/irc-server.c index ca2502d..a0a9468 100644 --- a/src/ngircd/irc-server.c +++ b/src/ngircd/irc-server.c @@ -332,6 +332,10 @@ IRC_SQUIT(CLIENT * Client, REQUEST * Req) /* We are directly connected to the target server, so we * have to tear down the connection and to inform all the * other remaining servers in the network */ + IRC_SendWallops(Client_ThisServer(), Client_ThisServer(), + "Received SQUIT %s from %s: %s", + Req->argv[0], Client_ID(from), + Req->argv[1][0] ? Req->argv[1] : "-"); Conn_Close(con, NULL, msg, true); if (con == Client_Conn(Client)) return DISCONNECTED;
1
0
0
0
Alexander Barton : Enable SQUIT command for IRC Operators
by alex@arthur.barton.de
30 Sep '09
30 Sep '09
Module: ngircd.git Branch: master Commit: 294320ed62bdb7dac546cea43fac3b4c916788a4 URL:
http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=294320ed…
Author: Alexander Barton <alex(a)barton.de> Date: Tue May 19 22:41:45 2009 +0200 Enable SQUIT command for IRC Operators This patch enables IRC Operators to use the SQUIT command as specified in RFC 2812, section 3.1.8 "Squit". When forwarding SQUIT commands, the server connected to the target will drop the connection (not the target server itself!). Please note: - the configuration option "AllowRemoteOper" mus be enabled on the server disconnecting the target to allow forwarding of SQUIT commands. - if the remote server is configured to establish the connection, it will just do this; so the disconnect is not permanent in this case! --- src/ngircd/irc-server.c | 81 ++++++++++++++++++++++++++++++++++------------ src/ngircd/parse.c | 2 +- 2 files changed, 61 insertions(+), 22 deletions(-) diff --git a/src/ngircd/irc-server.c b/src/ngircd/irc-server.c index b75a34f..ca2502d 100644 --- a/src/ngircd/irc-server.c +++ b/src/ngircd/irc-server.c @@ -37,6 +37,7 @@ #include "numeric.h" #include "ngircd.h" #include "irc-info.h" +#include "op.h" #include "exp.h" #include "irc-server.h" @@ -273,21 +274,40 @@ IRC_NJOIN( CLIENT *Client, REQUEST *Req ) GLOBAL bool IRC_SQUIT(CLIENT * Client, REQUEST * Req) { - CLIENT *target; - char msg[LINE_LEN + 64]; + char msg[COMMAND_LEN], logmsg[COMMAND_LEN]; + CLIENT *from, *target; + CONN_ID con; assert(Client != NULL); assert(Req != NULL); + if (Client_Type(Client) != CLIENT_SERVER + && !Client_HasMode(Client, 'o')) + return Op_NoPrivileges(Client, Req); + /* Bad number of arguments? */ if (Req->argc != 2) return IRC_WriteStrClient(Client, ERR_NEEDMOREPARAMS_MSG, Client_ID(Client), Req->command); + if (Client_Type(Client) == CLIENT_SERVER && Req->prefix) { + from = Client_Search(Req->prefix); + if (Client_Type(from) != CLIENT_SERVER + && !Op_Check(Client, Req)) + return Op_NoPrivileges(Client, Req); + } else + from = Client; + if (!from) + return IRC_WriteStrClient(Client, ERR_NOSUCHNICK_MSG, + Client_ID(Client), Req->prefix); + Log(LOG_DEBUG, "Got SQUIT from %s for \"%s\": \"%s\" ...", - Client_ID(Client), Req->argv[0], Req->argv[1]); + Client_ID(from), Req->argv[0], Req->argv[1]); target = Client_Search(Req->argv[0]); + if (Client_Type(Client) != CLIENT_SERVER && + target == Client_ThisServer()) + return Op_NoPrivileges(Client, Req); if (!target) { /* The server is (already) unknown */ Log(LOG_WARNING, @@ -296,27 +316,46 @@ IRC_SQUIT(CLIENT * Client, REQUEST * Req) return CONNECTED; } - if (Req->argv[1][0]) { - if (strlen(Req->argv[1]) > LINE_LEN) - Req->argv[1][LINE_LEN] = '\0'; - snprintf(msg, sizeof(msg), "%s (SQUIT from %s).", Req->argv[1], - Client_ID(Client)); - } else - snprintf(msg, sizeof(msg), "Got SQUIT from %s.", - Client_ID(Client)); - - if (Client_Conn(target) > NONE) { - /* We are directly connected to this server */ - if (Req->argv[1][0]) - Conn_Close(Client_Conn(target), msg, Req->argv[1], - true); + con = Client_Conn(target); + + if (Req->argv[1][0]) + if (Client_NextHop(from) != Client || con > NONE) + snprintf(msg, sizeof(msg), "%s (SQUIT from %s)", + Req->argv[1], Client_ID(from)); else - Conn_Close(Client_Conn(target), msg, NULL, true); - return DISCONNECTED; + strlcpy(msg, Req->argv[1], sizeof(msg)); + else + snprintf(msg, sizeof(msg), "Got SQUIT from %s", + Client_ID(from)); + + if (con > NONE) { + /* We are directly connected to the target server, so we + * have to tear down the connection and to inform all the + * other remaining servers in the network */ + Conn_Close(con, NULL, msg, true); + if (con == Client_Conn(Client)) + return DISCONNECTED; } else { - Client_Destroy(target, msg, Req->argv[1], false); - return CONNECTED; + /* This server is not directly connected, so the SQUIT must + * be forwarded ... */ + if (Client_Type(from) != CLIENT_SERVER) { + /* The origin is not an IRC server, so don't evaluate + * this SQUIT but simply forward it */ + IRC_WriteStrClientPrefix(Client_NextHop(target), + from, "SQUIT %s :%s", Req->argv[0], Req->argv[1]); + } else { + /* SQUIT has been generated by another server, so + * remove the target server from the network! */ + logmsg[0] = '\0'; + if (!strchr(msg, '(')) + snprintf(logmsg, sizeof(logmsg), + "%s (SQUIT from %s)", Req->argv[1], + Client_ID(from)); + Client_Destroy(target, logmsg[0] ? logmsg : msg, + msg, false); + } } + return CONNECTED; } /* IRC_SQUIT */ /* -eof- */ diff --git a/src/ngircd/parse.c b/src/ngircd/parse.c index 6d53525..2c28a30 100644 --- a/src/ngircd/parse.c +++ b/src/ngircd/parse.c @@ -92,7 +92,7 @@ static COMMAND My_Commands[] = { "SERVICE", IRC_SERVICE, 0xFFFF, 0, 0, 0 }, { "SERVLIST", IRC_SERVLIST, CLIENT_USER, 0, 0, 0 }, { "SQUERY", IRC_SQUERY, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 }, - { "SQUIT", IRC_SQUIT, 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 }, { "SUMMON", IRC_SUMMON, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 }, { "TIME", IRC_TIME, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 },
1
0
0
0
Alexander Barton : Xcode: added new op.{c|h} to project file
by alex@arthur.barton.de
30 Sep '09
30 Sep '09
Module: ngircd.git Branch: master Commit: 03b70229eb95e218f56ab22ce30fa6279b3ae91f URL:
http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=03b70229…
Author: Alexander Barton <alex(a)barton.de> Date: Sat Apr 25 00:37:27 2009 +0200 Xcode: added new op.{c|h} to project file --- contrib/MacOSX/ngIRCd.xcodeproj/project.pbxproj | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/contrib/MacOSX/ngIRCd.xcodeproj/project.pbxproj b/contrib/MacOSX/ngIRCd.xcodeproj/project.pbxproj index 3f55ed3..a7cc74f 100644 --- a/contrib/MacOSX/ngIRCd.xcodeproj/project.pbxproj +++ b/contrib/MacOSX/ngIRCd.xcodeproj/project.pbxproj @@ -35,6 +35,7 @@ FA322DBE0CEF7766001761B3 /* tool.c in Sources */ = {isa = PBXBuildFile; fileRef = FA322D330CEF74B1001761B3 /* tool.c */; }; FA322DC10CEF77CB001761B3 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = FA322DC00CEF77CB001761B3 /* libz.dylib */; }; FA407F2E0DB159F400271AF1 /* ng_ipaddr.c in Sources */ = {isa = PBXBuildFile; fileRef = FA407F2C0DB159F400271AF1 /* ng_ipaddr.c */; }; + FA85178C0FA061EC006A1F5A /* op.c in Sources */ = {isa = PBXBuildFile; fileRef = FA85178B0FA061EC006A1F5A /* op.c */; }; FAA3D27B0F139CDC00B2447E /* conn-ssl.c in Sources */ = {isa = PBXBuildFile; fileRef = FAA3D2790F139CDC00B2447E /* conn-ssl.c */; }; FAE5CC2E0CF2308A007D69B6 /* numeric.c in Sources */ = {isa = PBXBuildFile; fileRef = FAE5CC2D0CF2308A007D69B6 /* numeric.c */; }; /* End PBXBuildFile section */ @@ -193,6 +194,8 @@ FA407F2C0DB159F400271AF1 /* ng_ipaddr.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; name = ng_ipaddr.c; path = ipaddr/ng_ipaddr.c; sourceTree = "<group>"; }; FA407F2D0DB159F400271AF1 /* ng_ipaddr.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; name = ng_ipaddr.h; path = ipaddr/ng_ipaddr.h; sourceTree = "<group>"; }; FA407F380DB15AC700271AF1 /* GIT.txt */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = GIT.txt; sourceTree = "<group>"; }; + FA85178A0FA061EC006A1F5A /* op.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = op.h; sourceTree = "<group>"; }; + FA85178B0FA061EC006A1F5A /* op.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = op.c; sourceTree = "<group>"; }; FAA3D2700F139CB300B2447E /* invite-test.e */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = "invite-test.e"; sourceTree = "<group>"; }; FAA3D2710F139CB300B2447E /* join-test.e */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = "join-test.e"; sourceTree = "<group>"; }; FAA3D2720F139CB300B2447E /* kick-test.e */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = "kick-test.e"; sourceTree = "<group>"; }; @@ -332,6 +335,8 @@ FA322D070CEF74B1001761B3 /* ngircd.h */, FAE5CC2D0CF2308A007D69B6 /* numeric.c */, FAE5CC2C0CF2308A007D69B6 /* numeric.h */, + FA85178A0FA061EC006A1F5A /* op.h */, + FA85178B0FA061EC006A1F5A /* op.c */, FA322D080CEF74B1001761B3 /* parse.c */, FA322D090CEF74B1001761B3 /* parse.h */, FA322D0A0CEF74B1001761B3 /* rendezvous.c */, @@ -676,6 +681,7 @@ FAE5CC2E0CF2308A007D69B6 /* numeric.c in Sources */, FA407F2E0DB159F400271AF1 /* ng_ipaddr.c in Sources */, FAA3D27B0F139CDC00B2447E /* conn-ssl.c in Sources */, + FA85178C0FA061EC006A1F5A /* op.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; };
1
0
0
0
Alexander Barton : Use functions provided by op.c "module"
by alex@arthur.barton.de
30 Sep '09
30 Sep '09
Module: ngircd.git Branch: master Commit: 9918dfc1d595a680573910d12beb337cf4a58b14 URL:
http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=9918dfc1…
Author: Alexander Barton <alex(a)barton.de> Date: Wed Apr 22 23:24:15 2009 +0200 Use functions provided by op.c "module" Local functions Check_Oper() and No_Privileges() have been replaced by global functions in op.c "module": Op_Check() and Op_NoPrivileges(). --- src/ngircd/irc-oper.c | 73 +++++++----------------------------------------- 1 files changed, 11 insertions(+), 62 deletions(-) diff --git a/src/ngircd/irc-oper.c b/src/ngircd/irc-oper.c index f67e947..68b5eb6 100644 --- a/src/ngircd/irc-oper.c +++ b/src/ngircd/irc-oper.c @@ -31,6 +31,7 @@ #include "match.h" #include "messages.h" #include "parse.h" +#include "op.h" #include <exp.h> #include "irc-oper.h" @@ -51,58 +52,6 @@ Bad_OperPass(CLIENT *Client, char *errtoken, char *errmsg) } /* Bad_OperPass */ -/** - * Check that the client is an IRC operator allowed to administer this server. - */ -static bool -Check_Oper(CLIENT * Client, REQUEST * Req) -{ - CLIENT *c; - - assert(Client != NULL); - assert(Req != NULL); - - if (Client_Type(Client) == CLIENT_SERVER && Req->prefix) - c = Client_Search(Req->prefix); - else - c = Client; - if (!c) - return false; - if (!Client_HasMode(c, 'o')) - return false; - if (!Client_OperByMe(c) && !Conf_AllowRemoteOper) - return false; - /* The client is an local IRC operator, or this server is configured - * to trust remote operators. */ - return true; -} /* CheckOper */ - - -/** - * Return and log a "no privileges" message. - */ -static bool -No_Privileges(CLIENT * Client, REQUEST * Req) -{ - CLIENT *from = NULL; - - if (Req->prefix) - from = Client_Search(Req->prefix); - - if (from) { - Log(LOG_NOTICE, "No privileges: client \"%s\" (%s), command \"%s\"", - Req->prefix, Client_Mask(Client), Req->command); - return IRC_WriteStrClient(from, ERR_NOPRIVILEGES_MSG, - Client_ID(from)); - } else { - Log(LOG_NOTICE, "No privileges: client \"%s\", command \"%s\"", - Client_Mask(Client), Req->command); - return IRC_WriteStrClient(Client, ERR_NOPRIVILEGES_MSG, - Client_ID(Client)); - } -} /* PermissionDenied */ - - GLOBAL bool IRC_OPER( CLIENT *Client, REQUEST *Req ) { @@ -151,8 +100,8 @@ IRC_DIE(CLIENT * Client, REQUEST * Req) assert(Client != NULL); assert(Req != NULL); - if (!Check_Oper(Client, Req)) - return No_Privileges(Client, Req); + if (!Op_Check(Client, Req)) + return Op_NoPrivileges(Client, Req); /* Bad number of parameters? */ #ifdef STRICT_RFC @@ -191,8 +140,8 @@ IRC_REHASH( CLIENT *Client, REQUEST *Req ) assert( Client != NULL ); assert( Req != NULL ); - if (!Check_Oper(Client, Req)) - return No_Privileges(Client, Req); + if (!Op_Check(Client, Req)) + return Op_NoPrivileges(Client, Req); /* Bad number of parameters? */ if( Req->argc != 0 ) return IRC_WriteStrClient( Client, ERR_NEEDMOREPARAMS_MSG, Client_ID( Client ), Req->command ); @@ -212,8 +161,8 @@ IRC_RESTART( CLIENT *Client, REQUEST *Req ) assert( Client != NULL ); assert( Req != NULL ); - if (!Check_Oper(Client, Req)) - return No_Privileges(Client, Req); + if (!Op_Check(Client, Req)) + return Op_NoPrivileges(Client, Req); /* Bad number of parameters? */ if( Req->argc != 0 ) return IRC_WriteStrClient( Client, ERR_NEEDMOREPARAMS_MSG, Client_ID( Client ), Req->command ); @@ -235,8 +184,8 @@ IRC_CONNECT(CLIENT * Client, REQUEST * Req) assert(Client != NULL); assert(Req != NULL); - if (!Check_Oper(Client, Req)) - return No_Privileges(Client, Req); + if (!Op_Check(Client, Req)) + return Op_NoPrivileges(Client, Req); /* Bad number of parameters? */ if (Req->argc != 1 && Req->argc != 2 && Req->argc != 3 && @@ -329,8 +278,8 @@ IRC_DISCONNECT(CLIENT * Client, REQUEST * Req) assert(Client != NULL); assert(Req != NULL); - if (!Check_Oper(Client, Req)) - return No_Privileges(Client, Req); + if (!Op_Check(Client, Req)) + return Op_NoPrivileges(Client, Req); /* Bad number of parameters? */ if (Req->argc != 1)
1
0
0
0
Alexander Barton : New "module" op.c/op. h for IRC operator related functions
by alex@arthur.barton.de
30 Sep '09
30 Sep '09
Module: ngircd.git Branch: master Commit: e46cf64cc1e3bf21060df1d1125502277d035170 URL:
http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=e46cf64c…
Author: Alexander Barton <alex(a)barton.de> Date: Wed Apr 22 23:17:25 2009 +0200 New "module" op.c/op.h for IRC operator related functions The new "module" op.c is used to implement functions related to IRC Ops. At the moment, these two functions are available: - Op_Check() to check for a valid IRC Op, and - Op_NoPrivileges() to generate "permission denied" messages. --- src/ngircd/Makefile.am | 4 +- src/ngircd/op.c | 82 ++++++++++++++++++++++++++++++++++++++++++++++++ src/ngircd/op.h | 22 +++++++++++++ 3 files changed, 106 insertions(+), 2 deletions(-) diff --git a/src/ngircd/Makefile.am b/src/ngircd/Makefile.am index fca531d..f94f8d9 100644 --- a/src/ngircd/Makefile.am +++ b/src/ngircd/Makefile.am @@ -23,7 +23,7 @@ sbin_PROGRAMS = ngircd ngircd_SOURCES = ngircd.c array.c channel.c client.c conf.c conn.c conn-func.c \ conn-ssl.c conn-zip.c hash.c io.c irc.c irc-channel.c irc-info.c irc-login.c \ irc-mode.c irc-op.c irc-oper.c irc-server.c irc-write.c lists.c log.c \ - match.c numeric.c parse.c rendezvous.c resolve.c + match.c op.c numeric.c parse.c rendezvous.c resolve.c ngircd_LDFLAGS = -L../portab -L../tool -L../ipaddr @@ -32,7 +32,7 @@ ngircd_LDADD = -lngportab -lngtool -lngipaddr noinst_HEADERS = ngircd.h array.h channel.h client.h conf.h conf-ssl.h conn.h \ conn-func.h conn-ssl.h conn-zip.h hash.h io.h irc.h irc-channel.h \ irc-info.h irc-login.h irc-mode.h irc-op.h irc-oper.h irc-server.h \ - irc-write.h lists.h log.h match.h numeric.h parse.h rendezvous.h \ + irc-write.h lists.h log.h match.h numeric.h op.h parse.h rendezvous.h \ resolve.h defines.h messages.h clean-local: diff --git a/src/ngircd/op.c b/src/ngircd/op.c new file mode 100644 index 0000000..031bc28 --- /dev/null +++ b/src/ngircd/op.c @@ -0,0 +1,82 @@ +/* + * ngIRCd -- The Next Generation IRC Daemon + * Copyright (c)2001-2008 Alexander Barton (alex(a)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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * Please read the file COPYING, README and AUTHORS for more information. + * + * IRC operator functions + */ + + +#include "portab.h" + +#include "imp.h" +#include <assert.h> +#include <string.h> + +#include "conn.h" +#include "client.h" +#include "channel.h" +#include "conf.h" +#include "log.h" +#include "parse.h" +#include "messages.h" +#include "irc-write.h" + +#include <exp.h> +#include "op.h" + +/** + * Return and log a "no privileges" message. + */ +GLOBAL bool +Op_NoPrivileges(CLIENT * Client, REQUEST * Req) +{ + CLIENT *from = NULL; + + if (Req->prefix) + from = Client_Search(Req->prefix); + + if (from) { + Log(LOG_NOTICE, "No privileges: client \"%s\" (%s), command \"%s\"", + Req->prefix, Client_Mask(Client), Req->command); + return IRC_WriteStrClient(from, ERR_NOPRIVILEGES_MSG, + Client_ID(from)); + } else { + Log(LOG_NOTICE, "No privileges: client \"%s\", command \"%s\"", + Client_Mask(Client), Req->command); + return IRC_WriteStrClient(Client, ERR_NOPRIVILEGES_MSG, + Client_ID(Client)); + } +} /* Op_NoPrivileges */ + + +/** + * Check that the client is an IRC operator allowed to administer this server. + */ +GLOBAL bool +Op_Check(CLIENT * Client, REQUEST * Req) +{ + CLIENT *c; + + assert(Client != NULL); + assert(Req != NULL); + + if (Client_Type(Client) == CLIENT_SERVER && Req->prefix) + c = Client_Search(Req->prefix); + else + c = Client; + if (!c) + return false; + if (!Client_HasMode(c, 'o')) + return false; + if (!Client_OperByMe(c) && !Conf_AllowRemoteOper) + return false; + /* The client is an local IRC operator, or this server is configured + * to trust remote operators. */ + return true; +} /* Op_Check */ diff --git a/src/ngircd/op.h b/src/ngircd/op.h new file mode 100644 index 0000000..544be25 --- /dev/null +++ b/src/ngircd/op.h @@ -0,0 +1,22 @@ +/* + * ngIRCd -- The Next Generation IRC Daemon + * Copyright (c)2001-2009 Alexander Barton (alex(a)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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * Please read the file COPYING, README and AUTHORS for more information. + * + * Operator management (header) + */ + +#ifndef __oper_h__ +#define __oper_h__ + +GLOBAL bool Op_NoPrivileges PARAMS((CLIENT * Client, REQUEST * Req)); +GLOBAL bool Op_Check PARAMS((CLIENT * Client, REQUEST * Req)); + +#endif + +/* -eof- */
1
0
0
0
Alexander Barton : Allow forwarding of CONNECT commands.
by alex@arthur.barton.de
30 Sep '09
30 Sep '09
Module: ngircd.git Branch: master Commit: 113bd34878c17f730d8fb878157b0dbba9380326 URL:
http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=113bd348…
Author: Alexander Barton <alex(a)barton.de> Date: Tue Jul 22 18:38:05 2008 +0200 Allow forwarding of CONNECT commands. The syntax of the CONNECT command now is: - CONNECT <server-id> - CONNECT <server-id> <port> - CONNECT <server-id> <port> <target> - CONNECT <server-id> <port> <host> <my-pwd> <peer-pwd> - CONNECT <server-id> <port> <host> <my-pwd> <peer-pwd> <target> Note: the configuration option "AllowRemoteOper" mus be enabled on the target server to allow forwarding of CONNECT commands. --- src/ngircd/irc-oper.c | 61 ++++++++++++++++++++++++++++++++++++++---------- src/ngircd/parse.c | 2 +- 2 files changed, 49 insertions(+), 14 deletions(-) diff --git a/src/ngircd/irc-oper.c b/src/ngircd/irc-oper.c index 656e959..f67e947 100644 --- a/src/ngircd/irc-oper.c +++ b/src/ngircd/irc-oper.c @@ -230,6 +230,8 @@ IRC_RESTART( CLIENT *Client, REQUEST *Req ) GLOBAL bool IRC_CONNECT(CLIENT * Client, REQUEST * Req) { + CLIENT *from, *target; + assert(Client != NULL); assert(Req != NULL); @@ -237,7 +239,8 @@ IRC_CONNECT(CLIENT * Client, REQUEST * Req) return No_Privileges(Client, Req); /* Bad number of parameters? */ - if ((Req->argc != 1) && (Req->argc != 2) && (Req->argc != 5)) + if (Req->argc != 1 && Req->argc != 2 && Req->argc != 3 && + Req->argc != 5 && Req->argc != 6) return IRC_WriteStrClient(Client, ERR_NEEDMOREPARAMS_MSG, Client_ID(Client), Req->command); @@ -246,36 +249,68 @@ IRC_CONNECT(CLIENT * Client, REQUEST * Req) return IRC_WriteStrClient(Client, ERR_NEEDMOREPARAMS_MSG, Client_ID(Client), Req->command); - IRC_SendWallops(Client_ThisServer(), Client_ThisServer(), - "Received CONNECT %s from %s", - Req->argv[0], Client_ID(Client)); + from = Client; + target = Client_ThisServer(); + + if (Req->argc == 3 || Req->argc == 6) { + /* This CONNECT has a target parameter */ + if (Client_Type(Client) == CLIENT_SERVER) + from = Client_Search(Req->prefix); + if (! from) + return IRC_WriteStrClient(Client, ERR_NOSUCHNICK_MSG, + Client_ID(Client), Req->prefix); + + target = (Req->argc == 3) ? Client_Search(Req->argv[2]) + : Client_Search(Req->argv[5]); + if (! target || Client_Type(target) != CLIENT_SERVER) + return IRC_WriteStrClient(from, ERR_NOSUCHSERVER_MSG, + Client_ID(from), Req->argv[0]); + } + + if (target != Client_ThisServer()) { + /* Forward CONNECT command ... */ + if (Req->argc == 3) + IRC_WriteStrClientPrefix(target, from, + "CONNECT %s %s :%s", Req->argv[0], + Req->argv[1], Req->argv[2]); + else + IRC_WriteStrClientPrefix(target, from, + "CONNECT %s %s %s %s %s :%s", Req->argv[0], + Req->argv[1], Req->argv[2], Req->argv[3], + Req->argv[4], Req->argv[5]); + return CONNECTED; + } Log(LOG_NOTICE | LOG_snotice, - "Got CONNECT command from \"%s\" for \"%s\".", Client_Mask(Client), + "Got CONNECT command from \"%s\" for \"%s\".", Client_Mask(from), Req->argv[0]); + IRC_SendWallops(Client_ThisServer(), Client_ThisServer(), + "Received CONNECT %s from %s", + Req->argv[0], Client_ID(from)); switch (Req->argc) { case 1: if (!Conf_EnablePassiveServer(Req->argv[0])) - return IRC_WriteStrClient(Client, ERR_NOSUCHSERVER_MSG, - Client_ID(Client), + return IRC_WriteStrClient(from, ERR_NOSUCHSERVER_MSG, + Client_ID(from), Req->argv[0]); - break; + break; case 2: + case 3: /* Connect configured server */ if (!Conf_EnableServer (Req->argv[0], (UINT16) atoi(Req->argv[1]))) - return IRC_WriteStrClient(Client, ERR_NOSUCHSERVER_MSG, - Client_ID(Client), + return IRC_WriteStrClient(from, ERR_NOSUCHSERVER_MSG, + Client_ID(from), Req->argv[0]); - break; + break; default: /* Add server */ if (!Conf_AddServer (Req->argv[0], (UINT16) atoi(Req->argv[1]), Req->argv[2], Req->argv[3], Req->argv[4])) - return IRC_WriteStrClient(Client, ERR_NOSUCHSERVER_MSG, - Client_ID(Client), + return IRC_WriteStrClient(from, ERR_NOSUCHSERVER_MSG, + Client_ID(from), Req->argv[0]); } diff --git a/src/ngircd/parse.c b/src/ngircd/parse.c index 5e3f08d..6d53525 100644 --- a/src/ngircd/parse.c +++ b/src/ngircd/parse.c @@ -59,7 +59,7 @@ static COMMAND My_Commands[] = { { "ADMIN", IRC_ADMIN, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 }, { "AWAY", IRC_AWAY, CLIENT_USER, 0, 0, 0 }, - { "CONNECT", IRC_CONNECT, CLIENT_USER, 0, 0, 0 }, + { "CONNECT", IRC_CONNECT, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 }, { "DIE", IRC_DIE, CLIENT_USER, 0, 0, 0 }, { "DISCONNECT", IRC_DISCONNECT, CLIENT_USER, 0, 0, 0 }, { "ERROR", IRC_ERROR, 0xFFFF, 0, 0, 0 },
1
0
0
0
Alexander Barton : Check_Oper(): check origin of forwarded messages instead of server.
by alex@arthur.barton.de
30 Sep '09
30 Sep '09
Module: ngircd.git Branch: master Commit: 4a3e40bc95e783145855da611fa5944401a9c2c9 URL:
http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=4a3e40bc…
Author: Alexander Barton <alex(a)barton.de> Date: Tue Jul 22 18:35:35 2008 +0200 Check_Oper(): check origin of forwarded messages instead of server. --- src/ngircd/irc-oper.c | 27 +++++++++++++++++++-------- 1 files changed, 19 insertions(+), 8 deletions(-) diff --git a/src/ngircd/irc-oper.c b/src/ngircd/irc-oper.c index e7dfee6..656e959 100644 --- a/src/ngircd/irc-oper.c +++ b/src/ngircd/irc-oper.c @@ -55,11 +55,22 @@ Bad_OperPass(CLIENT *Client, char *errtoken, char *errmsg) * Check that the client is an IRC operator allowed to administer this server. */ static bool -Check_Oper(CLIENT * Client) +Check_Oper(CLIENT * Client, REQUEST * Req) { - if (!Client_HasMode(Client, 'o')) + CLIENT *c; + + assert(Client != NULL); + assert(Req != NULL); + + if (Client_Type(Client) == CLIENT_SERVER && Req->prefix) + c = Client_Search(Req->prefix); + else + c = Client; + if (!c) + return false; + if (!Client_HasMode(c, 'o')) return false; - if (!Client_OperByMe(Client) && !Conf_AllowRemoteOper) + if (!Client_OperByMe(c) && !Conf_AllowRemoteOper) return false; /* The client is an local IRC operator, or this server is configured * to trust remote operators. */ @@ -140,7 +151,7 @@ IRC_DIE(CLIENT * Client, REQUEST * Req) assert(Client != NULL); assert(Req != NULL); - if (!Check_Oper(Client)) + if (!Check_Oper(Client, Req)) return No_Privileges(Client, Req); /* Bad number of parameters? */ @@ -180,7 +191,7 @@ IRC_REHASH( CLIENT *Client, REQUEST *Req ) assert( Client != NULL ); assert( Req != NULL ); - if (!Check_Oper(Client)) + if (!Check_Oper(Client, Req)) return No_Privileges(Client, Req); /* Bad number of parameters? */ @@ -201,7 +212,7 @@ IRC_RESTART( CLIENT *Client, REQUEST *Req ) assert( Client != NULL ); assert( Req != NULL ); - if (!Check_Oper(Client)) + if (!Check_Oper(Client, Req)) return No_Privileges(Client, Req); /* Bad number of parameters? */ @@ -222,7 +233,7 @@ IRC_CONNECT(CLIENT * Client, REQUEST * Req) assert(Client != NULL); assert(Req != NULL); - if (!Check_Oper(Client)) + if (!Check_Oper(Client, Req)) return No_Privileges(Client, Req); /* Bad number of parameters? */ @@ -283,7 +294,7 @@ IRC_DISCONNECT(CLIENT * Client, REQUEST * Req) assert(Client != NULL); assert(Req != NULL); - if (!Check_Oper(Client)) + if (!Check_Oper(Client, Req)) return No_Privileges(Client, Req); /* Bad number of parameters? */
1
0
0
0
Alexander Barton : No_Privileges(): handle forwarded messages.
by alex@arthur.barton.de
30 Sep '09
30 Sep '09
Module: ngircd.git Branch: master Commit: 45b1a45c979d0418591a1c62204d5a607cf86cde URL:
http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=45b1a45c…
Author: Alexander Barton <alex(a)barton.de> Date: Tue Jul 22 18:33:44 2008 +0200 No_Privileges(): handle forwarded messages. --- src/ngircd/irc-oper.c | 20 ++++++++++++++++---- 1 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/ngircd/irc-oper.c b/src/ngircd/irc-oper.c index 544fe67..e7dfee6 100644 --- a/src/ngircd/irc-oper.c +++ b/src/ngircd/irc-oper.c @@ -73,10 +73,22 @@ Check_Oper(CLIENT * Client) static bool No_Privileges(CLIENT * Client, REQUEST * Req) { - Log(LOG_NOTICE, "No privileges: client \"%s\", command \"%s\"", - Client_Mask(Client), Req->command); - return IRC_WriteStrClient(Client, ERR_NOPRIVILEGES_MSG, - Client_ID(Client)); + CLIENT *from = NULL; + + if (Req->prefix) + from = Client_Search(Req->prefix); + + if (from) { + Log(LOG_NOTICE, "No privileges: client \"%s\" (%s), command \"%s\"", + Req->prefix, Client_Mask(Client), Req->command); + return IRC_WriteStrClient(from, ERR_NOPRIVILEGES_MSG, + Client_ID(from)); + } else { + Log(LOG_NOTICE, "No privileges: client \"%s\", command \"%s\"", + Client_Mask(Client), Req->command); + return IRC_WriteStrClient(Client, ERR_NOPRIVILEGES_MSG, + Client_ID(Client)); + } } /* PermissionDenied */
1
0
0
0
Alexander Barton : IRC_SendWallops(): support format string and variable parameter lists.
by alex@arthur.barton.de
30 Sep '09
30 Sep '09
Module: ngircd.git Branch: master Commit: 7d6de7c352f7b91b396cbdb6f2d194e2422b35b3 URL:
http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=7d6de7c3…
Author: Alexander Barton <alex(a)barton.de> Date: Tue Jul 22 16:54:12 2008 +0200 IRC_SendWallops(): support format string and variable parameter lists. --- src/ngircd/irc-oper.c | 17 +++++++---------- src/ngircd/irc-write.c | 25 ++++++++++++++++++++++--- src/ngircd/irc-write.h | 2 +- 3 files changed, 30 insertions(+), 14 deletions(-) diff --git a/src/ngircd/irc-oper.c b/src/ngircd/irc-oper.c index 0824149..544fe67 100644 --- a/src/ngircd/irc-oper.c +++ b/src/ngircd/irc-oper.c @@ -207,8 +207,6 @@ IRC_RESTART( CLIENT *Client, REQUEST *Req ) GLOBAL bool IRC_CONNECT(CLIENT * Client, REQUEST * Req) { - char msg[LINE_LEN + 64]; - assert(Client != NULL); assert(Req != NULL); @@ -225,9 +223,9 @@ IRC_CONNECT(CLIENT * Client, REQUEST * Req) return IRC_WriteStrClient(Client, ERR_NEEDMOREPARAMS_MSG, Client_ID(Client), Req->command); - snprintf(msg, sizeof(msg), "Received CONNECT %s from %s", - Req->argv[0], Client_ID(Client)); - IRC_SendWallops(Client_ThisServer(), Client_ThisServer(), msg); + IRC_SendWallops(Client_ThisServer(), Client_ThisServer(), + "Received CONNECT %s from %s", + Req->argv[0], Client_ID(Client)); Log(LOG_NOTICE | LOG_snotice, "Got CONNECT command from \"%s\" for \"%s\".", Client_Mask(Client), @@ -269,7 +267,6 @@ GLOBAL bool IRC_DISCONNECT(CLIENT * Client, REQUEST * Req) { CONN_ID my_conn; - char msg[LINE_LEN + 64]; assert(Client != NULL); assert(Req != NULL); @@ -282,9 +279,9 @@ IRC_DISCONNECT(CLIENT * Client, REQUEST * Req) return IRC_WriteStrClient(Client, ERR_NEEDMOREPARAMS_MSG, Client_ID(Client), Req->command); - snprintf(msg, sizeof(msg), "Received DISCONNECT %s from %s", - Req->argv[0], Client_ID(Client)); - IRC_SendWallops(Client_ThisServer(), Client_ThisServer(), msg); + IRC_SendWallops(Client_ThisServer(), Client_ThisServer(), + "Received DISCONNECT %s from %s", + Req->argv[0], Client_ID(Client)); Log(LOG_NOTICE | LOG_snotice, "Got DISCONNECT command from \"%s\" for \"%s\".", @@ -333,7 +330,7 @@ IRC_WALLOPS( CLIENT *Client, REQUEST *Req ) if (!from) return IRC_WriteStrClient(Client, ERR_NOSUCHNICK_MSG, Client_ID(Client), Req->prefix); - IRC_SendWallops(Client, from, Req->argv[0]); + IRC_SendWallops(Client, from, "%s", Req->argv[0]); return CONNECTED; } /* IRC_WALLOPS */ diff --git a/src/ngircd/irc-write.c b/src/ngircd/irc-write.c index dae78e5..9b5b5e2 100644 --- a/src/ngircd/irc-write.c +++ b/src/ngircd/irc-write.c @@ -408,11 +408,30 @@ va_dcl /** * Send WALLOPS message. */ +#ifdef PROTOTYPES +GLOBAL void +IRC_SendWallops(CLIENT *Client, CLIENT *From, const char *Format, ...) +#else GLOBAL void -IRC_SendWallops(CLIENT *Client, CLIENT *From, const char *Message) +IRC_SendWallops(Client, From, Format, va_alist ) +CLIENT *Client; +CLIENT *From; +char *Format; +va_dcl +#endif { + va_list ap; + char msg[1000]; CLIENT *to; +#ifdef PROTOTYPES + va_start(ap, Format); +#else + va_start(ap); +#endif + vsnprintf(msg, 1000, Format, ap); + va_end(ap); + for (to=Client_First(); to != NULL; to=Client_Next(to)) { if (Client_Conn(to) == NONE) /* no local connection */ continue; @@ -421,12 +440,12 @@ IRC_SendWallops(CLIENT *Client, CLIENT *From, const char *Message) case CLIENT_USER: if (Client_HasMode(to, 'w')) IRC_WriteStrClientPrefix(to, From, - "WALLOPS :%s", Message); + "WALLOPS :%s", msg); break; case CLIENT_SERVER: if (to != Client) IRC_WriteStrClientPrefix(to, From, - "WALLOPS :%s", Message); + "WALLOPS :%s", msg); break; } } diff --git a/src/ngircd/irc-write.h b/src/ngircd/irc-write.h index 5bac0de..a984997 100644 --- a/src/ngircd/irc-write.h +++ b/src/ngircd/irc-write.h @@ -36,7 +36,7 @@ GLOBAL bool IRC_WriteStrRelatedPrefix PARAMS((CLIENT *Client, CLIENT *Prefix, bool Remote, char *Format, ...)); GLOBAL void IRC_SendWallops PARAMS((CLIENT *Client, CLIENT *From, - const char *Message)); + const char *Format, ...)); GLOBAL void IRC_SetPenalty PARAMS((CLIENT *Client, time_t Seconds));
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