about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2009-03-07 00:21:43 +0100
committerFlorian Westphal <fw@strlen.de>2009-03-07 00:21:43 +0100
commit2d4361d088f75bdcbc0deced824e2b3aafbb8fa0 (patch)
treefa05ff743089bf1b740f4aa9e771b1e4aead24b5 /src
parente9e7fc33f15d7ead5f547ebdfcc7836b75f54f83 (diff)
downloadngircd-2d4361d088f75bdcbc0deced824e2b3aafbb8fa0.tar.gz
ngircd-2d4361d088f75bdcbc0deced824e2b3aafbb8fa0.zip
allow creation of persistent modeless channels
Diffstat (limited to 'src')
-rw-r--r--src/ngircd/conf.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/ngircd/conf.c b/src/ngircd/conf.c
index 4a8b6283..71f5760b 100644
--- a/src/ngircd/conf.c
+++ b/src/ngircd/conf.c
@@ -40,6 +40,7 @@
 #include "ngircd.h"
 #include "conn.h"
 #include "client.h"
+#include "channel.h"
 #include "defines.h"
 #include "log.h"
 #include "match.h"
@@ -1169,10 +1170,11 @@ Handle_Channelname(struct Conf_Channel *new_chan, const char *name)
 	size_t size = sizeof(new_chan->name);
 	char *dest = new_chan->name;
 
-	/* Channels names must begin with "&" or "#", if it is
-	 * missing, add a '#'. This is only here for user convenience.
-	 */
-	if (*name && *name != '#' && *name != '&') {
+	if (!Channel_IsValidName(name)) {
+		/*
+		 * maybe user forgot to add a '#'.
+		 * This is only here for user convenience.
+		 */
 		*dest = '#';
 		--size;
 		++dest;