Skip to content

Commit d6d6904

Browse files
author
dafoxia
committed
'update' command now says when update is done
1 parent 30bd502 commit d6d6904

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

plugins/mpd.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,11 @@ def handle_chat(msg,message)
622622

623623
if message == 'update'
624624
@@bot[:mpd].update
625-
privatemessage( "running database update.")
625+
privatemessage("Running database update...")
626+
while @@bot[:mpd].status[:updating_db] != nil do
627+
sleep 0.5
628+
end
629+
privatemessage("Done.")
626630
end
627631

628632
if message == 'displayinfo'

plugins/radiostream.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@ def init(init)
55
super
66
if ( @@bot[:mpd] != nil ) && ( @@bot[:messages] != nil ) && ( @@bot[:radiostream] == nil )
77
@@bot[:radiostream] = self
8-
@xspf = require 'crack' #parse xspf playlists only if crack gem is installed
9-
puts "if you install crack gem radiostream plugin also can parse xspf stream playlists." if @xspf == false
8+
begin
9+
@xspf = require 'crack' #parse xspf playlists only if crack gem is installed
10+
rescue
11+
puts "if you install crack gem radiostream plugin also can parse xspf stream playlists." if @xspf == false
12+
end
1013
@keylist = Array.new
1114
end
1215
return @@bot

0 commit comments

Comments
 (0)