Skip to content

Commit

Permalink
added check for accountLocked when registering with ping
Browse files Browse the repository at this point in the history
  • Loading branch information
Zomis committed Jun 23, 2015
1 parent 29f250d commit a33abe1
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ abstract class ChatCommandDelegate extends Script {
User user = User.findByPingExpect(githubKey)
if (user == null) {
message.reply('No such user found.')
} else {
} else if (user.accountLocked) {
user.setAccountLocked(false)
user.setChatName(message.user_name)
user.chatId = message.user_id
Expand All @@ -65,6 +65,8 @@ abstract class ChatCommandDelegate extends Script {
} else {
message.reply('You have been registered!')
}
} else {
message.reply('Ping Expect is already taken.')
}
}
}
Expand Down

0 comments on commit a33abe1

Please sign in to comment.