channel: Move check_channel_name() to a boolean

This commit is contained in:
Matt Ullman 2016-03-24 01:54:39 -04:00
parent 1346cd1151
commit 3a46803fef
2 changed files with 6 additions and 6 deletions

View file

@ -231,7 +231,7 @@ extern void invalidate_bancache_user(struct Client *);
extern void free_channel_list(rb_dlink_list *);
extern int check_channel_name(const char *name);
extern bool check_channel_name(const char *name);
extern void channel_member_names(struct Channel *chptr, struct Client *,
int show_eon);

View file

@ -336,23 +336,23 @@ invalidate_bancache_user(struct Client *client_p)
/* check_channel_name()
*
* input - channel name
* output - 1 if valid channel name, else 0
* output - true if valid channel name, else 0
* side effects -
*/
int
bool
check_channel_name(const char *name)
{
s_assert(name != NULL);
if(name == NULL)
return 0;
return false;
for (; *name; ++name)
{
if(!IsChanChar(*name))
return 0;
return false;
}
return 1;
return true;
}
/* free_channel_list()