sendChannelInfo method
void
sendChannelInfo(
{ - required Client to,
})
Implementation
void sendChannelInfo({required Client to}) {
if (_clients.length > 1) {
if (_topic != null) {
to.sendNumericWith(NumericReply.RPL_TOPIC, [name], text: _topic);
} else {
to.sendNumericWith(NumericReply.RPL_NOTOPIC, [name]);
}
}
final basePrefix = to.printNumeric(NumericReply.RPL_NAMREPLY);
final prefix = '$basePrefix = $name :';
for (final namlist in members.joinWithPrefix(prefix, maxLength: 510)) {
to.sendRawString(namlist);
}
to.sendNumericWith(NumericReply.RPL_ENDOFNAMES, [name]);
}