/modkick and /modban can now be used with reasons without failing to

kick.
This commit is contained in:
topkecleon 2015-11-26 18:40:01 -05:00
parent 61b9140eca
commit 4f191ac57a

View File

@ -219,13 +219,13 @@ local commands = {
local userid = msg.text:input() local userid = msg.text:input()
local usernm = userid local usernm = userid
if not userid then
if msg.reply_to_message then if msg.reply_to_message then
userid = tostring(msg.reply_to_message.from.id) userid = tostring(msg.reply_to_message.from.id)
usernm = msg.reply_to_message.from.first_name usernm = msg.reply_to_message.from.first_name
else
return 'Kicks must be done via reply or specification of a user/bot\'s ID or username.'
end end
if not userid then
return 'Kicks must be done via reply or specification of a user/bot\'s ID or username.'
end end
if moddat[msg.chat.id_str][userid] or config.moderation.admins[userid] then if moddat[msg.chat.id_str][userid] or config.moderation.admins[userid] then
@ -255,13 +255,13 @@ local commands = {
local userid = msg.text:input() local userid = msg.text:input()
local usernm = userid local usernm = userid
if not userid then
if msg.reply_to_message then if msg.reply_to_message then
userid = tostring(msg.reply_to_message.from.id) userid = tostring(msg.reply_to_message.from.id)
usernm = msg.reply_to_message.from.first_name usernm = msg.reply_to_message.from.first_name
else
return 'Bans must be done via reply or specification of a user/bot\'s ID or username.'
end end
if not userid then
return 'Kicks must be done via reply or specification of a user/bot\'s ID or username.'
end end
if moddat[msg.chat.id_str][userid] or config.moderation.admins[userid] then if moddat[msg.chat.id_str][userid] or config.moderation.admins[userid] then