From f9344b7e55a52ece613075d599d0cc5cc96839ed Mon Sep 17 00:00:00 2001 From: Jokler Date: Tue, 10 Oct 2017 20:06:42 +0200 Subject: Improve currency help message --- src/plugins/currency.rs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/plugins/currency.rs b/src/plugins/currency.rs index 08501e1..bb16cd9 100644 --- a/src/plugins/currency.rs +++ b/src/plugins/currency.rs @@ -104,13 +104,16 @@ impl Currency { } fn help(&self, server: &IrcServer, command: PluginCommand) -> Result<(), IrcError> { - let usage = format!("usage: {} currency value from_currency to_currency", + let help = format!("usage: {} currency value from_currency to_currency\r\n\ + example: 1.5 eur usd\r\n\ + available currencies: AUD, BGN, BRL, CAD, \ + CHF, CNY, CZK, DKK, GBP, HKD, HRK, HUF, \ + IDR, ILS, INR, JPY, KRW, MXN, MYR, NOK, \ + NZD, PHP, PLN, RON, RUB, SEK, SGD, THB, \ + TRY, USD, ZAR", server.current_nickname()); - if let Err(e) = server.send_notice(&command.source, &usage) { - return Err(e); - } - server.send_notice(&command.source, "example: 1.5 eur usd") + server.send_notice(&command.source, &help) } fn invalid_command(&self, server: &IrcServer, command: &PluginCommand) -> Result<(), IrcError> { -- cgit v1.2.3-70-g09d2