summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg2021-09-05 20:20:39 +0200
committerGeorg2021-09-05 20:20:39 +0200
commita3b9befdda26787eee81149a4122e7d7b3b30fc9 (patch)
tree6444de20358e4765c6c0f375d3822bccd8cb5334
parent452ecd50c5b41cbbc577153a256faaf895cd6375 (diff)
downloadkeycloak-a3b9befdda26787eee81149a4122e7d7b3b30fc9.tar.gz
keycloak-a3b9befdda26787eee81149a4122e7d7b3b30fc9.tar.bz2
keycloak-a3b9befdda26787eee81149a4122e7d7b3b30fc9.zip
Loop on one lineHEADmaster
Signed-off-by: Georg <georg@lysergic.dev>
-rw-r--r--plugin.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/plugin.py b/plugin.py
index 94adebe..cfa9a9d 100644
--- a/plugin.py
+++ b/plugin.py
@@ -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: