2015-12-22 19:50:01 +00:00
|
|
|
import enum
|
|
|
|
|
2021-02-22 18:02:13 +00:00
|
|
|
|
2015-12-22 19:50:01 +00:00
|
|
|
@enum.unique
|
|
|
|
class Specifications(enum.Enum):
|
2021-02-22 18:02:13 +00:00
|
|
|
RFC1459 = "RFC1459"
|
|
|
|
RFC2812 = "RFC2812"
|
|
|
|
IRC301 = "IRCv3.1"
|
|
|
|
IRC302 = "IRCv3.2"
|
|
|
|
Oragono = "Oragono"
|
|
|
|
Multiline = "multiline"
|
|
|
|
MessageTags = "message-tags"
|
2015-12-22 19:50:01 +00:00
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def of_name(cls, name):
|
|
|
|
name = name.upper()
|
|
|
|
for spec in cls:
|
|
|
|
if spec.value.upper() == name:
|
|
|
|
return spec
|
|
|
|
raise ValueError(name)
|