diff --git a/src/davetest/dave.cpp b/src/davetest/dave.cpp index 72bac9231b..94812e0d89 100644 --- a/src/davetest/dave.cpp +++ b/src/davetest/dave.cpp @@ -80,7 +80,7 @@ int main() { dave_test.on_guild_create([&](const dpp::guild_create_t & event) { if (event.created->id == TEST_GUILD_ID) { dpp::discord_client* s = dave_test.get_shard(0); - bool muted = false, deaf = false, enable_dave = false; + bool muted = false, deaf = false, enable_dave = true; s->connect_voice(TEST_GUILD_ID, TEST_VC_ID, muted, deaf, enable_dave); } }); diff --git a/src/dpp/sslclient.cpp b/src/dpp/sslclient.cpp index 7fb71696cf..4e81c0f887 100644 --- a/src/dpp/sslclient.cpp +++ b/src/dpp/sslclient.cpp @@ -373,10 +373,10 @@ void ssl_client::on_read(socket fd, const struct socket_events& ev) { } void ssl_client::on_write(socket fd, const struct socket_events& e) { - /* We wanted write before so keep it */ - socket_events se{e}; - se.flags |= WANT_WRITE; - owner->socketengine->update_socket(se); + /* We wanted to write before so keep it */ + socket_events new_se{e}; + new_se.flags |= WANT_WRITE; + owner->socketengine->update_socket(new_se); if (!tcp_connect_done) { tcp_connect_done = true; diff --git a/src/unittest/test.cpp b/src/unittest/test.cpp index 955d6f3781..bded8f1efd 100644 --- a/src/unittest/test.cpp +++ b/src/unittest/test.cpp @@ -1135,7 +1135,7 @@ Markdown lol \\|\\|spoiler\\|\\| \\~\\~strikethrough\\~\\~ \\`small \\*code\\* b } }); - bot.on_guild_create([](const dpp::guild_create_t & event) { + bot.on_guild_create([&bot](const dpp::guild_create_t & event) { if (event.created->id == TEST_GUILD_ID) { set_test(GUILDCREATE, true); if (event.presences.size() && event.presences.begin()->second.user_id > 0) { @@ -1146,8 +1146,8 @@ Markdown lol \\|\\|spoiler\\|\\| \\~\\~strikethrough\\~\\~ \\`small \\*code\\* b if (g) { set_test(CACHE, true); set_test(VOICECONN, false); - //dpp::discord_client* s = bot.get_shard(0); - //s->connect_voice(g->id, TEST_VC_ID, false, false); + dpp::discord_client* s = bot.get_shard(0); + s->connect_voice(g->id, TEST_VC_ID, false, false); } else { set_test(CACHE, false);