Skip to content

Commit a7ac9f6

Browse files
authored
Merge pull request CloudBotIRC#45 from MuffinMedic/listchans
Split listchan lines into smaller chunks
2 parents 66bde20 + f564055 commit a7ac9f6

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

plugins/admin_bot.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,9 @@ def me(text, conn, chan, message, nick):
383383
def listchans(conn, chan, message, notice):
384384
"""-- Lists the current channels the bot is in"""
385385
chans = ', '.join(sorted(conn.channels, key=lambda x: x.strip('#').lower()))
386-
if chan[:1] == "#":
387-
notice("I am currently in: {}".format(chans))
388-
else:
389-
message("I am currently in: {}".format(chans))
386+
lines = formatting.chunk_str("I am currently in: {}".format(chans))
387+
for line in lines:
388+
if chan[:1] == "#":
389+
notice(line)
390+
else:
391+
message(line)

0 commit comments

Comments
 (0)