forked from Georg/limnoria-keycloak
Loop on one line
Signed-off-by: Georg <georg@lysergic.dev>
This commit is contained in:
parent
452ecd50c5
commit
a3b9befdda
@ -248,9 +248,11 @@ class Keycloak(callbacks.Plugin):
|
|||||||
print(url)
|
print(url)
|
||||||
usergroups = response.json()
|
usergroups = response.json()
|
||||||
if usergroups:
|
if usergroups:
|
||||||
|
groups = []
|
||||||
for group in usergroups:
|
for group in usergroups:
|
||||||
groupname = group['name']
|
groupname = group['name']
|
||||||
irc.reply(groupname)
|
groups.append(groupname)
|
||||||
|
irc.replies(groups, prefixer='Group(s): ', joiner=', ', onlyPrefixFirst=True)
|
||||||
else:
|
else:
|
||||||
irc.reply("No groups.")
|
irc.reply("No groups.")
|
||||||
except:
|
except:
|
||||||
@ -287,9 +289,11 @@ class Keycloak(callbacks.Plugin):
|
|||||||
print(url)
|
print(url)
|
||||||
usergroups = response.json()
|
usergroups = response.json()
|
||||||
if usergroups:
|
if usergroups:
|
||||||
|
groups = []
|
||||||
for group in usergroups:
|
for group in usergroups:
|
||||||
groupname = group['name']
|
groupname = group['name']
|
||||||
irc.reply(groupname)
|
groups.append(groupname)
|
||||||
|
irc.replies(groups, prefixer='Group(s): ', joiner=', ', onlyPrefixFirst=True)
|
||||||
else:
|
else:
|
||||||
irc.reply("No groups.")
|
irc.reply("No groups.")
|
||||||
except:
|
except:
|
||||||
|
Loading…
Reference in New Issue
Block a user