is_member = Channel_IsMemberOf(Chan, Client);
/* Secret channel? */
- if (!is_member && strchr(Channel_Modes(Chan), 's'))
+ if (!is_member && Channel_HasMode(Chan, 's'))
return IRC_WriteStrClient(Client, RPL_ENDOFWHO_MSG,
Client_ID(Client), Channel_Name(Chan));
c = Channel_GetClient(cl2chan);
client_modes = Client_Modes(c);
- is_ircop = strchr(client_modes, 'o') != NULL;
+ is_ircop = Client_HasMode(c, 'o');
if (OnlyOps && !is_ircop)
continue;
- is_visible = strchr(client_modes, 'i') == NULL;
+ is_visible = Client_HasMode(c, 'i');
if (is_member || is_visible) {
strlcpy(flags, who_flags_status(client_modes),
sizeof(flags));
break;
strlcpy(flags, who_flags_status(Client_Modes(c)), sizeof(flags));
- if (strchr(Client_Modes(c), 'o'))
+ if (Client_HasMode(c, 'o'))
strlcat(flags, "*", sizeof(flags));
if (!write_whoreply(Client, c, "*", flags))
cl2chan = Channel_NextChannelOf(c, cl2chan);
/* Secret channel? */
- if (strchr(Channel_Modes(chan), 's')
+ if (Channel_HasMode(chan, 's')
&& !Channel_IsMemberOf(chan, Client))
continue;
return DISCONNECTED;
/* Certificate fingerprint? */
- if (Conn_GetFingerprint(Client_Conn(c)) &&
+ if (Conn_GetCertFp(Client_Conn(c)) &&
from == c &&
!IRC_WriteStrClient(from, RPL_WHOISCERTFP_MSG,
Client_ID(from), Client_ID(c),
- Conn_GetFingerprint(Client_Conn(c))))
+ Conn_GetCertFp(Client_Conn(c))))
return DISCONNECTED;
}
return false;
}
- if (Conn_GetFingerprint(Client_Conn(Client))) {
+ if (Conn_GetCertFp(Client_Conn(Client))) {
snprintf(buf, sizeof(buf),
"Your client certificate fingerprint is: %s",
- Conn_GetFingerprint(Client_Conn(Client)));
+ Conn_GetCertFp(Client_Conn(Client)));
if (!IRC_WriteStrClient(Client, RPL_MOTD_MSG,
Client_ID(Client), buf))
return false;
while (c) {
if (Client_Type(c) == CLIENT_USER
&& Channel_FirstChannelOf(c) == NULL
- && !strchr(Client_Modes(c), 'i'))
+ && !Client_HasMode(c, 'i'))
{
/* its a user, concatenate ... */
if (rpl[strlen(rpl) - 1] != ':')
assert(Client != NULL);
- /* Users, services and serevers in the network */
+ /* Users, services and servers in the network */
if (!IRC_WriteStrClient(Client, RPL_LUSERCLIENT_MSG, Client_ID(Client),
Client_UserCount(), Client_ServiceCount(),
Client_ServerCount()))
return CONNECTED;
/* Secret channel? */
- if (!is_member && strchr(Channel_Modes(Chan), 's'))
+ if (!is_member && Channel_HasMode(Chan, 's'))
return CONNECTED;
snprintf(str, sizeof(str), RPL_NAMREPLY_MSG, Client_ID(Client), "=",
while (cl2chan) {
cl = Channel_GetClient(cl2chan);
- if (strchr(Client_Modes(cl), 'i'))
+ if (Client_HasMode(cl, 'i'))
is_visible = false;
else
is_visible = true;
IRC_Send_ISUPPORT(CLIENT * Client)
{
if (!IRC_WriteStrClient(Client, RPL_ISUPPORT1_MSG, Client_ID(Client),
- Conf_MaxJoins))
+ CHANTYPES, CHANTYPES, Conf_MaxJoins))
return DISCONNECTED;
return IRC_WriteStrClient(Client, RPL_ISUPPORT2_MSG, Client_ID(Client),
CHANNEL_NAME_LEN - 1, Conf_MaxNickLength - 1,