/* Check features of remote server */
njoin = Conn_Options(Client_Conn(Client)) & CONN_RFC1459 ? false : true;
- xop = strchr(Client_Flags(Client), 'X') ? true : false;
+ xop = Client_HasFlag(Client, 'X') ? true : false;
/* Get all the members of this channel */
cl2chan = Channel_FirstMember(Chan);
strlcat(str, ",", sizeof(str));
/* Prepare user prefix (ChanOp, voiced, ...) */
- if (xop && strchr(Channel_UserModes(Chan, cl), 'q'))
+ if (xop && Channel_UserHasMode(Chan, cl, 'q'))
strlcat(str, "~", sizeof(str));
- if (xop && strchr(Channel_UserModes(Chan, cl), 'a'))
+ if (xop && Channel_UserHasMode(Chan, cl, 'a'))
strlcat(str, "&", sizeof(str));
- if (strchr(Channel_UserModes(Chan, cl), 'o'))
+ if (Channel_UserHasMode(Chan, cl, 'o'))
strlcat(str, "@", sizeof(str));
- if (xop && strchr(Channel_UserModes(Chan, cl), 'h'))
+ if (xop && Channel_UserHasMode(Chan, cl, 'h'))
strlcat(str, "%", sizeof(str));
- if (strchr(Channel_UserModes(Chan, cl), 'v'))
+ if (Channel_UserHasMode(Chan, cl, 'v'))
strlcat(str, "+", sizeof(str));
strlcat(str, Client_ID(cl), sizeof(str));
if (!*modes && !*topic)
return CONNECTED;
- has_k = strchr(modes, 'k') != NULL;
- has_l = strchr(modes, 'l') != NULL;
+ has_k = Channel_HasMode(Chan, 'k');
+ has_l = Channel_HasMode(Chan, 'l');
/* send CHANINFO */
if (!has_k && !has_l) {
}
#ifdef IRCPLUS
/* Send CHANINFO if the peer supports it */
- if (strchr(Client_Flags(Client), 'C')) {
+ if (Client_HasFlag(Client, 'C')) {
if (!Send_CHANINFO(Client, chan))
return DISCONNECTED;
}
}
#ifdef IRCPLUS
- if (strchr(Client_Flags(Client), 'L')) {
+ if (Client_HasFlag(Client, 'L')) {
LogDebug("Synchronizing INVITE- and BAN-lists ...");
if (!Synchronize_Lists(Client))
return DISCONNECTED;