lib/ayadn/alias.rb in ayadn-1.5.1 vs lib/ayadn/alias.rb in ayadn-1.6.0

- old
+ new

@@ -9,11 +9,11 @@ begin init unless args.empty? channel, channel_alias = args[0], args[1] else - Action.quit Status.wrong_arguments + abort(Status.wrong_arguments) end if channel.is_integer? Databases.create_alias(channel, channel_alias) Logs.rec.info "Added alias '#{channel_alias}' for channel #{channel}." puts Status.done @@ -36,11 +36,11 @@ unless args.empty? Databases.delete_alias(args[0]) Logs.rec.info "Deleted alias '#{args[0]}'." puts Status.done else - Action.quit Status.wrong_arguments + abort(Status.wrong_arguments) end rescue => e Errors.global_error({error: e, caller: caller, data: [args]}) ensure Databases.close_all @@ -53,10 +53,10 @@ begin init unless database.nil? new_db = File.realpath(database) else - Action.quit Status.wrong_arguments + abort(Status.wrong_arguments) end if File.exist?(new_db) Databases.import_aliases(new_db) Logs.rec.info "Imported '#{new_db}' values in aliases database." puts Status.done