irc3.plugins.casefold casefolding pluginΒΆ

This command introduces a bot.casefold function that casefolds strings based on the current casemapping of the IRC server.

This lets you casefold nicks and channel names so that on a server using rfc1459 casemapping, #cool[chan] and #Cool{Chan} are seen as the same channel.

Usage:

>>> config = ini2config("""
... [bot]
... includes =
...     irc3.plugins.casefold
... """)
>>> bot = IrcBot(**config)

Returning casefolded strings:

>>> bot.casefold('ThisIsANick')
'thisisanick'
>>> bot.casefold('#WeirdChannelNames[]')
'#weirdchannelnames{}'