]> arthur.barton.de Git - ngircd-alex.git/commitdiff
allow creation of persistent modeless channels
authorFlorian Westphal <fw@strlen.de>
Fri, 6 Mar 2009 23:21:43 +0000 (00:21 +0100)
committerFlorian Westphal <fw@strlen.de>
Fri, 6 Mar 2009 23:21:43 +0000 (00:21 +0100)
src/ngircd/conf.c

index 4a8b6283a4f8136d27a4e23f0cc1629a7e7e3f85..71f5760bd59dede7c58903f6bd98a41c8a262c06 100644 (file)
@@ -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;