1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 04:18:12 +00:00

IRCClient: Add handling of some basic messages and commands.

This commit is contained in:
Andreas Kling 2019-03-16 12:21:42 +01:00
parent b4f787090c
commit f44ba6a4c6
5 changed files with 123 additions and 3 deletions

View file

@ -51,7 +51,10 @@ GVariant IRCLogBufferModel::data(const GModelIndex& index, Role) const
auto* tm = localtime(&entry.timestamp);
return String::format("%02u:%02u:%02u", tm->tm_hour, tm->tm_min, tm->tm_sec);
}
case Column::Name: return String::format("<%c%s>", entry.prefix ? entry.prefix : ' ', entry.sender.characters());
case Column::Name:
if (entry.sender.is_empty())
return String::empty();
return String::format("<%c%s>", entry.prefix ? entry.prefix : ' ', entry.sender.characters());
case Column::Text: return entry.text;
}
ASSERT_NOT_REACHED();