Sha256: fc908a48b1c4fc81aae7b752a9fe3c047860b6e698f37619524dc0b23ec2c769
Contents?: true
Size: 513 Bytes
Versions: 7
Compression:
Stored size: 513 Bytes
Contents
class KeikiThwopper < Marvin::Base FROM_REGEXP = /^(sutto)/i THWOP_REGEXP = /(t+h+w+o+m*p+|stab|kill)/i MESSAGES = [ "mwahahahaha", "you totally deserved it", "oi! leave 'em alone!", "say hello to my little friend", "you know, they could have liked that?" ] on_event :incoming_action, :thwop_back def thwop_back return if !from || from !~ FROM_REGEXP || options.message !~ THWOP_REGEXP action "#{$1}s #{from} (#{MESSAGES[rand(MESSAGES.length)]})" end end
Version data entries
7 entries across 7 versions & 2 rubygems