about summary refs log tree commit diff
path: root/app/lib/bangtags.rb
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2020-02-19 15:52:47 -0600
committermultiple creatures <dev@multiple-creature.party>2020-02-19 15:52:47 -0600
commit698588143bfb9aa0255bfb472dee4fb011c33646 (patch)
treeaf0453236f9b43ab8f1a22dc41d8b0a51fc384fb /app/lib/bangtags.rb
parent6e218d9e5648264756b33a4b66aea1f44e8f1c2a (diff)
remove print debugging
Diffstat (limited to 'app/lib/bangtags.rb')
-rw-r--r--app/lib/bangtags.rb18
1 files changed, 1 insertions, 17 deletions
diff --git a/app/lib/bangtags.rb b/app/lib/bangtags.rb
index af9649662..d8e47cb8d 100644
--- a/app/lib/bangtags.rb
+++ b/app/lib/bangtags.rb
@@ -12,7 +12,6 @@ class Bangtags
     @user          = @account.user
     @parent_status = Status.find(status.in_reply_to_id) if status.in_reply_to_id
 
-    @debug = true
     @crunch_newlines = false
     @once = false
     @sroff_open = false
@@ -125,19 +124,14 @@ class Bangtags
         next
       elsif @vars['_bangtags:off'] || @vars['_bangtags:skip']
         if chunk.in?(['#!bangtags:on', '#!bangtags:enable'])
-          Rails.logger.info("#{@account.id}: 'bangtags:on' encountered") if @debug
-
           @vars.delete('_bangtags:off')
           @vars.delete('_bangtags:skip')
           next
         end
 
-        Rails.logger.info("#{@account.id}: bangtags off, appending verbaim chunk") if @debug
         @chunks << orig_chunk.gsub("#\ufdd6!", '#!')
         next
       else
-        Rails.logger.info("#{@account.id}: found bangtag token in chunk, parsing it") if @debug
-
         cmd = chunk[2..-1].strip
         next if cmd.blank?
 
@@ -155,12 +149,7 @@ class Bangtags
         end
       end
 
-      if cmd[0].nil?
-        Rails.logger.info("#{@account.id}: chunk has no command") if @debug
-        next
-      end
-
-      Rails.logger.info("#{@account.id}: chunk has command: #{cmd[0].downcase}") if @debug
+      next if cmd[0].nil?
 
       if cmd[0].downcase == 'once'
         @once = true
@@ -170,22 +159,17 @@ class Bangtags
 
       case cmd[0].downcase
       when 'bangtags'
-        Rails.logger.info("#{@account.id}: handing command: #{cmd[0].downcase}") if @debug
-
         chunk = nil
         next if cmd[1].nil?
 
         case cmd[1].downcase
         when 'off', 'disable'
-          Rails.logger.info("#{@account.id}: 'off' encountered") if @debug
           @vars['_bangtags:off'] = true
           next
         when 'skip'
-          Rails.logger.info("#{@account.id}: 'skip' encountered") if @debug
           @vars['_bangtags:skip'] = true
           next
         when 'break'
-          Rails.logger.info("#{@account.id}: 'break' encountered") if @debug
           break
         end