import static com.google.common.collect.FluentIterable.from;
import static java.util.Arrays.asList;
+import static net.pterodactylus.xdcc.ui.stdin.Ansi.bold;
+import static net.pterodactylus.xdcc.ui.stdin.Ansi.green;
+import static net.pterodactylus.xdcc.ui.stdin.Ansi.red;
import static net.pterodactylus.xdcc.ui.stdin.Command.TO_NAME;
import java.io.BufferedReader;
public void downloadStarted(DownloadStarted downloadStarted) {
Download download = downloadStarted.download();
try {
- writeLine(String.format("Download of %s (from %s, %s) has started.", download.pack().name(), download.bot().name(), download.bot().network().name()));
+ writeLine(String.format("Download of %s (from %s, %s) has started.", bold(download.pack().name()), download.bot().name(), download.bot().network().name()));
} catch (IOException ioe1) {
/* ignore. */
}
public void downloadFinished(DownloadFinished downloadFinished) {
Download download = downloadFinished.download();
try {
- writeLine(String.format("Download of %s (from %s, %s) has finished, at %s/s.", download.pack().name(), download.bot().name(), download.bot().network().name(), f(download.dccReceiver().overallRate())));
+ writeLine(green(String.format("Download of %s (from %s, %s) has finished, at %s/s.", download.pack().name(), download.bot().name(), download.bot().network().name(), f(download.dccReceiver().overallRate()))));
} catch (IOException ioe1) {
/* ignore. */
}
public void downloadFailed(DownloadFailed downloadFailed) {
Download download = downloadFailed.download();
try {
- writeLine(String.format("Download of %s (from %s, %s) has failed at %.1f%% and %s/s.", download.filename(), download.bot().name(), download.bot().network().name(), download.dccReceiver().progress() * 100.0 / download.dccReceiver().size(), f(download.dccReceiver().overallRate())));
+ writeLine(red(String.format("Download of %s (from %s, %s) has failed at %.1f%% and %s/s.", download.filename(), download.bot().name(), download.bot().network().name(), download.dccReceiver().progress() * 100.0 / download.dccReceiver().size(), f(download.dccReceiver().overallRate()))));
} catch (IOException ioe1) {
/* ignore. */
}