diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-05-05 00:38:18 +0100 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-05-05 00:38:18 +0100 |
commit | 94383231eddf56112cf74f2ae65d691821d70803 (patch) | |
tree | 96b1935db9543b3777a7431cbbdc934456214f69 /irc_channel.c | |
parent | eb504957c2ffa1a3130951d5381672fb3ef9dfd9 (diff) |
Use irc_channel_name_ok() and check if a channel with that name already
exists before creating it.
Diffstat (limited to 'irc_channel.c')
-rw-r--r-- | irc_channel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/irc_channel.c b/irc_channel.c index 2988837e..63c46d95 100644 --- a/irc_channel.c +++ b/irc_channel.c @@ -32,7 +32,7 @@ irc_channel_t *irc_channel_new( irc_t *irc, const char *name ) { irc_channel_t *ic; - if( strchr( CTYPES, name[0] ) == NULL || !nick_ok( name + 1 ) ) + if( !irc_channel_name_ok( name ) || irc_channel_by_name( irc, name ) ) return NULL; ic = g_new0( irc_channel_t, 1 ); |