Signed-off-by: Yonathan Dossow <[EMAIL PROTECTED]> --- music.tcl | 19 +++++++++++++++---- 1 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/music.tcl b/music.tcl index a97a45d..9a93f27 100644 --- a/music.tcl +++ b/music.tcl @@ -1067,10 +1067,21 @@ namespace eval ::music { return 0 } - #if {la variable password tiene algo}{ - # puts $chan "password ::music::config(mpd_password)" - # flush $chan - #} + if { [string length $::music::config(mpd_password)] > 0 } { + puts $chan "password $::music::config(mpd_password)" + flush $chan + + if { [catch {gets $chan line} err] } { + plugins_log Music "error : $err" + close $chan + return 0 + } + if { [string range $line 0 1] != "OK" } { + plugins_log Music "error: $line" + close $chan + return 0 + } + } puts $chan "status" flush $chan -- 1.5.0.3 ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Amsn-devel mailing list Amsn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amsn-devel