Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Switch to mIRC colors

  • Loading branch information...
commit 1c8d9af712e8bce50020330e6856d5f3c53fc54d 1 parent 5022938
Alexander van Gessel AI0867 authored
Showing with 7 additions and 7 deletions.
  1. +1 −1  docs/irker
  2. +6 −6 services/irker.rb
2  docs/irker
View
@@ -4,6 +4,6 @@
4. `branch` lets you specify the branch name, or a template with `%s` to fill the branch name in.
5. `long_urls` enables full URLs instead of shortened URLs.
6. `module` sets the module name in the project.
-7. `color` adds ANSI color codes to the message.
+7. `color` adds mIRC color codes to the message.
8. `full_commits` sends multiple messages to show up to 5 lines of the commit message.
12 services/irker.rb
View
@@ -62,11 +62,11 @@ def build_irker_commit(repository, branch, sha1, commit, module_name)
channels = data['channels'].split(";")
if data['color'].to_i == 1 then
- bold = "\x1b[1m"
- green = "\x1b[1;32m"
- yellow = "\x1b[1;33m"
- brown = "\x1b[33m"
- reset = "\x1b[0m"
+ bold = "\x02"
+ green = "\x0303"
+ yellow = "\x0307"
+ brown = "\x0305"
+ reset = "\x0F"
else
bold = green = yellow = brown = reset = ''
end
@@ -90,7 +90,7 @@ def build_irker_commit(repository, branch, sha1, commit, module_name)
messages.push JSON.generate({'to' => channels, 'privmsg' => privmsg.strip})
log_lines[0..4].each do |log_line|
privmsg = <<-PRIVMSG
- #{repository}: #{log_line[0..400]}
+ #{bold}#{repository}:#{reset} #{log_line[0..400]}
PRIVMSG
messages.push JSON.generate({'to' => channels, 'privmsg' => privmsg.strip})
end
Please sign in to comment.
Something went wrong with that request. Please try again.