Skip to content

Commit

Permalink
Merge pull request Bambooir#98 from buzz3rs/master
Browse files Browse the repository at this point in the history
add username to !owner
  • Loading branch information
Imandaneshi committed Mar 5, 2016
2 parents 459dbe2 + 64d8058 commit 513e686
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion plugins/ingroup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1095,11 +1095,16 @@ local function run(msg, matches)
end
if matches[1] == 'owner' then
local group_owner = data[tostring(msg.to.id)]['set_owner']
local user_info = redis:hgetall('user:'..group_owner)
if not group_owner then
return "no owner,ask admins in support groups to set owner for your group"
end
savelog(msg.to.id, name_log.." ["..msg.from.id.."] used /owner")
return "Group owner is ["..group_owner..']'
if user_info.username then
return "Group onwer is @"..user_info.username.." ["..group_owner.."]"
else
return "Group owner is ["..group_owner..']'
end
end
if matches[1] == 'setgpowner' then
local receiver = "chat#id"..matches[2]
Expand Down

0 comments on commit 513e686

Please sign in to comment.