about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ngircd/irc-info.c8
-rw-r--r--src/ngircd/irc-login.c7
-rw-r--r--src/ngircd/ngircd.c1
-rw-r--r--src/ngircd/sighandlers.c1
4 files changed, 11 insertions, 6 deletions
diff --git a/src/ngircd/irc-info.c b/src/ngircd/irc-info.c
index 6eb8d942..fc04773a 100644
--- a/src/ngircd/irc-info.c
+++ b/src/ngircd/irc-info.c
@@ -1595,10 +1595,10 @@ IRC_Send_NAMES(CLIENT * Client, CHANNEL * Chan)
 		if (is_member || is_visible) {
 			if (str[strlen(str) - 1] != ':')
 				strlcat(str, " ", sizeof(str));
-			if (Client_Cap(cl) & CLIENT_CAP_MULTI_PREFIX) {
-				if (strchr(Channel_UserModes(Chan, cl), 'o') &&
-				    strchr(Channel_UserModes(Chan, cl), 'v'))
-					strlcat(str, "@+", sizeof(str));
+			if (Client_Cap(Client) & CLIENT_CAP_MULTI_PREFIX && 
+					strchr(Channel_UserModes(Chan, cl), 'o') &&
+					strchr(Channel_UserModes(Chan, cl), 'v')) {
+				strlcat(str, "@+", sizeof(str));
 			} else {
 				if (strchr(Channel_UserModes(Chan, cl), 'o'))
 					strlcat(str, "@", sizeof(str));
diff --git a/src/ngircd/irc-login.c b/src/ngircd/irc-login.c
index 9e1abdd5..74d8b9d1 100644
--- a/src/ngircd/irc-login.c
+++ b/src/ngircd/irc-login.c
@@ -418,12 +418,15 @@ IRC_USER(CLIENT * Client, REQUEST * Req)
 						  Client_ID(Client),
 						  Req->command);
 
-		/* User name: only alphanumeric characters are allowed! */
+		/* User name: only alphanumeric characters and limited
+		   punctuation is allowed.*/
 		ptr = Req->argv[0];
 		while (*ptr) {
 			if ((*ptr < '0' || *ptr > '9') &&
 			    (*ptr < 'A' || *ptr > 'Z') &&
-			    (*ptr < 'a' || *ptr > 'z')) {
+			    (*ptr < 'a' || *ptr > 'z') &&
+			    (*ptr != '+') && (*ptr != '-') &&
+			    (*ptr != '.') && (*ptr != '_')) {
 				Conn_Close(Client_Conn(Client), NULL,
 					   "Invalid user name", true);
 				return DISCONNECTED;
diff --git a/src/ngircd/ngircd.c b/src/ngircd/ngircd.c
index 44c4ca79..7397ee02 100644
--- a/src/ngircd/ngircd.c
+++ b/src/ngircd/ngircd.c
@@ -330,6 +330,7 @@ main(int argc, const char *argv[])
 		Channel_Exit();
 		Class_Exit();
 		Log_Exit();
+		Signals_Exit();
 	}
 	Pidfile_Delete();
 
diff --git a/src/ngircd/sighandlers.c b/src/ngircd/sighandlers.c
index efb41bcd..a219105f 100644
--- a/src/ngircd/sighandlers.c
+++ b/src/ngircd/sighandlers.c
@@ -334,6 +334,7 @@ Signals_Exit(void)
 #endif
 	close(signalpipe[1]);
 	close(signalpipe[0]);
+	signalpipe[0] = signalpipe[1] = 0;
 }
 
 /* -eof- */