Skip to content

Commit

Permalink
Add scoreboards and maps links
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Brown committed Jul 4, 2016
1 parent b2b61eb commit 2e0b9e8
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion lib/tasks/irc_client.rake
Expand Up @@ -15,11 +15,13 @@ namespace :irc do
LUI_SPAWN_REGEX = /spawn (\d+|a)? ?(rock|paper|scissor)s?/

LUI_HELP_INFO_REGEX = /help|rules/
LUI_WORLD_INFO_REGEX = /world/
LUI_MAP_INFO_REGEX = /map/
LUI_LOCATIONS_INFO_REGEX = /locations/
LUI_SOURCE_CODE_INFO_REGEX = /source/
LUI_SOUL_COUNT_INFO_REGEX = /souls?/
LUI_MY_SOULS_INFO_REGEX = /my stats/
LUI_WORLD_INFO_REGEX = /world/
LUI_SCOREBOARDS_INFO_REGEX = /scoreboards/

LUI_OLDEST_SCOREBOARD_REGEX = /oldest/
LUI_LEVEL_SCOREBOARD_REGEX = /level|kills?|strongest/
Expand Down Expand Up @@ -135,6 +137,14 @@ namespace :irc do
m.reply "There are souls located at #{Soul.where(alive: true).order(:x).map { |s| "(#{s.x},#{s.y})" }.to_sentence}."
end

on :message, LUI_MAP_INFO_REGEX do |m|
m.reply "The world map is available here: https://polar-spire-49459.herokuapp.com/world/map"
end

on :message, LUI_SCOREBOARDS_INFO_REGEX do |m|
m.reply "Live scoreboards are available here: https://polar-spire-49459.herokuapp.com/world/scoreboards"
end

on :message, LUI_SOURCE_CODE_INFO_REGEX do |m|
m.reply "The full source code for MMORPGRPS is available at https://github.com/drusepth/mmorpgrps. This client's source code is at https://github.com/drusepth/mmorpgrps/blob/master/lib/tasks/irc_client.rake"
end
Expand Down

0 comments on commit 2e0b9e8

Please sign in to comment.