From: Florian Westphal Date: Fri, 6 Mar 2009 23:21:43 +0000 (+0100) Subject: allow creation of persistent modeless channels X-Git-Tag: rel-14-rc1~6 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d4361d088f75bdcbc0deced824e2b3aafbb8fa0;p=ngircd-alex.git allow creation of persistent modeless channels --- 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;