diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-07-24 13:48:06 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-07-24 13:48:06 -0500 |
commit | b75f7be7994035490fcc32a366321d56b6d65b03 (patch) | |
tree | cb9950bb2e369d55f7fd8c2324932b368d708e62 /app/lib | |
parent | 4415e8b047cbbe9567461dad2dc54798f0eacfac (diff) |
use numeric announcer id
Diffstat (limited to 'app/lib')
-rw-r--r-- | app/lib/bangtags.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/lib/bangtags.rb b/app/lib/bangtags.rb index 0f4dec3f1..41978a95b 100644 --- a/app/lib/bangtags.rb +++ b/app/lib/bangtags.rb @@ -677,12 +677,12 @@ class Bangtags action = tf_cmd[1].downcase case action when 'announce' - announcer = ENV['ANNOUNCEMENTS_USER'] - if announcer.blank? + announcer = ENV['ANNOUNCEMENTS_USER'].to_i + if announcer == 0 @chunks << '<em>No announcer set.</em>' next end - announcer = Account.find_local(announcer) + announcer = Account.find_by(id: announcer) if announcer.blank? @chunks << '<em>Announcer account missing.</em>' next @@ -792,12 +792,12 @@ class Bangtags @chunks << html_entities.encode(result).gsub("\n", '<br/>') @chunks << "</code></pre>" when 'announce' - announcer = ENV['ANNOUNCEMENTS_USER'] - if announcer.blank? + announcer = ENV['ANNOUNCEMENTS_USER'].to_i + if announcer == 0 @chunks << '<em>No announcer set.</em>' next end - announcer = Account.find_local(announcer) + announcer = Account.find_by(id: announcer) if announcer.blank? @chunks << '<em>Announcer account missing.</em>' next |