Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNicolas Morin <45999390+GlobeNico@users.noreply.github.com>2020-04-30 02:02:53 +0300
committerNicolas Morin <nicolasm@globetechnologie.com>2020-04-30 02:44:14 +0300
commit0a3359672e659e3babc0414946cf021a5e4e17f8 (patch)
tree13ec6dfaa05e398e4a92e01bbe005a6a596b824f /lib
parent6902ea80a5f1255b20056335deb64a9176dad8f5 (diff)
Update Executor.php
There is a bug when showing /help with alias command, since I presume an alias is just another way to write the command. I decide to skip the alias: when showing help I also added the command name in the output to show the user what comand to input. Signed-off-by: Nicolas Morin <nicolasm@globetechnologie.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/Chat/Command/Executor.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Chat/Command/Executor.php b/lib/Chat/Command/Executor.php
index 661ecbd0c..438b529ce 100644
--- a/lib/Chat/Command/Executor.php
+++ b/lib/Chat/Command/Executor.php
@@ -115,7 +115,7 @@ class Executor {
if ($command->getApp() !== '') {
$response = $this->execHelpSingleCommand($room, $message, $command->getApp() . ' ' . $command->getCommand());
} else {
- if ($command->getCommand() === 'help') {
+ if ($command->getCommand() === 'help' || strpos($command->getScript(),'alias:') !== FALSE ) {
continue;
}
$response = $this->execHelpSingleCommand($room, $message, $command->getCommand());
@@ -132,9 +132,9 @@ class Executor {
$tempHelp = substr($tempHelp, 0, strpos($tempHelp, "\n"));
}
}
- $helps[] = $tempHelp;
+ $helps[] = $command->getCommand() .' -> ' . $tempHelp;
} else {
- $helps[] = $response;
+ $helps[] = $command->getCommand() .' -> ' . $response;
}
}