summaryrefslogtreecommitdiff
path: root/src/timer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/timer.cpp')
-rw-r--r--src/timer.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/timer.cpp b/src/timer.cpp
index ccdf176..055dde0 100644
--- a/src/timer.cpp
+++ b/src/timer.cpp
@@ -38,11 +38,11 @@ namespace bot {
now - last_executed_at);
if (difference.count() > interval_sec) {
- pqxx::result channels =
- work->exec("SELECT alias_name FROM channels WHERE id = " +
- std::to_string(channel_id));
+ pqxx::result channels = work->exec(
+ "SELECT alias_name, opted_out_at FROM channels WHERE id = " +
+ std::to_string(channel_id));
- if (!channels.empty()) {
+ if (!channels.empty() && channels[0][1].is_null()) {
std::string alias_name = channels[0][0].as<std::string>();
irc_client->say(alias_name, message);