Very minor simplification/cleanup of is_channel()
This commit is contained in:
parent
b9803e69d1
commit
e347375cb3
|
@ -321,7 +321,7 @@ extern int cpu_saver;
|
||||||
extern struct sockaddr_foobar local_ip_address;
|
extern struct sockaddr_foobar local_ip_address;
|
||||||
|
|
||||||
|
|
||||||
int BX_is_channel (char *);
|
int BX_is_channel (const char *);
|
||||||
void BX_irc_exit (int, char *, char *, ...);
|
void BX_irc_exit (int, char *, char *, ...);
|
||||||
void BX_beep_em (int);
|
void BX_beep_em (int);
|
||||||
void got_initial_version (char *);
|
void got_initial_version (char *);
|
||||||
|
|
|
@ -404,7 +404,7 @@ extern Function_ptr *global;
|
||||||
#define add_completion_type (*(int (*)(char *, int , enum completion ))global[ADD_COMPLETION_TYPE])
|
#define add_completion_type (*(int (*)(char *, int , enum completion ))global[ADD_COMPLETION_TYPE])
|
||||||
|
|
||||||
/* names.c */
|
/* names.c */
|
||||||
#define is_channel (*(int (*)(char *))global[IS_CHANNEL])
|
#define is_channel (*(int (*)(const char *))global[IS_CHANNEL])
|
||||||
#define make_channel (*(char *(*)(char *))global[MAKE_CHANNEL])
|
#define make_channel (*(char *(*)(char *))global[MAKE_CHANNEL])
|
||||||
#define is_chanop (*(int (*)(char *, char *))global[IS_CHANOP])
|
#define is_chanop (*(int (*)(char *, char *))global[IS_CHANOP])
|
||||||
#define is_halfop (*(int (*)(char *, char *))global[IS_HALFOP])
|
#define is_halfop (*(int (*)(char *, char *))global[IS_HALFOP])
|
||||||
|
|
|
@ -285,15 +285,13 @@ int annoy_kicks(int list_type, char *to, char *from, char *ptr, NickList *nick)
|
||||||
* begins with MULTI_CHANNEL and has no '*', or STRING_CHANNEL, then its a
|
* begins with MULTI_CHANNEL and has no '*', or STRING_CHANNEL, then its a
|
||||||
* channel
|
* channel
|
||||||
*/
|
*/
|
||||||
int BX_is_channel(char *to)
|
int BX_is_channel(const char *to)
|
||||||
{
|
{
|
||||||
if (!to || !*to)
|
return to &&
|
||||||
return 0;
|
(*to == MULTI_CHANNEL ||
|
||||||
|
*to == STRING_CHANNEL ||
|
||||||
return ( (to) && ((*to == MULTI_CHANNEL)
|
*to == ID_CHANNEL ||
|
||||||
|| (*to == STRING_CHANNEL)
|
*to == LOCAL_CHANNEL);
|
||||||
|| (*to == ID_CHANNEL)
|
|
||||||
|| (*to == LOCAL_CHANNEL)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue