List of channels are saved per-request and not globally
The list would keep the previous results in memory, forever, and the list would grow each time a new request was made (even with results from unrelated servers)…
This commit is contained in:
@@ -368,11 +368,11 @@ void Bridge::send_irc_channel_list_request(const Iid& iid, const std::string& iq
|
|||||||
|
|
||||||
irc->send_list_command();
|
irc->send_list_command();
|
||||||
|
|
||||||
irc_responder_callback_t cb = [this, iid, iq_id, to_jid](const std::string& irc_hostname,
|
std::vector<ListElement> list;
|
||||||
const IrcMessage& message) -> bool
|
|
||||||
{
|
|
||||||
static std::vector<ListElement> list;
|
|
||||||
|
|
||||||
|
irc_responder_callback_t cb = [this, iid, iq_id, to_jid, list=std::move(list)](const std::string& irc_hostname,
|
||||||
|
const IrcMessage& message) mutable -> bool
|
||||||
|
{
|
||||||
if (irc_hostname != iid.get_server())
|
if (irc_hostname != iid.get_server())
|
||||||
return false;
|
return false;
|
||||||
if (message.command == "263" || message.command == "RPL_TRYAGAIN" ||
|
if (message.command == "263" || message.command == "RPL_TRYAGAIN" ||
|
||||||
|
|||||||
Reference in New Issue
Block a user