From 114dd4d9e789d730e33a58b2f9c1921e45d7bfa5 Mon Sep 17 00:00:00 2001 From: Badlop Date: Wed, 20 Jan 2010 10:32:56 +0000 Subject: [PATCH] Support in ejabberdctl help command names with old - characters. SVN Revision: 2917 --- src/ejabberd_ctl.erl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ejabberd_ctl.erl b/src/ejabberd_ctl.erl index f651b80df..2c8bd082d 100644 --- a/src/ejabberd_ctl.erl +++ b/src/ejabberd_ctl.erl @@ -189,8 +189,9 @@ process(["help" | Mode]) -> ["help"] -> print_usage_help(MaxC, ShCode), ?STATUS_SUCCESS; - [CommandString | _] -> - print_usage_commands(CommandString, MaxC, ShCode), + [CmdString | _] -> + {ok, CmdStringU, _} = regexp:gsub(CmdString, "-", "_"), + print_usage_commands(CmdStringU, MaxC, ShCode), ?STATUS_SUCCESS end;