Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

limit notify() server messages to 30 chars

  • Loading branch information...
commit 1671164817edc5c1bd01f5efaab7205a3585e7d5 1 parent bd9ab59
Dale Maggee authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 player.rb
View
6 player.rb
@@ -105,7 +105,11 @@ def tunnel(direction)
end
def notify(text)
- message "Notify #{self}: '#{text}'" if $DEBUG
+ if $DEBUG
+ txt = text.gsub("\n","<LF>")
+ txt = txt[0..30] + '...' if txt.length > 32
+ message "Notify #{self}: '#{txt}'"
+ end
#encrypt text using @key, then base64 encode that so that DBus
# doesn't have a heart-attack transmitting binary data
crypt = Crypt::Blowfish.new(@key.force_encoding('ASCII'))
Please sign in to comment.
Something went wrong with that request. Please try again.