irctest/irctest/specifications.py

21 lines
440 B
Python
Raw Normal View History

import enum
2021-02-22 18:02:13 +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"
@classmethod
def of_name(cls, name):
name = name.upper()
for spec in cls:
if spec.value.upper() == name:
return spec
raise ValueError(name)