Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

bot: Give: Fix some pattern

  • Loading branch information...
commit 789383812ba9a8f0e88ca6f87c482178b3283a43 1 parent 9d49da9
@icy icy authored
Showing with 10 additions and 12 deletions.
  1. +10 −12 bot/bot.rb
View
22 bot/bot.rb
@@ -110,19 +110,17 @@ def give_something(m, someone, section, args)
wiki ? "https://wiki.archlinux.org/index.php/Special:Search/#{wiki}" : nil
when "tinyurl" then
tinyurl(args)
- else
- if gs = args.match(/^some ([^ ]+)/)
- case gs[1]
- when "thanks" then "Thank you very much"
- when "shit" then "Oh, you ... s^ck"
- when "hugs" then "Oh, let me hold you tide"
- when "kiss" then "Kiss you a thousand times"
- when "helps" then "You wanna try google instead"
- else "#{m.user.nick} wants me to delivery to you some #{gs[1}"
- end
- else
- ""
+ when "some"
+ case args
+ when "thanks" then "Thank you very much"
+ when "shit" then "Oh, you ... s^ck"
+ when "hugs" then "Oh, let me hold you tide"
+ when "kiss" then "Kiss you a thousand times"
+ when "helps" then "You wanna try google instead"
+ else "#{m.user.nick} wants me to delivery to you some #{args}"
end
+ else
+ ""
end
if text
Please sign in to comment.
Something went wrong with that request. Please try again.