1 #!/usr/bin/env ruby --jit
4 Copyright 2019 Wu Ming 2 at wu.ming2@icloud.com
6 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <https://www.gnu.org/licenses/>.
20 require_relative 'script'
23 exit(0) if Proceed::MessagesNotAllowedNow.call
24 # send Age warning anyway
25 BotControl::Send.call(Messages::Age) unless Messages::Age.empty?
26 # if notified OK already do nothing
27 exit(0) if Proceed::BelowThresholdAgain.call
28 # I could compose the four functions
29 BotControl::Send.call(Messages::Message)