mirror of https://github.com/progval/irctest.git
20 lines
459 B
Python
20 lines
459 B
Python
import enum
|
|
|
|
@enum.unique
|
|
class Specifications(enum.Enum):
|
|
RFC1459 = 'RFC1459'
|
|
RFC2812 = 'RFC2812'
|
|
RFCDeprecated = 'RFC-deprecated'
|
|
IRC301 = 'IRCv3.1'
|
|
IRC302 = 'IRCv3.2'
|
|
IRC302Deprecated = 'IRCv3.2-deprecated'
|
|
Oragono = 'Oragono'
|
|
|
|
@classmethod
|
|
def of_name(cls, name):
|
|
name = name.upper()
|
|
for spec in cls:
|
|
if spec.value.upper() == name:
|
|
return spec
|
|
raise ValueError(name)
|