Skip to content

Commit

Permalink
core: expose parameters from RPL_ISUPPORT at the top of bot.server
Browse files Browse the repository at this point in the history
`ISUPPORT` parameters can be accessed as `bot.server...`, e.g.,
`bot.server.NAMESX`.

This closes sopel-irc#1082 and closes sopel-irc#1532.
  • Loading branch information
HumorBaby committed Apr 23, 2019
1 parent 444515b commit 3bcce32
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sopel/bot.py
Original file line number Diff line number Diff line change
@@ -75,6 +75,10 @@ def __init__(self):
network = property(lambda self: self._isupport['NETWORK'])
"""Return the name of the IRC network that the client is connected to."""

def __getattr__(self, name):
# Exposes ISUPPORT parameters at the top of `bot.server`.
return self._isupport[name]


class Sopel(irc.Bot):
def __init__(self, config, daemon=False):

0 comments on commit 3bcce32

Please sign in to comment.