Loop on one line

Signed-off-by: Georg <georg@lysergic.dev>
This commit is contained in:
Georg Pfuetzenreuter 2021-09-05 20:20:39 +02:00
parent 452ecd50c5
commit a3b9befdda
Signed by untrusted user: Georg
GPG Key ID: 1DAF57F49F8E8F22

View File

@ -248,9 +248,11 @@ class Keycloak(callbacks.Plugin):
print(url)
usergroups = response.json()
if usergroups:
groups = []
for group in usergroups:
groupname = group['name']
irc.reply(groupname)
groups.append(groupname)
irc.replies(groups, prefixer='Group(s): ', joiner=', ', onlyPrefixFirst=True)
else:
irc.reply("No groups.")
except:
@ -287,9 +289,11 @@ class Keycloak(callbacks.Plugin):
print(url)
usergroups = response.json()
if usergroups:
groups = []
for group in usergroups:
groupname = group['name']
irc.reply(groupname)
groups.append(groupname)
irc.replies(groups, prefixer='Group(s): ', joiner=', ', onlyPrefixFirst=True)
else:
irc.reply("No groups.")
except: