Skip to content

Commit

Permalink
Correct !reopen to !unclose when detecting that the parameter is a ca…
Browse files Browse the repository at this point in the history
…se number
  • Loading branch information
SuperManifolds committed Apr 21, 2021
1 parent 4706a4c commit d0ab9ce
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Sources/mechasqueak/Modules/RemoteRescueCommands.swift
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,13 @@ class RemoteRescueCommands: IRCBotModule {
permission: .RescueWrite
)
var didReceiveReopenCommand = { command in
if Int(command.parameters[0]) != nil {
var correctedCommand = command
correctedCommand.command = "unclose"
IRCBotModuleManager.handleIncomingCommand(ircBotCommand: correctedCommand)
return
}

guard configuration.general.drillMode == false else {
command.message.error(key: "rescue.reopen.drillmode", fromCommand: command)
return
Expand Down

0 comments on commit d0ab9ce

Please sign in to comment.