about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-05-19 17:30:15 -0500
committermultiple creatures <dev@multiple-creature.party>2019-05-21 03:16:51 -0500
commit06b8b09fca4a9f73003dc82f44dfd80ca260f828 (patch)
treeb7629aaf5a8bd563c68fc0e89730a286395ea431 /app
parent0f50698bebc1875a41fbbd3b10ff6b6fc9bfb7f2 (diff)
add `keysmash` bangtag
Diffstat (limited to 'app')
-rw-r--r--app/lib/bangtags.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/app/lib/bangtags.rb b/app/lib/bangtags.rb
index 33dc33af6..33721e0c2 100644
--- a/app/lib/bangtags.rb
+++ b/app/lib/bangtags.rb
@@ -455,6 +455,24 @@ class Bangtags
           }
           v = cmd[1].downcase
           status.visibility = visibilities[v] unless visibilities[v].nil?
+        when 'keysmash'
+          keyboard = [
+            'asdf', 'jkl;',
+            'gh', "'",
+            'we', 'io',
+            'r', 'u',
+            'cv', 'nm',
+            't', 'x', ',',
+            'q', 'z',
+            'y', 'b',
+            'p', '[',
+            '.', '/',
+            ']', "\\",
+          ]
+
+          chunk = rand(6..33).times.collect do
+            keyboard[(keyboard.size * (rand ** 3)).floor].split('').sample
+          end
         end
       end