diff --git a/plugin.py b/plugin.py index cf56129..94adebe 100644 --- a/plugin.py +++ b/plugin.py @@ -249,7 +249,7 @@ class Keycloak(callbacks.Plugin): usergroups = response.json() if usergroups: for group in usergroups: - groupname = usergroups[0]['name'] + groupname = group['name'] irc.reply(groupname) else: irc.reply("No groups.") @@ -288,7 +288,7 @@ class Keycloak(callbacks.Plugin): usergroups = response.json() if usergroups: for group in usergroups: - groupname = usergroups[0]['name'] + groupname = group['name'] irc.reply(groupname) else: irc.reply("No groups.")