join channels that we're announcing to
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
add_custom_command(
|
||||
OUTPUT irc_commands.inc
|
||||
COMMAND
|
||||
/opt/homebrew/bin/gperf
|
||||
gperf
|
||||
-C -Z IrcCommandHash -K text -L C++ -t
|
||||
--output-file irc_commands.inc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/irc_commands.gperf
|
||||
|
@@ -239,6 +239,11 @@ auto Client::is_channel(std::string_view name) const -> bool
|
||||
return not name.empty() && channel_prefix_.find(name[0]) != channel_prefix_.npos;
|
||||
}
|
||||
|
||||
auto Client::is_on_channel(std::string_view name) const -> bool
|
||||
{
|
||||
return channels_.contains(casemap(name));
|
||||
}
|
||||
|
||||
namespace {
|
||||
template <class... Ts>
|
||||
struct overloaded : Ts...
|
||||
|
@@ -102,6 +102,7 @@ public:
|
||||
auto is_my_nick(std::string_view nick) const -> bool;
|
||||
auto is_my_mask(std::string_view mask) const -> bool;
|
||||
auto is_channel(std::string_view name) const -> bool;
|
||||
auto is_on_channel(std::string_view name) const -> bool;
|
||||
|
||||
auto casemap(std::string_view) const -> std::string;
|
||||
auto casemap_compare(std::string_view, std::string_view) const -> int;
|
||||
|
Reference in New Issue
Block a user