Module: ngircd.git
Branch: master
Commit: b681aa5b9f985247df31772282e520479ffb2ece
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=b681aa5b…
Author: Alexander Barton <alex(a)barton.de>
Date: Sat Dec 31 18:06:17 2011 +0100
PAM: don't use global password buffer for conv struct
Use the pointer of the password of the client directly.
Eventually we can get rid of the global password again ...
---
src/ngircd/pam.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/ngircd/pam.c b/src/ngircd/pam.c
index b28e866..6382c59 100644
--- a/src/ngircd/pam.c
+++ b/src/ngircd/pam.c
@@ -103,7 +103,7 @@ PAM_Authenticate(CLIENT *Client) {
if (password)
free(password);
password = strdup(Client_Password(Client));
- conv.appdata_ptr = password;
+ conv.appdata_ptr = Client_Password(Client);
/* Initialize PAM */
retval = pam_start("ngircd", Client_OrigUser(Client), &conv, &pam);
Module: ngircd.git
Branch: master
Commit: b32f3b76e9f7d608d6772c889f093608abf4d995
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=b32f3b76…
Author: Alexander Barton <alex(a)barton.de>
Date: Sat Dec 31 18:04:58 2011 +0100
doc/Modes.txt: document channel mode "r"
And make clear, that user mode "r" and channel mode "r" are not set by
ngIRCd itself but by IRC services.
---
doc/Modes.txt | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/doc/Modes.txt b/doc/Modes.txt
index d644a48..20e927b 100644
--- a/doc/Modes.txt
+++ b/doc/Modes.txt
@@ -26,7 +26,7 @@ channels he is using at the moment.
i 0.0.1 User is "invisible".
o 0.0.1 User is IRC operator.
r 0.0.1 User is restricted.
- R 19 User is registered (e.g. by NickServ).
+ R (1) 19 User is registered (e.g. by NickServ).
s 0.4.0 User wants to receive server notices.
w 0.11.0 User wants to receive WALLOPS messages.
x 17 Hostname of this user is "cloaked".
@@ -50,6 +50,7 @@ users to lists (e.g. "invite list", "ban list"), others have parameters
n 0.3.0 Channel doesn't allow messages of users not being members.
O 18 Only IRC operators are allowed to join this channel.
P 0.5.0 Channel is "persistent".
+ r (1) 19 Channel is "registered" (e.g. by ChanServ).
R 19 Only registered users are allowed to join this channel.
s 0.9.0 Channel is "secret".
t 0.3.0 Only ChanOps are allowed to modify the channel topic.
@@ -65,3 +66,10 @@ channel of which he is a member.
o 0.2.0 User is channel operator and can op/kick/... other members.
v 0.2.0 User is "voiced" and can speak even if channel is moderated.
+
+
+Notes
+~~~~~
+
+(1) This mode is not set by ngIRCd itself but by services. ngIRCd handles
+ the mode transparently and possibly adjusts its behaviour.
Module: ngircd.git
Branch: master
Commit: 1a5ed654b43b7d4b14636fddd4ee79d3ebe749fa
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=1a5ed654…
Author: Alexander Barton <alex(a)barton.de>
Date: Fri Dec 30 14:52:48 2011 +0100
Fixed handling of WHO commands
This fixes two bugs:
- "WHO <nick>" returned nothing at all if the user was "+i"
(reported by Cahata, thanks).
- "WHO <nick|nickmask>" returned channel names instead of "*"
when the user was member of a (visible) channel.
Clean up code and add documentation as well.
---
src/ngircd/irc-info.c | 223 +++++++++++++++++++++++++++-------------------
src/testsuite/who-test.e | 66 ++++++++++----
2 files changed, 179 insertions(+), 110 deletions(-)
Diff: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commitdiff;h=1a5e…
Module: ngircd.git
Branch: master
Commit: 5cb0804c8aceb1935a2444cdb434f56ba518248e
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=5cb0804c…
Author: Alexander Barton <alex(a)barton.de>
Date: Fri Dec 30 14:52:48 2011 +0100
Fixed handling of WHO commands
This fixes two bugs:
- "WHO <nick>" returned nothing at all if the user was "+i"
- "WHO <nick|nickmask>" returned channel names instead of "*"
when the user was member of a (visible) channel.
Clean up code and add documentation as well.
---
src/ngircd/irc-info.c | 223 +++++++++++++++++++++++++++-------------------
src/testsuite/who-test.e | 66 ++++++++++----
2 files changed, 179 insertions(+), 110 deletions(-)
Diff: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commitdiff;h=5cb0…
Module: ngircd.git
Branch: master
Commit: e19ce437cadca5697a052ade944118a42709eabd
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=e19ce437…
Author: Alexander Barton <alex(a)barton.de>
Date: Fri Dec 30 00:50:27 2011 +0100
Fixed some spelling errors in documentation and code comments
Thanks to Christoph Biedl!
---
ChangeLog | 8 ++++----
NEWS | 4 ++--
configure.in | 2 +-
src/ngircd/array.h | 2 +-
src/ngircd/client.c | 4 ++--
src/ngircd/conf.h | 2 +-
src/ngircd/conn.c | 4 ++--
src/ngircd/irc-channel.c | 2 +-
8 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ec4fc19..ae2abe2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -797,7 +797,7 @@ ngIRCd 0.6.0, 2002-12-24
werden (beide Server versuchen sich dann gegenseitig zu connectieren).
- Test-Suite und Dokumentation an A/UX angepasst.
- unter HP-UX definiert das configure-Script nun _XOPEN_SOURCE_EXTENDED.
- - Server identifizieren sich nun mit asyncronen Passwoertern, d.h. das
+ - Server identifizieren sich nun mit asynchronen Passwoertern, d.h. das
Passwort, welches A an B schickt, kann ein anderes sein als das, welches
B als Antwort an A sendet. In der Konfig.-Datei, Abschnitt "Server",
wurde "Password" dazu durch "MyPassword" und "PeerPassword" ersetzt.
@@ -927,7 +927,7 @@ ngIRCd 0.5.0, 20.09.2002
- Protokoll- und Server-ID bei PASS-Befehlen auf neues Format umgestellt;
bei empfangenen PASS-Befehlen werden diese zudem nun auch ausgewertet.
Die unterstuetzten Flags sind in doc/Protocol.txt beschrieben.
- - mit dem neuen Befehl CHANINFO syncronisieren Server, die das IRC+-
+ - mit dem neuen Befehl CHANINFO synchronisieren Server, die das IRC+-
Protokoll unterstuetzen, Channel-Modes und Topics.
- neue Option "--disable-ircplus" fuer das configure-Script, um das
IRC+-Protokoll abzuschalten (per Default ist es aktiviert).
@@ -1032,7 +1032,7 @@ ngIRCd 0.3.0, 02.03.2002
- PRIVMSG beachtet nun die Channel-Modes "n" und "m".
- AWAY implementiert. PRIVMSG, MODE, USERHOST und WHOIS angepasst.
- der ngIRCd unterstuetzt nun Channel-Topics (TOPIC-Befehl).
- - ausgehende Server-Verbindungen werden nun asyncron connectiert und
+ - ausgehende Server-Verbindungen werden nun asynchron connectiert und
blockieren nicht mehr den ganzen Server, wenn die Gegenseite nicht
erreicht werden kann (bis zum Timeout konnten Minuten vergehen!).
- Wert der Konfigurations-Variable "ConnectRetry" wird besser beachtet.
@@ -1111,7 +1111,7 @@ ngIRCd 0.0.2, 06.01.2002
- NICK kann nun die Gross- und Kleinschreibung eines Nicks aendern.
- ein Server-Passwort ist nun konfigurierbar.
- neue Befehle: ERROR, SERVER, NJOIN (nur als "Fake"), SQUIT.
- - Asyncroner Resolver Hostname->IP implementiert.
+ - Asynchroner Resolver Hostname->IP implementiert.
- Server-Links teilweise implementiert: bisher kann der ngIRCd jedoch
nur "leafed server" sein, d.h. keine "Client-Server" haben. Einige
Befehle sind auch noch nicht (optimal) angepasst: PRIVMSG funktioniert
diff --git a/NEWS b/NEWS
index 3602a4d..9365ec6 100644
--- a/NEWS
+++ b/NEWS
@@ -351,7 +351,7 @@ ngIRCd 0.6.0, 2002-12-24
ausgehende Verbindung zu diesem auufzubauen. Dadurch kann nun auf beiden
Servern in der Konfiguration ein Port fuer den Connect konfiguriert
werden (beide Server versuchen sich dann gegenseitig zu connectieren).
- - Server identifizieren sich nun mit asyncronen Passwoertern, d.h. das
+ - Server identifizieren sich nun mit asynchronen Passwoertern, d.h. das
Passwort, welches A an B schickt, kann ein anderes sein als das, welches
B als Antwort an A sendet. In der Konfig.-Datei, Abschnitt "Server",
wurde "Password" dazu durch "MyPassword" und "PeerPassword" ersetzt.
@@ -377,7 +377,7 @@ ngIRCd 0.5.0, 20.09.2002
Konfiguration "sample-ngircd.conf") und bleiben auch dann bestehen,
wenn kein User mehr im Channel ist.
- neue IRC-Befehle: KICK, INVITE, ADMIN, CHANINFO; LIST wurde erweitert.
- Mit dem neuen Befehl CHANINFO syncronisieren Server, die das IRC+-
+ Mit dem neuen Befehl CHANINFO synchronisieren Server, die das IRC+-
Protokoll unterstuetzen, Channel-Modes und Topics. Fuer den ADMIN-Befehl
gibt es neue Konfigurationsoptionen (Sektion "Global"): "AdminInfo1",
"AdminInfo2" und "AdminEMail".
diff --git a/configure.in b/configure.in
index d2241f6..fb08778 100644
--- a/configure.in
+++ b/configure.in
@@ -340,7 +340,7 @@ else
fi
if test "$x_io_backend" = "none"; then
- AC_MSG_ERROR([No useabe IO API activated/found!?])
+ AC_MSG_ERROR([No useable IO API activated/found!?])
fi
# use SSL?
diff --git a/src/ngircd/array.h b/src/ngircd/array.h
index f461162..fd428db 100644
--- a/src/ngircd/array.h
+++ b/src/ngircd/array.h
@@ -84,7 +84,7 @@ extern void* array_get PARAMS((array* a, size_t membersize, size_t pos));
/* free the contents of this array. */
extern void array_free PARAMS((array* a));
-/* overwrite array with zeroes before free */
+/* overwrite array with zeros before free */
extern void array_free_wipe PARAMS((array* a));
/* return pointer to first element in this array */
diff --git a/src/ngircd/client.c b/src/ngircd/client.c
index 16c551f..d1f751d 100644
--- a/src/ngircd/client.c
+++ b/src/ngircd/client.c
@@ -768,7 +768,7 @@ Client_NextHop( CLIENT *Client )
* Return ID of a client: "client!user@host"
* This client ID is used for IRC prefixes, for example.
* Please note that this function uses a global static buffer, so you can't
- * nest invocations without overwriting erlier results!
+ * nest invocations without overwriting earlier results!
* @param Client Pointer to client structure
* @return Pointer to global buffer containing the client ID
*/
@@ -793,7 +793,7 @@ Client_Mask( CLIENT *Client )
* Return ID of a client with cloaked hostname: "client!user@server-name"
* This client ID is used for IRC prefixes, for example.
* Please note that this function uses a global static buffer, so you can't
- * nest invocations without overwriting erlier results!
+ * nest invocations without overwriting earlier results!
* If the client has not enabled cloaking, the real hostname is used.
* @param Client Pointer to client structure
* @return Pointer to global buffer containing the client ID
diff --git a/src/ngircd/conf.h b/src/ngircd/conf.h
index afc0afa..5a6fff8 100644
--- a/src/ngircd/conf.h
+++ b/src/ngircd/conf.h
@@ -154,7 +154,7 @@ GLOBAL bool Conf_OperCanMode;
/**
* If true, mask channel MODE commands of IRC operators to the server.
* Background: ircd2 will ignore channel MODE commands if an IRC operator
- * gives chanel operator privileges to someone without being a channel operator
+ * gives channel operator privileges to someone without being a channel operator
* himself. This enables a workaround: it masks the MODE command as coming
* from the IRC server and not the IRC operator.
*/
diff --git a/src/ngircd/conn.c b/src/ngircd/conn.c
index 4a2f49c..d9d73e8 100644
--- a/src/ngircd/conn.c
+++ b/src/ngircd/conn.c
@@ -370,7 +370,7 @@ cb_clientserver_ssl(int sock, short what)
/**
- * Initialite connecion module.
+ * Initialize connecion module.
*/
GLOBAL void
Conn_Init( void )
@@ -1014,7 +1014,7 @@ Conn_Write( CONN_ID Idx, char *Data, size_t Len )
GLOBAL void
Conn_Close( CONN_ID Idx, const char *LogMsg, const char *FwdMsg, bool InformClient )
{
- /* Close connection. Open pipes of asyncronous resolver
+ /* Close connection. Open pipes of asynchronous resolver
* sub-processes are closed down. */
CLIENT *c;
diff --git a/src/ngircd/irc-channel.c b/src/ngircd/irc-channel.c
index 233e173..cc70eb4 100644
--- a/src/ngircd/irc-channel.c
+++ b/src/ngircd/irc-channel.c
@@ -244,7 +244,7 @@ join_forward(CLIENT *Client, CLIENT *target, CHANNEL *chan,
IRC_WriteStrChannelPrefix(Client, chan, target, false,
"JOIN :%s", channame);
- /* syncronize channel modes */
+ /* synchronize channel modes */
if (modes[1]) {
IRC_WriteStrChannelPrefix(Client, chan, target, false,
"MODE %s +%s %s", channame,
Module: ngircd.git
Branch: master
Commit: 1d29a59f7eff92ac2b9afe493ad9cdb801e80acc
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=1d29a59f…
Author: Alexander Barton <alex(a)barton.de>
Date: Fri Dec 30 00:36:26 2011 +0100
Update our Debian package descriptions with "official" ones
See Debian Bug #648241 for details.
---
contrib/Debian/control | 57 +++++++++++++++--------------------------------
1 files changed, 18 insertions(+), 39 deletions(-)
diff --git a/contrib/Debian/control b/contrib/Debian/control
index bccbcb9..bdb2319 100644
--- a/contrib/Debian/control
+++ b/contrib/Debian/control
@@ -9,57 +9,45 @@ Package: ngircd
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Provides: ircd
-Description: A lightweight daemon for the Internet Relay Chat (IRC)
- ngIRCd is a free open source daemon for the Internet Relay Chat (IRC)
- network. It is written from scratch and is not based upon the original
- IRCd like many others.
+Description: lightweight Internet Relay Chat server
+ This package provides ngIRCd, a lightweight Internet Relay Chat
+ server for small or private networks. It is simple to configure, can
+ cope with dynamic IP addresses, and supports IPv6 as well as SSL. It
+ is written from scratch, not based on the original IRCd and quite
+ portable.
.
This package contains the "standard distribution", including support for
syslog logging and compressed server-links using zlib. Please have a look
at the "ngircd-full" package if you need advanced functionality like support
for IPv6 or SSL.
- .
- Advantages of ngIRCd:
- - no problems with servers using changing/non-static IP addresses.
- - small and lean configuration file.
- - free, modern and open source C code.
- - still under active development.
- .
- ngIRCd is compatible to the "original" ircd 2.10.3p3, so you can run
- mixed networks.
Package: ngircd-full
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Provides: ircd
Conflicts: ngircd, ngircd-dbg
-Description: A lightweight daemon for the Internet Relay Chat (IRC)
- ngIRCd is a free open source daemon for the Internet Relay Chat (IRC)
- network. It is written from scratch and is not based upon the original
- IRCd like many others.
+Description: lightweight Internet Relay Chat server
+ This package provides ngIRCd, a lightweight Internet Relay Chat
+ server for small or private networks. It is simple to configure, can
+ cope with dynamic IP addresses, and supports IPv6 as well as SSL. It
+ is written from scratch, not based on the original IRCd and quite
+ portable.
.
In addition to the features of the "standard package", this package
includes support for TCP wrappers, IDENT requests, the IPv6 protocol and
SSL encrypted client and server links.
- .
- Advantages of ngIRCd:
- - no problems with servers using changing/non-static IP addresses.
- - small and lean configuration file.
- - free, modern and open source C code.
- - still under active development.
- .
- ngIRCd is compatible to the "original" ircd 2.10.3p3, so you can run
- mixed networks.
Package: ngircd-full-dbg
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Provides: ircd
Conflicts: ngircd, ngircd-full
-Description: A lightweight daemon for the Internet Relay Chat (IRC)
- ngIRCd is a free open source daemon for the Internet Relay Chat (IRC)
- network. It is written from scratch and is not based upon the original
- IRCd like many others.
+Description: lightweight Internet Relay Chat server
+ This package provides ngIRCd, a lightweight Internet Relay Chat
+ server for small or private networks. It is simple to configure, can
+ cope with dynamic IP addresses, and supports IPv6 as well as SSL. It
+ is written from scratch, not based on the original IRCd and quite
+ portable.
.
In addition to the features of the "standard package", this package
includes support for TCP wrappers, IDENT requests, the IPv6 protocol and
@@ -67,12 +55,3 @@ Description: A lightweight daemon for the Internet Relay Chat (IRC)
.
And in addition to the "full" variant, the binaries contained in this
package are build with debug code and contain debug symbols.
- .
- Advantages of ngIRCd:
- - no problems with servers using changing/non-static IP addresses.
- - small and lean configuration file.
- - free, modern and open source C code.
- - still under active development.
- .
- ngIRCd is compatible to the "original" ircd 2.10.3p3, so you can run
- mixed networks.
Module: ngircd.git
Branch: master
Commit: 69fa6f268af88128248523b33b85aa1ab2759a82
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=69fa6f26…
Author: Alexander Barton <alex(a)barton.de>
Date: Wed Dec 28 15:07:24 2011 +0100
LUSERS reply: only count "visible" channels
Rename Channel_Count() to Channel_CountVisible() and only count channels
that are visible to the requesting client, so the existence of secret
channels is no longer revealed by using LUSERS.
Reported by Cahata -- thanks!
---
src/ngircd/channel.c | 21 ++++++++++++++++-----
src/ngircd/channel.h | 2 +-
src/ngircd/irc-info.c | 3 ++-
3 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/src/ngircd/channel.c b/src/ngircd/channel.c
index 2dbf53a..4d323f2 100644
--- a/src/ngircd/channel.c
+++ b/src/ngircd/channel.c
@@ -352,20 +352,31 @@ Channel_Quit( CLIENT *Client, const char *Reason )
} /* Channel_Quit */
+/**
+ * Get number of channels this server knows and that are "visible" to
+ * the given client. If no client is given, all channels will be counted.
+ *
+ * @param Client The client to check or NULL.
+ * @return Number of channels visible to the client.
+ */
GLOBAL unsigned long
-Channel_Count( void )
+Channel_CountVisible (CLIENT *Client)
{
CHANNEL *c;
unsigned long count = 0;
c = My_Channels;
- while( c )
- {
- count++;
+ while(c) {
+ if (Client) {
+ if (!strchr(Channel_Modes(c), 's')
+ || Channel_IsMemberOf(c, Client))
+ count++;
+ } else
+ count++;
c = c->next;
}
return count;
-} /* Channel_Count */
+}
GLOBAL unsigned long
diff --git a/src/ngircd/channel.h b/src/ngircd/channel.h
index f44e194..ba3f2ca 100644
--- a/src/ngircd/channel.h
+++ b/src/ngircd/channel.h
@@ -72,7 +72,7 @@ GLOBAL void Channel_Quit PARAMS(( CLIENT *Client, const char *Reason ));
GLOBAL void Channel_Kick PARAMS((CLIENT *Peer, CLIENT *Target, CLIENT *Origin,
const char *Name, const char *Reason));
-GLOBAL unsigned long Channel_Count PARAMS(( void ));
+GLOBAL unsigned long Channel_CountVisible PARAMS((CLIENT *Client));
GLOBAL unsigned long Channel_MemberCount PARAMS(( CHANNEL *Chan ));
GLOBAL int Channel_CountForUser PARAMS(( CLIENT *Client ));
diff --git a/src/ngircd/irc-info.c b/src/ngircd/irc-info.c
index cdd03bb..0119257 100644
--- a/src/ngircd/irc-info.c
+++ b/src/ngircd/irc-info.c
@@ -1317,7 +1317,8 @@ IRC_Send_LUSERS(CLIENT *Client)
/* Number of created channels */
if (!IRC_WriteStrClient(Client, RPL_LUSERCHANNELS_MSG,
- Client_ID(Client), Channel_Count()))
+ Client_ID(Client),
+ Channel_CountVisible(Client)))
return DISCONNECTED;
/* Number of local users, services and servers */