shizmob / pydle

An IRCv3-compliant Python 3 IRC library.
BSD 3-Clause "New" or "Revised" License
154 stars 48 forks source link

Add LIST support #166

Open Rixxan opened 2 years ago

Rixxan commented 2 years ago

Detailed Description

Support for the LIST function (RPL_LISTSTART, RPL_LIST, RPL_LISTEND) (RFC 1459 Section 4.2.6) would be a welcome addition to Pydle. This function would allow Pydle to be aware of all of the channels that exist in a given server or validate that a channel exists before taking an action.

Context

In our bot and use case, this allows the bot to be aware of channels that exist before taking an action, allowing us to filter actions that would reflect against a channel that does not exist (like forcing a user to join a channel or the bot attempting to join a channel that does not exist).

This would also add the ability to create checks on specific channels and get topics of a channel that exist, even if we are not in the channel already.

Possible Implementation

A partial implementation of this function has been done in our bot (HalpyBOT) here:

https://github.com/HullSeals/HalpyBOT/blob/58d68b8c55651ac4577af2749b86163b444c4f3e/halpybot/packages/ircclient/_listsupport.py

Your Environment