CommandHelp: don't print cmdprefix in management room
In the management room the user don't need to prefix the commands with the command-prefix. Hence, don't show the prefix in the command list.
This commit is contained in:
parent
3c7d77a456
commit
ae2ccb0d38
@ -121,7 +121,11 @@ const cmdHelpHelp = `help - Prints this help`
|
||||
|
||||
// CommandHelp handles help command
|
||||
func (handler *CommandHandler) CommandHelp(ce *CommandEvent) {
|
||||
cmdPrefix := handler.bridge.Config.Bridge.CommandPrefix + " "
|
||||
cmdPrefix := ""
|
||||
if ce.User.ManagementRoom != ce.RoomID {
|
||||
cmdPrefix = handler.bridge.Config.Bridge.CommandPrefix + " "
|
||||
}
|
||||
|
||||
ce.Reply(strings.Join([]string{
|
||||
cmdPrefix + cmdHelpHelp,
|
||||
cmdPrefix + cmdLoginHelp,
|
||||
|
Loading…
x
Reference in New Issue
Block a user