Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base: master
...
compare: master
Checking mergeability… Don’t worry, you can still create the pull request.
  • 16 commits
  • 1 file changed
  • 0 commit comments
  • 3 contributors
Commits on Dec 02, 2011
Ben Kempner Merge pull request #1 from bordicon/master
added cleverness
fd1f83b
Ben Kempner changing it up 3fc9597
Ben Kempner foosbotery b108381
Ben Kempner remove duplicate foosbot response 9028cc0
Commits on Dec 17, 2011
Rohan Dhaimade adding emoticons 4400222
Ben Kempner Merge pull request #2 from HaloZero/master
adding unflip
0c7f33c
Commits on Jan 27, 2012
Ben Kempner tweaks 75e1fc5
Commits on Feb 15, 2012
Ben Kempner greetings, tweaks e7ec8b6
Commits on Mar 19, 2012
Ben Kempner remove rohan from sicklist 8aa8d48
Commits on May 14, 2012
Ben Kempner connect to new port bc09535
Commits on May 16, 2012
Ben Kempner pairing joins 97775c8
Commits on May 21, 2012
@heidi heidi Change "kthxbye" to "kthxbai" 55719e0
Ben Kempner Merge pull request #3 from heidiho/master
Hi!
41863db
Commits on Jul 03, 2012
Ben Kempner use cool names 40d6b5b
Ben Kempner use real room bdffe72
Commits on Jul 20, 2012
Ben Kempner hi jenkins 6e73913
Showing with 145 additions and 30 deletions.
  1. +145 −30 foosbot.rb
View
175 foosbot.rb
@@ -1,40 +1,136 @@
+# encoding: utf-8
require 'cinch'
require 'cleverbot'
bot = Cinch::Bot.new do
configure do |c|
c.server = "irc.jlatt.com"
- c.port = 6697
+ c.port = 9999
c.nick = 'foosbot'
- c.password = 'smellyoulater'
+ c.password = 'foosball'
c.ssl = true
- c.channels = ["#verticalbrands foosball", "#foosbot-test"]
+ #c.channels = ["#foosbot-test3"]
+ #c.channels = ["#verticalbrands foosball", "#foosbot-test"]
+ c.channels = ["#verticalbrands", "#foosbot-test"]
@game = false
@players = []
- @blacklist = ['foosbot', 'matt', 'matt_', 'Kyle', 'Kyle_']
+ @blacklist = ['foosbot', 'matt', 'matt_', 'Kyle', 'Kyle_', 'ChrisH']
+ @sicklist = []
+ @brolist = []
@cleverbot = Cleverbot::Client.new
+
+ @cool_names =
+ ["Slab Bulkhead",
+ "Fridge Largemeat",
+ "Punt Speedchunk",
+ "Butch Deadlift",
+ "Bold Bigflank",
+ "Splint Chesthair",
+ "Flint Ironstag",
+ "Bolt Vanderhuge",
+ "Thick McRunfast",
+ "Blast Hardcheese",
+ "Buff Drinklots",
+ "Trunk Slamchest",
+ "Fist Rockbone",
+ "Stump Beefgnaw",
+ "Smash Lampjaw",
+ "Punch Rockgroin",
+ "Buck Plankchest",
+ "Stump Chunkman",
+ "Dirk Hardpeck",
+ "Rip Steakface",
+ "Slate Slabrock",
+ "Crud Bonemeal",
+ "Brick Hardmeat",
+ "Rip Sidecheek",
+ "Punch Sideiron",
+ "Gristle McThornBody",
+ "Slake Fistcrunch",
+ "Buff Hardback",
+ "Bob Johnson",
+ "Blast Thickneck",
+ "Crunch Buttsteak",
+ "Slab Squatthrust",
+ "Lump Beefrock",
+ "Touch Rustrod",
+ "Reef Blastbody",
+ "Big McLargeHuge",
+ "Smoke Manmuscle",
+ "Beat Punchbeef",
+ "Pack Blowfist",
+ "Roll Fizzlebeef"]
+ end
+
+ on :join do |m|
+ greetings = ['bam a lam', 'cocaine is a hell of a gem', '...', 'these pringles are making me thirsty'].shuffle
+ m.reply greetings.first if m.user.nick == bot.nick
end
on :message, "!foos" do |m|
+ if @sicklist.include? m.user.nick
+ m.reply "#{m.user.nick}: Sorry no sick players allowed."
+ return nil
+ end
+
+ if @brolist.include? m.user.nick
+ m.reply "#{m.user.nick}: Nah, you're too bro'd out brah."
+ return nil
+ end
+
+
if not @game
- m.reply "#{m.user.nick} wants to start a game, who's in? Type !foos to join."
+ #if Random.new.rand(0..6) == 0
+ # m.reply "I'm sorry Dave, I'm afriad I can't do that." if Random.new.rand(0..3) == 0
+ # return nil
+ #end
+
+ name = @cool_names[Random.new.rand(0..@cool_names.size-1)]
+
+ m.reply "#{m.user.nick} aka #{name} wants to start a game, who's in? Type !foos to join."
players = m.channel.users.keys.map(&:nick) - @blacklist
m.reply "#{players.join(', ')} ^"
+
@game = true
- @players << m.user.nick
+
+ if m.user.nick == 'akbk'
+ if @players.count < 3
+ @players << 'Andy' << 'Ben' if @players.count < 3
+ else
+ @players << 'Ben||Andy' if @players.count == 3
+ end
+ else
+ @players << m.user.nick
+ end
else
m.reply "#{m.user.nick} joined the game."
- @players << m.user.nick
+
+ if m.user.nick == 'akbk'
+ if @players.count < 3
+ @players << 'Andy' << 'Ben' if @players.count < 3
+ else
+ @players << 'Ben||Andy' if @players.count == 3
+ end
+ else
+ @players << m.user.nick
+ end
+
if @players.count < 4
- m.reply "#{4 - @players.count} players still needed."
+ m.reply "#{4 - @players.count} players still needed. Current players: #{@players.join(', ')}"
else
m.reply "game ready: #{@players.join(', ')}"
@players = []
@game = false
- case Random.new.rand(0..4)
- when 0 then m.reply "kthxbye"
+ case Random.new.rand(0..7)
+ when 0 then m.reply "kthxbai"
when 1 then m.reply "Hiyooooo!"
+ when 2 then m.reply "I'm a personality prototype, you can tell can't you?"
+ when 3 then m.reply "Life? Don't talk to me about life."
+ when 4 then m.reply "I'd make a suggestion, but you wouldn't listen. No one ever does."
+ when 5 then m.reply "I've calculated your chance of survival, but i don't think you'll like it."
+ when 6 then m.reply "This will all end in tears."
+ when 7 then m.reply "jenkins-bot: die in a fire"
end
end
end
@@ -50,24 +146,32 @@
end
end
- on :message, /\ rod/ do |m|
- m.reply "That's what she said lol" if Random.new.rand(0..3) == 0
+ on :message, "!status" do |m|
+ if @game
+ m.reply "#{4 - @players.count} players still needed. Current players: #{@players.join(', ')}"
+ else
+ m.reply "no game started."
+ end
end
- on :message, /nope/ do |m|
- m.reply "chuck testa" if Random.new.rand(0..3) == 0
+ on :message, "!help" do |m|
+ m.reply "!foos - start or join a game\n!status - check status of current game\n!cancel - cancel current game\n!flip - desk flip\n!help - helpception"
end
- on :message, /yes|always|never|definitely/ do |m|
- m.reply "well that's just like, you're opinion man" if Random.new.rand(0..2) == 0
+ on :message, /\ rod/ do |m|
+ m.reply "That's what she said lol" if Random.new.rand(0..2) == 0
end
- on :message, /[Y|y]eah/ do |m|
- m.reply "well that's just like, your opinion man" if Random.new.rand(0..5) == 0
+ on :message, /nope/ do |m|
+ m.reply "chuck testa" if Random.new.rand(0..3) == 0
end
on :message, /banana/ do |m|
- m.reply "hillarious!"
+ case Random.new.rand(0..6)
+ when 0 then m.reply "Hiyooooo!"
+ when 1 then m.reply "stfu"
+ else m.reply "Hilarious!"
+ end
end
on :message, /confused/ do |m|
@@ -79,23 +183,34 @@
end
on :message, /jitterbit/ do |m|
- m.reply "*snap* *snap*"
+ m.reply "*snap* *snap*" if Random.new(0..1) == 0
end
- on :message, /\ dump\ / do |m|
- m.reply "tee hee hee" if Random.new.rand(0..2) == 0
+ on :message, /foosbot/ do |m|
+ params = m.reply @cleverbot.write m.message
end
- on :message, /[K|k]obs|[H|h]erndon/ do |m|
- case Random.new.rand(0..2)
- when 0 then m.reply "monkey suit?"
- when 1 then m.reply "business, lol"
- when 2 then m.reply "keep that guy away from playgrounds and schools... "
- end
+ on :message, /nyan/ do |m|
+ m.reply "-_-_-_-_-_-_-_,------,
+_-_-_-_-_-_-_-| /\\_/\\
+-_-_-_-_-_-_-~|__( ^ .^)
+_-_-_-_-_-_-_-\"\" \"\" "
end
- on :message, /foosbot/ do |m|
- params = m.reply @cleverbot.write m.message
+ on :message, "!flip" do |m|
+ m.reply "(╯°□°)╯︵ ┻━┻"
+ end
+
+ on :message, "!unflip" do |m|
+ m.reply "┬─┬ ノ( ゜-゜ノ)"
+ end
+
+ on :message, "!sup" do |m|
+ m.reply "¯\_(ツ)_/¯"
+ end
+
+ on :message, /desk\ flip|deskflip|flip\ a\ desk/ do |m|
+ m.reply "(╯°□°)╯︵ ┻━┻"
end
end

No commit comments for this range

Something went wrong with that request. Please try again.