mirror of
https://github.com/matrix-construct/construct
synced 2024-12-25 23:14:13 +01:00
channel: Move check_channel_name() to a boolean
This commit is contained in:
parent
1346cd1151
commit
3a46803fef
2 changed files with 6 additions and 6 deletions
|
@ -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);
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue