Skip to content

Commit

Permalink
added taskReload() to ChatCommandsDelegate
Browse files Browse the repository at this point in the history
  • Loading branch information
Zomis committed Jun 23, 2015
1 parent 9c4316b commit ead0a0c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/main/groovy/net/zomis/duga/ChatCommands.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,6 @@ class ChatCommands {
message.reply('OK')
}
}
consumers << {ChatMessageIncoming message ->
def command = 'task reload'
int index = message.content.indexOf(command)
if (index != -1) {
def loadedTasks = tasks.reloadAll()
message.reply(loadedTasks.size() + ' reloaded')
}
}
consumers << {ChatMessageIncoming event ->
if (event.content.contains('create task')) {
TaskData.withNewSession { status ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,10 @@ abstract class ChatCommandDelegate extends Script {
}
}

void taskReload() {
requireAdmin()
def loadedTasks = bean.tasks.reloadAll()
message.reply(loadedTasks.size() + ' reloaded')
}

}

0 comments on commit ead0a0c

Please sign in to comment.