Skip to content

Instantly share code, notes, and snippets.

@agrif
Created March 15, 2020 02:11
Show Gist options
  • Select an option

  • Save agrif/129f951f197931a05599be5da4c55c08 to your computer and use it in GitHub Desktop.

Select an option

Save agrif/129f951f197931a05599be5da4c55c08 to your computer and use it in GitHub Desktop.
# This file is generated. Make sure you are editing the right source!
# Earendil IRC Protocol Specification, version 0.0
import attr
class IrcParseError(Exception):
pass
def decode(line, encoding='utf-8'):
line = line.rstrip(b'\r\n').decode(encoding)
source = None
if line.startswith(':'):
try:
source, line = line.split(' ', 1)
except ValueError:
raise IrcParseError('no verb') from None
source = source[1:].strip()
last = None
if ' :' in line:
line, last = line.split(' :', 1)
line = line.strip()
if not line:
raise IrcParseError('no verb')
verb, *arguments = line.split()
if last is not None:
arguments.append(last)
try:
verb = int(verb)
except ValueError:
verb = verb.upper()
MessageClass = MESSAGES.get(verb, UnknownMessage)
if MessageClass is UnknownMessage:
return UnknownMessage(source, verb, arguments)
return MessageClass.from_arguments(source, arguments)
@attr.s(slots=True, frozen=True)
class Message:
source = attr.ib(kw_only=True, default=None, repr=False)
@property
def verb(self):
raise NotImplementedError
@property
def arguments(self):
raise NotImplementedError
def evolve(self, **kwargs):
return attr.evolve(self, **kwargs)
def encode(self, encoding='utf-8'):
verb = self.verb
if isinstance(verb, str):
verb = verb.upper()
else:
verb = '{:03d}'.format(verb)
if len(self.arguments) == 0:
c = verb
else:
*args, last = self.arguments
if ' ' in last or ':' in last:
last = ':' + last
c = ' '.join([verb] + args + [last])
if self.source:
c = ':{} {}'.format(self.source, c)
return c.encode(encoding)
@attr.s(slots=True, frozen=True)
class UnknownMessage(Message):
verb = attr.ib()
arguments = attr.ib()
MESSAGES = {}
@attr.s(slots=True, frozen=True)
class Pass(Message):
"""`PASS <password>`
Related: NeedMoreParams, AlreadyRegistered.
"""
verb = 'PASS'
password = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.password)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 1
if num_optionals < 0:
raise IrcParseError('bad arguments for Pass')
i = 0
v_password = arguments[i]
i += 1
return cls(
source,
v_password,
)
MESSAGES['PASS'] = Pass
@attr.s(slots=True, frozen=True)
class Nick(Message):
"""`NICK <nickname>`
Related: NoNicknameGiven, ErroneusNickname, NicknameInUse, NickCollision, UnavailResource, Restricted.
"""
verb = 'NICK'
nickname = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.nickname)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 1
if num_optionals < 0:
raise IrcParseError('bad arguments for Nick')
i = 0
v_nickname = arguments[i]
i += 1
return cls(
source,
v_nickname,
)
MESSAGES['NICK'] = Nick
@attr.s(slots=True, frozen=True)
class User(Message):
"""`USER <user> <int:mode> * <realname>`
Related: NeedMoreParams, AlreadyRegistered.
"""
verb = 'USER'
user = attr.ib()
mode = attr.ib()
realname = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.user)
ret.append(str(self.mode))
ret.append('*')
ret.append(self.realname)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 4
if num_optionals < 0:
raise IrcParseError('bad arguments for User')
i = 0
v_user = arguments[i]
i += 1
v_mode = int(arguments[i])
i += 1
# literal '*'
i += 1
v_realname = arguments[i]
i += 1
return cls(
source,
v_user,
v_mode,
v_realname,
)
MESSAGES['USER'] = User
@attr.s(slots=True, frozen=True)
class Oper(Message):
"""`OPER <name> <password>`
Related: NeedMoreParams, YoureOper, NoOperHost, PasswordMismatch.
"""
verb = 'OPER'
name = attr.ib()
password = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.name)
ret.append(self.password)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for Oper')
i = 0
v_name = arguments[i]
i += 1
v_password = arguments[i]
i += 1
return cls(
source,
v_name,
v_password,
)
MESSAGES['OPER'] = Oper
@attr.s(slots=True, frozen=True)
class Mode(Message):
"""`MODE <name> <mode>`
FIXME multiples.
Related: NeedMoreParams, KeySet, NoChanModes, ChanOpPrivsNeeded, UserNotInChannel, UnknownMode, UsersDontMatch, UserModeUnknownFlag, ChannelModeIs, BanList, BanListEnd, ExceptList, ExceptListEnd, InviteList, InviteListEnd, UniqOpIs, UserModeIs.
"""
verb = 'MODE'
name = attr.ib()
mode = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.name)
ret.append(self.mode)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for Mode')
i = 0
v_name = arguments[i]
i += 1
v_mode = arguments[i]
i += 1
return cls(
source,
v_name,
v_mode,
)
MESSAGES['MODE'] = Mode
@attr.s(slots=True, frozen=True)
class Service(Message):
"""`SERVICE <nickname> * <distribution> <int:type> 0 <info>`
Related: AlreadyRegistered, NeedMoreParams, ErroneusNickname, YoureService, YourHost, MyInfo.
"""
verb = 'SERVICE'
nickname = attr.ib()
distribution = attr.ib()
type = attr.ib()
info = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.nickname)
ret.append('*')
ret.append(self.distribution)
ret.append(str(self.type))
ret.append('0')
ret.append(self.info)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 6
if num_optionals < 0:
raise IrcParseError('bad arguments for Service')
i = 0
v_nickname = arguments[i]
i += 1
# literal '*'
i += 1
v_distribution = arguments[i]
i += 1
v_type = int(arguments[i])
i += 1
# literal '0'
i += 1
v_info = arguments[i]
i += 1
return cls(
source,
v_nickname,
v_distribution,
v_type,
v_info,
)
MESSAGES['SERVICE'] = Service
@attr.s(slots=True, frozen=True)
class Quit(Message):
"""`QUIT [message]`
"""
verb = 'QUIT'
message = attr.ib(default=None)
@property
def arguments(self):
ret = []
if self.message is not None:
ret.append(self.message)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments)
if num_optionals < 0:
raise IrcParseError('bad arguments for Quit')
i = 0
v_message = None
if num_optionals > 0:
v_message = arguments[i]
i += 1
return cls(
source,
v_message,
)
MESSAGES['QUIT'] = Quit
@attr.s(slots=True, frozen=True)
class SQuit(Message):
"""`SQUIT <server> <comment>`
Related: NoPrivileges, NoSuchServer, NeedMoreParams.
"""
verb = 'SQUIT'
server = attr.ib()
comment = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.server)
ret.append(self.comment)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for SQuit')
i = 0
v_server = arguments[i]
i += 1
v_comment = arguments[i]
i += 1
return cls(
source,
v_server,
v_comment,
)
MESSAGES['SQUIT'] = SQuit
@attr.s(slots=True, frozen=True)
class ChannelJoin(Message):
"""`JOIN <#channels,> [keys,]`
Related: NeedMoreParams, BannedFromChan, InviteOnlyChan, BadChannelKey, ChannelIsFull, BadChanMask, NoSuchChannel, TooManyChannels, TooManyTargets, UnavailResource, TopicReply.
"""
verb = 'JOIN'
channels = attr.ib()
keys = attr.ib(default=None)
@property
def arguments(self):
ret = []
ret.append(','.join(v for v in self.channels))
if self.keys is not None:
ret.append(','.join(v for v in self.keys))
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 1
if num_optionals < 0:
raise IrcParseError('bad arguments for ChannelJoin')
i = 0
v_channels = [v for v in arguments[i].split(',')]
i += 1
v_keys = None
if num_optionals > 0:
v_keys = [v for v in arguments[i].split(',')]
i += 1
return cls(
source,
v_channels,
v_keys,
)
MESSAGES['JOIN'] = ChannelJoin
@attr.s(slots=True, frozen=True)
class ChannelPart(Message):
"""`PART <#channels,> [message]`
Related: NeedMoreParams, NoSuchChannel, NotOnChannel.
"""
verb = 'PART'
channels = attr.ib()
message = attr.ib(default=None)
@property
def arguments(self):
ret = []
ret.append(','.join(v for v in self.channels))
if self.message is not None:
ret.append(self.message)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 1
if num_optionals < 0:
raise IrcParseError('bad arguments for ChannelPart')
i = 0
v_channels = [v for v in arguments[i].split(',')]
i += 1
v_message = None
if num_optionals > 0:
v_message = arguments[i]
i += 1
return cls(
source,
v_channels,
v_message,
)
MESSAGES['PART'] = ChannelPart
@attr.s(slots=True, frozen=True)
class Topic(Message):
"""`TOPIC <#channel> [topic]`
Related: NeedMoreParams, NotOnChannel, NoTopicReply, TopicReply, ChanOpPrivsNeeded, NoChanModes.
"""
verb = 'TOPIC'
channel = attr.ib()
topic = attr.ib(default=None)
@property
def arguments(self):
ret = []
ret.append(self.channel)
if self.topic is not None:
ret.append(self.topic)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 1
if num_optionals < 0:
raise IrcParseError('bad arguments for Topic')
i = 0
v_channel = arguments[i]
i += 1
v_topic = None
if num_optionals > 0:
v_topic = arguments[i]
i += 1
return cls(
source,
v_channel,
v_topic,
)
MESSAGES['TOPIC'] = Topic
@attr.s(slots=True, frozen=True)
class Names(Message):
"""`NAMES [#channels,] [target]`
Related: NoSuchServer, NamesReply, NamesEnd.
"""
verb = 'NAMES'
channels = attr.ib(default=None)
target = attr.ib(default=None)
@property
def arguments(self):
ret = []
if self.channels is not None:
ret.append(','.join(v for v in self.channels))
if self.target is not None:
ret.append(self.target)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments)
if num_optionals < 0:
raise IrcParseError('bad arguments for Names')
i = 0
v_channels = None
if num_optionals > 0:
v_channels = [v for v in arguments[i].split(',')]
i += 1
v_target = None
if num_optionals > 1:
v_target = arguments[i]
i += 1
return cls(
source,
v_channels,
v_target,
)
MESSAGES['NAMES'] = Names
@attr.s(slots=True, frozen=True)
class List(Message):
"""`LIST [#channels,] [target]`
Related: NoSuchServer, ListReply, ListEnd.
"""
verb = 'LIST'
channels = attr.ib(default=None)
target = attr.ib(default=None)
@property
def arguments(self):
ret = []
if self.channels is not None:
ret.append(','.join(v for v in self.channels))
if self.target is not None:
ret.append(self.target)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments)
if num_optionals < 0:
raise IrcParseError('bad arguments for List')
i = 0
v_channels = None
if num_optionals > 0:
v_channels = [v for v in arguments[i].split(',')]
i += 1
v_target = None
if num_optionals > 1:
v_target = arguments[i]
i += 1
return cls(
source,
v_channels,
v_target,
)
MESSAGES['LIST'] = List
@attr.s(slots=True, frozen=True)
class Invite(Message):
"""`INVITE <nickname> <#channel>`
Related: NeedMoreParams, NoSuchNick, NotOnChannel, UserOnChannel, ChanOpPrivsNeeded, Inviting, AwayReply.
"""
verb = 'INVITE'
nickname = attr.ib()
channel = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.nickname)
ret.append(self.channel)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for Invite')
i = 0
v_nickname = arguments[i]
i += 1
v_channel = arguments[i]
i += 1
return cls(
source,
v_nickname,
v_channel,
)
MESSAGES['INVITE'] = Invite
@attr.s(slots=True, frozen=True)
class Kick(Message):
"""`KICK <channels,> <users,> [comment]`
Related: NeedMoreParams, NoSuchChannel, BadChanMask, ChanOpPrivsNeeded, UserNotInChannel, NotOnChannel.
"""
verb = 'KICK'
channels = attr.ib()
users = attr.ib()
comment = attr.ib(default=None)
@property
def arguments(self):
ret = []
ret.append(','.join(v for v in self.channels))
ret.append(','.join(v for v in self.users))
if self.comment is not None:
ret.append(self.comment)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for Kick')
i = 0
v_channels = [v for v in arguments[i].split(',')]
i += 1
v_users = [v for v in arguments[i].split(',')]
i += 1
v_comment = None
if num_optionals > 0:
v_comment = arguments[i]
i += 1
return cls(
source,
v_channels,
v_users,
v_comment,
)
MESSAGES['KICK'] = Kick
@attr.s(slots=True, frozen=True)
class Privmsg(Message):
"""`PRIVMSG <target> <message>`
Related: NoRecipient, NoTextToSend, CantSendToChan, NoTopLevel, WildTopLevel, TooManyTargets, NoSuchNick, AwayReply.
"""
verb = 'PRIVMSG'
target = attr.ib()
message = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.message)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for Privmsg')
i = 0
v_target = arguments[i]
i += 1
v_message = arguments[i]
i += 1
return cls(
source,
v_target,
v_message,
)
MESSAGES['PRIVMSG'] = Privmsg
@attr.s(slots=True, frozen=True)
class Notice(Message):
"""`NOTICE <target> <message>`
Related: NoRecipient, NoTextToSend, CantSendToChan, NoTopLevel, WildTopLevel, TooManyTargets, NoSuchNick, AwayReply.
"""
verb = 'NOTICE'
target = attr.ib()
message = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.message)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for Notice')
i = 0
v_target = arguments[i]
i += 1
v_message = arguments[i]
i += 1
return cls(
source,
v_target,
v_message,
)
MESSAGES['NOTICE'] = Notice
@attr.s(slots=True, frozen=True)
class Motd(Message):
"""`MOTD [target]`
Related: MotdStart, MotdText, MotdEnd, NoMotd.
"""
verb = 'MOTD'
target = attr.ib(default=None)
@property
def arguments(self):
ret = []
if self.target is not None:
ret.append(self.target)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments)
if num_optionals < 0:
raise IrcParseError('bad arguments for Motd')
i = 0
v_target = None
if num_optionals > 0:
v_target = arguments[i]
i += 1
return cls(
source,
v_target,
)
MESSAGES['MOTD'] = Motd
@attr.s(slots=True, frozen=True)
class Lusers(Message):
"""`LUSERS [mask] [target]`
Related: LuserClient, LuserOp, LuserUnknown, LuserChannels, LuserMe, NoSuchServer.
"""
verb = 'LUSERS'
mask = attr.ib(default=None)
target = attr.ib(default=None)
@property
def arguments(self):
ret = []
if self.mask is not None:
ret.append(self.mask)
if self.target is not None:
ret.append(self.target)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments)
if num_optionals < 0:
raise IrcParseError('bad arguments for Lusers')
i = 0
v_mask = None
if num_optionals > 0:
v_mask = arguments[i]
i += 1
v_target = None
if num_optionals > 1:
v_target = arguments[i]
i += 1
return cls(
source,
v_mask,
v_target,
)
MESSAGES['LUSERS'] = Lusers
@attr.s(slots=True, frozen=True)
class Version(Message):
"""`VERSION [target]`
Related: NoSuchServer, VersionReply.
"""
verb = 'VERSION'
target = attr.ib(default=None)
@property
def arguments(self):
ret = []
if self.target is not None:
ret.append(self.target)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments)
if num_optionals < 0:
raise IrcParseError('bad arguments for Version')
i = 0
v_target = None
if num_optionals > 0:
v_target = arguments[i]
i += 1
return cls(
source,
v_target,
)
MESSAGES['VERSION'] = Version
@attr.s(slots=True, frozen=True)
class Stats(Message):
"""`STATS [query] [target]`
Related: NoSuchServer, StatsLinkInfo, StatsUptime, StatsCommands, StatsOline, StatsEnd.
"""
verb = 'STATS'
query = attr.ib(default=None)
target = attr.ib(default=None)
@property
def arguments(self):
ret = []
if self.query is not None:
ret.append(self.query)
if self.target is not None:
ret.append(self.target)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments)
if num_optionals < 0:
raise IrcParseError('bad arguments for Stats')
i = 0
v_query = None
if num_optionals > 0:
v_query = arguments[i]
i += 1
v_target = None
if num_optionals > 1:
v_target = arguments[i]
i += 1
return cls(
source,
v_query,
v_target,
)
MESSAGES['STATS'] = Stats
@attr.s(slots=True, frozen=True)
class Links(Message):
"""`LINKS [server] [mask]`
Arguments bind right-to-left.
Related: NoSuchServer, LinksReply, LinksEnd.
"""
verb = 'LINKS'
server = attr.ib(default=None)
mask = attr.ib(default=None)
@property
def arguments(self):
ret = []
if self.server is not None:
ret.append(self.server)
if self.mask is not None:
ret.append(self.mask)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments)
if num_optionals < 0:
raise IrcParseError('bad arguments for Links')
i = 0
v_server = None
if num_optionals > 1:
v_server = arguments[i]
i += 1
v_mask = None
if num_optionals > 0:
v_mask = arguments[i]
i += 1
return cls(
source,
v_server,
v_mask,
)
MESSAGES['LINKS'] = Links
@attr.s(slots=True, frozen=True)
class Time(Message):
"""`TIME [target]`
Related: NoSuchServer, TimeReply.
"""
verb = 'TIME'
target = attr.ib(default=None)
@property
def arguments(self):
ret = []
if self.target is not None:
ret.append(self.target)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments)
if num_optionals < 0:
raise IrcParseError('bad arguments for Time')
i = 0
v_target = None
if num_optionals > 0:
v_target = arguments[i]
i += 1
return cls(
source,
v_target,
)
MESSAGES['TIME'] = Time
@attr.s(slots=True, frozen=True)
class ServerConnect(Message):
"""`CONNECT <target> <int:port> [remote]`
Related: NoSuchServer, NoPrivileges, NeedMoreParams.
"""
verb = 'CONNECT'
target = attr.ib()
port = attr.ib()
remote = attr.ib(default=None)
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(str(self.port))
if self.remote is not None:
ret.append(self.remote)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for ServerConnect')
i = 0
v_target = arguments[i]
i += 1
v_port = int(arguments[i])
i += 1
v_remote = None
if num_optionals > 0:
v_remote = arguments[i]
i += 1
return cls(
source,
v_target,
v_port,
v_remote,
)
MESSAGES['CONNECT'] = ServerConnect
@attr.s(slots=True, frozen=True)
class Trace(Message):
"""`TRACE [target]`
Related: NoSuchServer, TraceLinkReply, TraceConnecting, TraceHandshake, TraceUnknown, TraceOperator, TraceUser, TraceServer, TraceService, TraceNewtype, TraceClass, TraceLog, TraceEnd.
"""
verb = 'TRACE'
target = attr.ib(default=None)
@property
def arguments(self):
ret = []
if self.target is not None:
ret.append(self.target)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments)
if num_optionals < 0:
raise IrcParseError('bad arguments for Trace')
i = 0
v_target = None
if num_optionals > 0:
v_target = arguments[i]
i += 1
return cls(
source,
v_target,
)
MESSAGES['TRACE'] = Trace
@attr.s(slots=True, frozen=True)
class Admin(Message):
"""`ADMIN [target]`
Related: NoSuchServer, AdminMe, AdminLoc1, AdminLoc2, AdminEmail.
"""
verb = 'ADMIN'
target = attr.ib(default=None)
@property
def arguments(self):
ret = []
if self.target is not None:
ret.append(self.target)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments)
if num_optionals < 0:
raise IrcParseError('bad arguments for Admin')
i = 0
v_target = None
if num_optionals > 0:
v_target = arguments[i]
i += 1
return cls(
source,
v_target,
)
MESSAGES['ADMIN'] = Admin
@attr.s(slots=True, frozen=True)
class Info(Message):
"""`INFO [target]`
Related: NoSuchServer, InfoReply, InfoEnd.
"""
verb = 'INFO'
target = attr.ib(default=None)
@property
def arguments(self):
ret = []
if self.target is not None:
ret.append(self.target)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments)
if num_optionals < 0:
raise IrcParseError('bad arguments for Info')
i = 0
v_target = None
if num_optionals > 0:
v_target = arguments[i]
i += 1
return cls(
source,
v_target,
)
MESSAGES['INFO'] = Info
@attr.s(slots=True, frozen=True)
class ServList(Message):
"""`SERVLIST [mask] [type]`
Related: ServListReply, ServListEnd.
"""
verb = 'SERVLIST'
mask = attr.ib(default=None)
type = attr.ib(default=None)
@property
def arguments(self):
ret = []
if self.mask is not None:
ret.append(self.mask)
if self.type is not None:
ret.append(self.type)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments)
if num_optionals < 0:
raise IrcParseError('bad arguments for ServList')
i = 0
v_mask = None
if num_optionals > 0:
v_mask = arguments[i]
i += 1
v_type = None
if num_optionals > 1:
v_type = arguments[i]
i += 1
return cls(
source,
v_mask,
v_type,
)
MESSAGES['SERVLIST'] = ServList
@attr.s(slots=True, frozen=True)
class SQuery(Message):
"""`SQUERY <servicename> <text>`
Related: NoRecipient, NoTextToSend, CantSendToChan, NoTopLevel, WildTopLevel, TooManyTargets, NoSuchNick, AwayReply.
"""
verb = 'SQUERY'
servicename = attr.ib()
text = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.servicename)
ret.append(self.text)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for SQuery')
i = 0
v_servicename = arguments[i]
i += 1
v_text = arguments[i]
i += 1
return cls(
source,
v_servicename,
v_text,
)
MESSAGES['SQUERY'] = SQuery
@attr.s(slots=True, frozen=True)
class Who(Message):
"""`WHO [mask] [flag(o):operators]`
Related: NoSuchServer, WhoReply, WhoEnd.
"""
verb = 'WHO'
mask = attr.ib(default=None)
operators = attr.ib(default=False)
@property
def arguments(self):
ret = []
if self.mask is not None:
ret.append(self.mask)
if self.operators:
ret.append('o')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments)
if num_optionals < 0:
raise IrcParseError('bad arguments for Who')
i = 0
v_mask = None
if num_optionals > 0:
v_mask = arguments[i]
i += 1
v_operators = False
if num_optionals > 1:
v_operators = True
i += 1
return cls(
source,
v_mask,
v_operators,
)
MESSAGES['WHO'] = Who
@attr.s(slots=True, frozen=True)
class WhoIs(Message):
"""`WHOIS [target] <masks,>`
Related: NoSuchServer, NoNicknameGiven, WhoIsUser, WhoIsChannels, WhoIsServer, AwayReply, WhoIsOperator, WhoIsIdle, NoSuchNick, WhoIsEnd.
"""
verb = 'WHOIS'
target = attr.ib(default=None)
masks = attr.ib(kw_only=True)
@property
def arguments(self):
ret = []
if self.target is not None:
ret.append(self.target)
ret.append(','.join(v for v in self.masks))
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 1
if num_optionals < 0:
raise IrcParseError('bad arguments for WhoIs')
i = 0
v_target = None
if num_optionals > 0:
v_target = arguments[i]
i += 1
v_masks = [v for v in arguments[i].split(',')]
i += 1
return cls(
source,
v_target,
v_masks,
)
MESSAGES['WHOIS'] = WhoIs
@attr.s(slots=True, frozen=True)
class WhoWas(Message):
"""`WHOWAS <nicknames,> [int:count] [target]`
Related: NoNicknameGiven, WasNoSuchNick, WhoWasUser, WhoIsServer, WhoWasEnd.
"""
verb = 'WHOWAS'
nicknames = attr.ib()
count = attr.ib(default=None)
target = attr.ib(default=None)
@property
def arguments(self):
ret = []
ret.append(','.join(v for v in self.nicknames))
if self.count is not None:
ret.append(str(self.count))
if self.target is not None:
ret.append(self.target)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 1
if num_optionals < 0:
raise IrcParseError('bad arguments for WhoWas')
i = 0
v_nicknames = [v for v in arguments[i].split(',')]
i += 1
v_count = None
if num_optionals > 0:
v_count = int(arguments[i])
i += 1
v_target = None
if num_optionals > 1:
v_target = arguments[i]
i += 1
return cls(
source,
v_nicknames,
v_count,
v_target,
)
MESSAGES['WHOWAS'] = WhoWas
@attr.s(slots=True, frozen=True)
class Kill(Message):
"""`KILL <nickname> <comment>`
Related: NoPrivileges, NeedMoreParams, NoSuchNick, CantKillServer.
"""
verb = 'KILL'
nickname = attr.ib()
comment = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.nickname)
ret.append(self.comment)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for Kill')
i = 0
v_nickname = arguments[i]
i += 1
v_comment = arguments[i]
i += 1
return cls(
source,
v_nickname,
v_comment,
)
MESSAGES['KILL'] = Kill
@attr.s(slots=True, frozen=True)
class Ping(Message):
"""`PING <server1> [server2]`
Related: NoOrigin, NoSuchServer.
"""
verb = 'PING'
server1 = attr.ib()
server2 = attr.ib(default=None)
@property
def arguments(self):
ret = []
ret.append(self.server1)
if self.server2 is not None:
ret.append(self.server2)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 1
if num_optionals < 0:
raise IrcParseError('bad arguments for Ping')
i = 0
v_server1 = arguments[i]
i += 1
v_server2 = None
if num_optionals > 0:
v_server2 = arguments[i]
i += 1
return cls(
source,
v_server1,
v_server2,
)
MESSAGES['PING'] = Ping
@attr.s(slots=True, frozen=True)
class Pong(Message):
"""`PONG <server> [server2]`
Related: NoOrigin, NoSuchServer.
"""
verb = 'PONG'
server = attr.ib()
server2 = attr.ib(default=None)
@property
def arguments(self):
ret = []
ret.append(self.server)
if self.server2 is not None:
ret.append(self.server2)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 1
if num_optionals < 0:
raise IrcParseError('bad arguments for Pong')
i = 0
v_server = arguments[i]
i += 1
v_server2 = None
if num_optionals > 0:
v_server2 = arguments[i]
i += 1
return cls(
source,
v_server,
v_server2,
)
MESSAGES['PONG'] = Pong
@attr.s(slots=True, frozen=True)
class Error(Message):
"""`ERROR <message>`
"""
verb = 'ERROR'
message = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.message)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 1
if num_optionals < 0:
raise IrcParseError('bad arguments for Error')
i = 0
v_message = arguments[i]
i += 1
return cls(
source,
v_message,
)
MESSAGES['ERROR'] = Error
@attr.s(slots=True, frozen=True)
class Away(Message):
"""`AWAY [text]`
Related: UnawayReply, NowAwayReply.
"""
verb = 'AWAY'
text = attr.ib(default=None)
@property
def arguments(self):
ret = []
if self.text is not None:
ret.append(self.text)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments)
if num_optionals < 0:
raise IrcParseError('bad arguments for Away')
i = 0
v_text = None
if num_optionals > 0:
v_text = arguments[i]
i += 1
return cls(
source,
v_text,
)
MESSAGES['AWAY'] = Away
@attr.s(slots=True, frozen=True)
class Rehash(Message):
"""`REHASH`
Related: Rehashing, NoPrivileges.
"""
verb = 'REHASH'
@property
def arguments(self):
ret = []
return ret
@classmethod
def from_arguments(cls, source, arguments):
return cls(
source,
)
MESSAGES['REHASH'] = Rehash
@attr.s(slots=True, frozen=True)
class Die(Message):
"""`DIE`
Related: NoPrivileges.
"""
verb = 'DIE'
@property
def arguments(self):
ret = []
return ret
@classmethod
def from_arguments(cls, source, arguments):
return cls(
source,
)
MESSAGES['DIE'] = Die
@attr.s(slots=True, frozen=True)
class Restart(Message):
"""`RESTART`
Related: NoPrivileges.
"""
verb = 'RESTART'
@property
def arguments(self):
ret = []
return ret
@classmethod
def from_arguments(cls, source, arguments):
return cls(
source,
)
MESSAGES['RESTART'] = Restart
@attr.s(slots=True, frozen=True)
class Summon(Message):
"""`SUMMON <user> [target] [channel]`
Related: NoRecipient, FileError, NoLogin, NoSuchServer, SummonDisabled, Summoning.
"""
verb = 'SUMMON'
user = attr.ib()
target = attr.ib(default=None)
channel = attr.ib(default=None)
@property
def arguments(self):
ret = []
ret.append(self.user)
if self.target is not None:
ret.append(self.target)
if self.channel is not None:
ret.append(self.channel)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 1
if num_optionals < 0:
raise IrcParseError('bad arguments for Summon')
i = 0
v_user = arguments[i]
i += 1
v_target = None
if num_optionals > 0:
v_target = arguments[i]
i += 1
v_channel = None
if num_optionals > 1:
v_channel = arguments[i]
i += 1
return cls(
source,
v_user,
v_target,
v_channel,
)
MESSAGES['SUMMON'] = Summon
@attr.s(slots=True, frozen=True)
class Users(Message):
"""`USERS [target]`
Related: NoSuchServer, FileError, UsersStart, UsersReply, NoUsers, UsersEnd, UsersDisabled.
"""
verb = 'USERS'
target = attr.ib(default=None)
@property
def arguments(self):
ret = []
if self.target is not None:
ret.append(self.target)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments)
if num_optionals < 0:
raise IrcParseError('bad arguments for Users')
i = 0
v_target = None
if num_optionals > 0:
v_target = arguments[i]
i += 1
return cls(
source,
v_target,
)
MESSAGES['USERS'] = Users
@attr.s(slots=True, frozen=True)
class WallOps(Message):
"""`WALLOPS <message>`
Related: NeedMoreParams.
"""
verb = 'WALLOPS'
message = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.message)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 1
if num_optionals < 0:
raise IrcParseError('bad arguments for WallOps')
i = 0
v_message = arguments[i]
i += 1
return cls(
source,
v_message,
)
MESSAGES['WALLOPS'] = WallOps
@attr.s(slots=True, frozen=True)
class UserHost(Message):
"""`USERHOST <nickname>`
FIXME many nicknames.
Related: UserHostReply, NeedMoreParams.
"""
verb = 'USERHOST'
nickname = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.nickname)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 1
if num_optionals < 0:
raise IrcParseError('bad arguments for UserHost')
i = 0
v_nickname = arguments[i]
i += 1
return cls(
source,
v_nickname,
)
MESSAGES['USERHOST'] = UserHost
@attr.s(slots=True, frozen=True)
class IsOn(Message):
"""`ISON <nickname>`
FIXME many nicknames.
Related: IsOnReply, NeedMoreParams.
"""
verb = 'ISON'
nickname = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.nickname)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 1
if num_optionals < 0:
raise IrcParseError('bad arguments for IsOn')
i = 0
v_nickname = arguments[i]
i += 1
return cls(
source,
v_nickname,
)
MESSAGES['ISON'] = IsOn
@attr.s(slots=True, frozen=True)
class Welcome(Message):
"""`001 <target> <message>`
"""
verb = 1
target = attr.ib()
message = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.message)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for Welcome')
i = 0
v_target = arguments[i]
i += 1
v_message = arguments[i]
i += 1
return cls(
source,
v_target,
v_message,
)
MESSAGES[1] = Welcome
@attr.s(slots=True, frozen=True)
class YourHost(Message):
"""`002 <target> <message>`
"""
verb = 2
target = attr.ib()
message = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.message)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for YourHost')
i = 0
v_target = arguments[i]
i += 1
v_message = arguments[i]
i += 1
return cls(
source,
v_target,
v_message,
)
MESSAGES[2] = YourHost
@attr.s(slots=True, frozen=True)
class Created(Message):
"""`003 <target> <message>`
"""
verb = 3
target = attr.ib()
message = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.message)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for Created')
i = 0
v_target = arguments[i]
i += 1
v_message = arguments[i]
i += 1
return cls(
source,
v_target,
v_message,
)
MESSAGES[3] = Created
@attr.s(slots=True, frozen=True)
class MyInfo(Message):
"""`004 <target> <message>`
"""
verb = 4
target = attr.ib()
message = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.message)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for MyInfo')
i = 0
v_target = arguments[i]
i += 1
v_message = arguments[i]
i += 1
return cls(
source,
v_target,
v_message,
)
MESSAGES[4] = MyInfo
@attr.s(slots=True, frozen=True)
class Bounce(Message):
"""`005 <target> <message>`
"""
verb = 5
target = attr.ib()
message = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.message)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for Bounce')
i = 0
v_target = arguments[i]
i += 1
v_message = arguments[i]
i += 1
return cls(
source,
v_target,
v_message,
)
MESSAGES[5] = Bounce
@attr.s(slots=True, frozen=True)
class TraceLinkReply(Message):
"""`200 <target> Link <version> <destination> <next> <protocol-version> <link-uptime> <back-send-q> <up-send-q>`
"""
verb = 200
target = attr.ib()
version = attr.ib()
destination = attr.ib()
next = attr.ib()
protocol_version = attr.ib()
link_uptime = attr.ib()
back_send_q = attr.ib()
up_send_q = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append('Link')
ret.append(self.version)
ret.append(self.destination)
ret.append(self.next)
ret.append(self.protocol_version)
ret.append(self.link_uptime)
ret.append(self.back_send_q)
ret.append(self.up_send_q)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 9
if num_optionals < 0:
raise IrcParseError('bad arguments for TraceLinkReply')
i = 0
v_target = arguments[i]
i += 1
# literal 'Link'
i += 1
v_version = arguments[i]
i += 1
v_destination = arguments[i]
i += 1
v_next = arguments[i]
i += 1
v_protocol_version = arguments[i]
i += 1
v_link_uptime = arguments[i]
i += 1
v_back_send_q = arguments[i]
i += 1
v_up_send_q = arguments[i]
i += 1
return cls(
source,
v_target,
v_version,
v_destination,
v_next,
v_protocol_version,
v_link_uptime,
v_back_send_q,
v_up_send_q,
)
MESSAGES[200] = TraceLinkReply
@attr.s(slots=True, frozen=True)
class TraceConnecting(Message):
"""`201 <target> Try. <class> <server>`
"""
verb = 201
target = attr.ib()
klass = attr.ib()
server = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append('Try.')
ret.append(self.klass)
ret.append(self.server)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 4
if num_optionals < 0:
raise IrcParseError('bad arguments for TraceConnecting')
i = 0
v_target = arguments[i]
i += 1
# literal 'Try.'
i += 1
v_klass = arguments[i]
i += 1
v_server = arguments[i]
i += 1
return cls(
source,
v_target,
v_klass,
v_server,
)
MESSAGES[201] = TraceConnecting
@attr.s(slots=True, frozen=True)
class TraceHandshake(Message):
"""`202 <target> H.S. <class> <server>`
"""
verb = 202
target = attr.ib()
klass = attr.ib()
server = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append('H.S.')
ret.append(self.klass)
ret.append(self.server)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 4
if num_optionals < 0:
raise IrcParseError('bad arguments for TraceHandshake')
i = 0
v_target = arguments[i]
i += 1
# literal 'H.S.'
i += 1
v_klass = arguments[i]
i += 1
v_server = arguments[i]
i += 1
return cls(
source,
v_target,
v_klass,
v_server,
)
MESSAGES[202] = TraceHandshake
@attr.s(slots=True, frozen=True)
class TraceUnknown(Message):
"""`203 <target> ???? <class> [ip]`
"""
verb = 203
target = attr.ib()
klass = attr.ib()
ip = attr.ib(default=None)
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append('????')
ret.append(self.klass)
if self.ip is not None:
ret.append(self.ip)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for TraceUnknown')
i = 0
v_target = arguments[i]
i += 1
# literal '????'
i += 1
v_klass = arguments[i]
i += 1
v_ip = None
if num_optionals > 0:
v_ip = arguments[i]
i += 1
return cls(
source,
v_target,
v_klass,
v_ip,
)
MESSAGES[203] = TraceUnknown
@attr.s(slots=True, frozen=True)
class TraceOperator(Message):
"""`204 <target> Oper <class> <nickname>`
"""
verb = 204
target = attr.ib()
klass = attr.ib()
nickname = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append('Oper')
ret.append(self.klass)
ret.append(self.nickname)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 4
if num_optionals < 0:
raise IrcParseError('bad arguments for TraceOperator')
i = 0
v_target = arguments[i]
i += 1
# literal 'Oper'
i += 1
v_klass = arguments[i]
i += 1
v_nickname = arguments[i]
i += 1
return cls(
source,
v_target,
v_klass,
v_nickname,
)
MESSAGES[204] = TraceOperator
@attr.s(slots=True, frozen=True)
class TraceUser(Message):
"""`205 <target> User <class> <nickname>`
"""
verb = 205
target = attr.ib()
klass = attr.ib()
nickname = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append('User')
ret.append(self.klass)
ret.append(self.nickname)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 4
if num_optionals < 0:
raise IrcParseError('bad arguments for TraceUser')
i = 0
v_target = arguments[i]
i += 1
# literal 'User'
i += 1
v_klass = arguments[i]
i += 1
v_nickname = arguments[i]
i += 1
return cls(
source,
v_target,
v_klass,
v_nickname,
)
MESSAGES[205] = TraceUser
@attr.s(slots=True, frozen=True)
class TraceServer(Message):
"""`206 <target> Serv <class> <s> <c> <server> <hostmask> <protocol-version>`
"""
verb = 206
target = attr.ib()
klass = attr.ib()
s = attr.ib()
c = attr.ib()
server = attr.ib()
hostmask = attr.ib()
protocol_version = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append('Serv')
ret.append(self.klass)
ret.append(self.s)
ret.append(self.c)
ret.append(self.server)
ret.append(self.hostmask)
ret.append(self.protocol_version)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 8
if num_optionals < 0:
raise IrcParseError('bad arguments for TraceServer')
i = 0
v_target = arguments[i]
i += 1
# literal 'Serv'
i += 1
v_klass = arguments[i]
i += 1
v_s = arguments[i]
i += 1
v_c = arguments[i]
i += 1
v_server = arguments[i]
i += 1
v_hostmask = arguments[i]
i += 1
v_protocol_version = arguments[i]
i += 1
return cls(
source,
v_target,
v_klass,
v_s,
v_c,
v_server,
v_hostmask,
v_protocol_version,
)
MESSAGES[206] = TraceServer
@attr.s(slots=True, frozen=True)
class TraceService(Message):
"""`207 <target> Service <class> <name> <type> <active-type>`
"""
verb = 207
target = attr.ib()
klass = attr.ib()
name = attr.ib()
type = attr.ib()
active_type = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append('Service')
ret.append(self.klass)
ret.append(self.name)
ret.append(self.type)
ret.append(self.active_type)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 6
if num_optionals < 0:
raise IrcParseError('bad arguments for TraceService')
i = 0
v_target = arguments[i]
i += 1
# literal 'Service'
i += 1
v_klass = arguments[i]
i += 1
v_name = arguments[i]
i += 1
v_type = arguments[i]
i += 1
v_active_type = arguments[i]
i += 1
return cls(
source,
v_target,
v_klass,
v_name,
v_type,
v_active_type,
)
MESSAGES[207] = TraceService
@attr.s(slots=True, frozen=True)
class TraceNewtype(Message):
"""`208 <target> <newtype> 0 <name>`
"""
verb = 208
target = attr.ib()
newtype = attr.ib()
name = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.newtype)
ret.append('0')
ret.append(self.name)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 4
if num_optionals < 0:
raise IrcParseError('bad arguments for TraceNewtype')
i = 0
v_target = arguments[i]
i += 1
v_newtype = arguments[i]
i += 1
# literal '0'
i += 1
v_name = arguments[i]
i += 1
return cls(
source,
v_target,
v_newtype,
v_name,
)
MESSAGES[208] = TraceNewtype
@attr.s(slots=True, frozen=True)
class TraceClass(Message):
"""`209 <target> Class <class> <int:count>`
"""
verb = 209
target = attr.ib()
klass = attr.ib()
count = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append('Class')
ret.append(self.klass)
ret.append(str(self.count))
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 4
if num_optionals < 0:
raise IrcParseError('bad arguments for TraceClass')
i = 0
v_target = arguments[i]
i += 1
# literal 'Class'
i += 1
v_klass = arguments[i]
i += 1
v_count = int(arguments[i])
i += 1
return cls(
source,
v_target,
v_klass,
v_count,
)
MESSAGES[209] = TraceClass
@attr.s(slots=True, frozen=True)
class StatsLinkInfo(Message):
"""`211 <target> <name> <sendq> <int:sent-messages> <int:sent-kbytes> <int:recv-messages> <int:recv-kbytes> <int:uptime>`
"""
verb = 211
target = attr.ib()
name = attr.ib()
sendq = attr.ib()
sent_messages = attr.ib()
sent_kbytes = attr.ib()
recv_messages = attr.ib()
recv_kbytes = attr.ib()
uptime = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.name)
ret.append(self.sendq)
ret.append(str(self.sent_messages))
ret.append(str(self.sent_kbytes))
ret.append(str(self.recv_messages))
ret.append(str(self.recv_kbytes))
ret.append(str(self.uptime))
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 8
if num_optionals < 0:
raise IrcParseError('bad arguments for StatsLinkInfo')
i = 0
v_target = arguments[i]
i += 1
v_name = arguments[i]
i += 1
v_sendq = arguments[i]
i += 1
v_sent_messages = int(arguments[i])
i += 1
v_sent_kbytes = int(arguments[i])
i += 1
v_recv_messages = int(arguments[i])
i += 1
v_recv_kbytes = int(arguments[i])
i += 1
v_uptime = int(arguments[i])
i += 1
return cls(
source,
v_target,
v_name,
v_sendq,
v_sent_messages,
v_sent_kbytes,
v_recv_messages,
v_recv_kbytes,
v_uptime,
)
MESSAGES[211] = StatsLinkInfo
@attr.s(slots=True, frozen=True)
class StatsCommands(Message):
"""`212 <target> <command> <int:count> <int:bytes> <int:remote-count>`
"""
verb = 212
target = attr.ib()
command = attr.ib()
count = attr.ib()
bytes = attr.ib()
remote_count = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.command)
ret.append(str(self.count))
ret.append(str(self.bytes))
ret.append(str(self.remote_count))
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 5
if num_optionals < 0:
raise IrcParseError('bad arguments for StatsCommands')
i = 0
v_target = arguments[i]
i += 1
v_command = arguments[i]
i += 1
v_count = int(arguments[i])
i += 1
v_bytes = int(arguments[i])
i += 1
v_remote_count = int(arguments[i])
i += 1
return cls(
source,
v_target,
v_command,
v_count,
v_bytes,
v_remote_count,
)
MESSAGES[212] = StatsCommands
@attr.s(slots=True, frozen=True)
class StatsEnd(Message):
"""`219 <target> <letter> :End of STATS report`
"""
verb = 219
target = attr.ib()
letter = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.letter)
ret.append('End of STATS report')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for StatsEnd')
i = 0
v_target = arguments[i]
i += 1
v_letter = arguments[i]
i += 1
# literal 'End of STATS report'
i += 1
return cls(
source,
v_target,
v_letter,
)
MESSAGES[219] = StatsEnd
@attr.s(slots=True, frozen=True)
class UserModeIs(Message):
"""`221 <target> <mode>`
"""
verb = 221
target = attr.ib()
mode = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.mode)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for UserModeIs')
i = 0
v_target = arguments[i]
i += 1
v_mode = arguments[i]
i += 1
return cls(
source,
v_target,
v_mode,
)
MESSAGES[221] = UserModeIs
@attr.s(slots=True, frozen=True)
class ServListReply(Message):
"""`234 <target> <name> <server> <mask> <type> <int:hopcount> <info>`
"""
verb = 234
target = attr.ib()
name = attr.ib()
server = attr.ib()
mask = attr.ib()
type = attr.ib()
hopcount = attr.ib()
info = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.name)
ret.append(self.server)
ret.append(self.mask)
ret.append(self.type)
ret.append(str(self.hopcount))
ret.append(self.info)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 7
if num_optionals < 0:
raise IrcParseError('bad arguments for ServListReply')
i = 0
v_target = arguments[i]
i += 1
v_name = arguments[i]
i += 1
v_server = arguments[i]
i += 1
v_mask = arguments[i]
i += 1
v_type = arguments[i]
i += 1
v_hopcount = int(arguments[i])
i += 1
v_info = arguments[i]
i += 1
return cls(
source,
v_target,
v_name,
v_server,
v_mask,
v_type,
v_hopcount,
v_info,
)
MESSAGES[234] = ServListReply
@attr.s(slots=True, frozen=True)
class ServListEnd(Message):
"""`235 <target> <mask> <type> :End of service listing`
"""
verb = 235
target = attr.ib()
mask = attr.ib()
type = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.mask)
ret.append(self.type)
ret.append('End of service listing')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 4
if num_optionals < 0:
raise IrcParseError('bad arguments for ServListEnd')
i = 0
v_target = arguments[i]
i += 1
v_mask = arguments[i]
i += 1
v_type = arguments[i]
i += 1
# literal 'End of service listing'
i += 1
return cls(
source,
v_target,
v_mask,
v_type,
)
MESSAGES[235] = ServListEnd
@attr.s(slots=True, frozen=True)
class StatsUptime(Message):
"""`242 <target> <message>`
"""
verb = 242
target = attr.ib()
message = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.message)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for StatsUptime')
i = 0
v_target = arguments[i]
i += 1
v_message = arguments[i]
i += 1
return cls(
source,
v_target,
v_message,
)
MESSAGES[242] = StatsUptime
@attr.s(slots=True, frozen=True)
class StatsOline(Message):
"""`243 <target> O <hostmask> * <name>`
"""
verb = 243
target = attr.ib()
hostmask = attr.ib()
name = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append('O')
ret.append(self.hostmask)
ret.append('*')
ret.append(self.name)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 5
if num_optionals < 0:
raise IrcParseError('bad arguments for StatsOline')
i = 0
v_target = arguments[i]
i += 1
# literal 'O'
i += 1
v_hostmask = arguments[i]
i += 1
# literal '*'
i += 1
v_name = arguments[i]
i += 1
return cls(
source,
v_target,
v_hostmask,
v_name,
)
MESSAGES[243] = StatsOline
@attr.s(slots=True, frozen=True)
class LuserClient(Message):
"""`251 <target> <message>`
"""
verb = 251
target = attr.ib()
message = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.message)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for LuserClient')
i = 0
v_target = arguments[i]
i += 1
v_message = arguments[i]
i += 1
return cls(
source,
v_target,
v_message,
)
MESSAGES[251] = LuserClient
@attr.s(slots=True, frozen=True)
class LuserOp(Message):
"""`252 <target> <int:count> :operator(s) online`
"""
verb = 252
target = attr.ib()
count = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(str(self.count))
ret.append('operator(s) online')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for LuserOp')
i = 0
v_target = arguments[i]
i += 1
v_count = int(arguments[i])
i += 1
# literal 'operator(s) online'
i += 1
return cls(
source,
v_target,
v_count,
)
MESSAGES[252] = LuserOp
@attr.s(slots=True, frozen=True)
class LuserUnknown(Message):
"""`253 <target> <int:count> :unknown connection(s)`
"""
verb = 253
target = attr.ib()
count = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(str(self.count))
ret.append('unknown connection(s)')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for LuserUnknown')
i = 0
v_target = arguments[i]
i += 1
v_count = int(arguments[i])
i += 1
# literal 'unknown connection(s)'
i += 1
return cls(
source,
v_target,
v_count,
)
MESSAGES[253] = LuserUnknown
@attr.s(slots=True, frozen=True)
class LuserChannels(Message):
"""`254 <target> <int:count> :channels formed`
"""
verb = 254
target = attr.ib()
count = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(str(self.count))
ret.append('channels formed')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for LuserChannels')
i = 0
v_target = arguments[i]
i += 1
v_count = int(arguments[i])
i += 1
# literal 'channels formed'
i += 1
return cls(
source,
v_target,
v_count,
)
MESSAGES[254] = LuserChannels
@attr.s(slots=True, frozen=True)
class LuserMe(Message):
"""`255 <target> <message>`
"""
verb = 255
target = attr.ib()
message = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.message)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for LuserMe')
i = 0
v_target = arguments[i]
i += 1
v_message = arguments[i]
i += 1
return cls(
source,
v_target,
v_message,
)
MESSAGES[255] = LuserMe
@attr.s(slots=True, frozen=True)
class AdminMe(Message):
"""`256 <target> <server> :Administrative info`
"""
verb = 256
target = attr.ib()
server = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.server)
ret.append('Administrative info')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for AdminMe')
i = 0
v_target = arguments[i]
i += 1
v_server = arguments[i]
i += 1
# literal 'Administrative info'
i += 1
return cls(
source,
v_target,
v_server,
)
MESSAGES[256] = AdminMe
@attr.s(slots=True, frozen=True)
class AdminLoc1(Message):
"""`257 <target> <message>`
"""
verb = 257
target = attr.ib()
message = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.message)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for AdminLoc1')
i = 0
v_target = arguments[i]
i += 1
v_message = arguments[i]
i += 1
return cls(
source,
v_target,
v_message,
)
MESSAGES[257] = AdminLoc1
@attr.s(slots=True, frozen=True)
class AdminLoc2(Message):
"""`258 <target> <message>`
"""
verb = 258
target = attr.ib()
message = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.message)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for AdminLoc2')
i = 0
v_target = arguments[i]
i += 1
v_message = arguments[i]
i += 1
return cls(
source,
v_target,
v_message,
)
MESSAGES[258] = AdminLoc2
@attr.s(slots=True, frozen=True)
class AdminEmail(Message):
"""`259 <target> <email>`
"""
verb = 259
target = attr.ib()
email = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.email)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for AdminEmail')
i = 0
v_target = arguments[i]
i += 1
v_email = arguments[i]
i += 1
return cls(
source,
v_target,
v_email,
)
MESSAGES[259] = AdminEmail
@attr.s(slots=True, frozen=True)
class TraceLog(Message):
"""`261 <target> File <logfile> <debug-level>`
"""
verb = 261
target = attr.ib()
logfile = attr.ib()
debug_level = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append('File')
ret.append(self.logfile)
ret.append(self.debug_level)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 4
if num_optionals < 0:
raise IrcParseError('bad arguments for TraceLog')
i = 0
v_target = arguments[i]
i += 1
# literal 'File'
i += 1
v_logfile = arguments[i]
i += 1
v_debug_level = arguments[i]
i += 1
return cls(
source,
v_target,
v_logfile,
v_debug_level,
)
MESSAGES[261] = TraceLog
@attr.s(slots=True, frozen=True)
class TraceEnd(Message):
"""`262 <target> <server> <version> :End of TRACE`
"""
verb = 262
target = attr.ib()
server = attr.ib()
version = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.server)
ret.append(self.version)
ret.append('End of TRACE')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 4
if num_optionals < 0:
raise IrcParseError('bad arguments for TraceEnd')
i = 0
v_target = arguments[i]
i += 1
v_server = arguments[i]
i += 1
v_version = arguments[i]
i += 1
# literal 'End of TRACE'
i += 1
return cls(
source,
v_target,
v_server,
v_version,
)
MESSAGES[262] = TraceEnd
@attr.s(slots=True, frozen=True)
class TryAgain(Message):
"""`263 <target> <command> :Please wait a while and try again.`
"""
verb = 263
target = attr.ib()
command = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.command)
ret.append('Please wait a while and try again.')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for TryAgain')
i = 0
v_target = arguments[i]
i += 1
v_command = arguments[i]
i += 1
# literal 'Please wait a while and try again.'
i += 1
return cls(
source,
v_target,
v_command,
)
MESSAGES[263] = TryAgain
@attr.s(slots=True, frozen=True)
class AwayReply(Message):
"""`301 <target> <nickname> <message>`
"""
verb = 301
target = attr.ib()
nickname = attr.ib()
message = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.nickname)
ret.append(self.message)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for AwayReply')
i = 0
v_target = arguments[i]
i += 1
v_nickname = arguments[i]
i += 1
v_message = arguments[i]
i += 1
return cls(
source,
v_target,
v_nickname,
v_message,
)
MESSAGES[301] = AwayReply
@attr.s(slots=True, frozen=True)
class UserHostReply(Message):
"""`302 <target> <message>`
FIXME parse data!
"""
verb = 302
target = attr.ib()
message = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.message)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for UserHostReply')
i = 0
v_target = arguments[i]
i += 1
v_message = arguments[i]
i += 1
return cls(
source,
v_target,
v_message,
)
MESSAGES[302] = UserHostReply
@attr.s(slots=True, frozen=True)
class IsOnReply(Message):
"""`303 <target> <message>`
FIXME parse data!
"""
verb = 303
target = attr.ib()
message = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.message)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for IsOnReply')
i = 0
v_target = arguments[i]
i += 1
v_message = arguments[i]
i += 1
return cls(
source,
v_target,
v_message,
)
MESSAGES[303] = IsOnReply
@attr.s(slots=True, frozen=True)
class UnawayReply(Message):
"""`305 <target> :You are no longer marked as being away`
"""
verb = 305
target = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append('You are no longer marked as being away')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for UnawayReply')
i = 0
v_target = arguments[i]
i += 1
# literal 'You are no longer marked as being away'
i += 1
return cls(
source,
v_target,
)
MESSAGES[305] = UnawayReply
@attr.s(slots=True, frozen=True)
class NowAwayReply(Message):
"""`306 <target> :You have been marked as being away`
"""
verb = 306
target = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append('You have been marked as being away')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for NowAwayReply')
i = 0
v_target = arguments[i]
i += 1
# literal 'You have been marked as being away'
i += 1
return cls(
source,
v_target,
)
MESSAGES[306] = NowAwayReply
@attr.s(slots=True, frozen=True)
class WhoIsUser(Message):
"""`311 <target> <nickname> <user> <host> * <realname>`
"""
verb = 311
target = attr.ib()
nickname = attr.ib()
user = attr.ib()
host = attr.ib()
realname = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.nickname)
ret.append(self.user)
ret.append(self.host)
ret.append('*')
ret.append(self.realname)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 6
if num_optionals < 0:
raise IrcParseError('bad arguments for WhoIsUser')
i = 0
v_target = arguments[i]
i += 1
v_nickname = arguments[i]
i += 1
v_user = arguments[i]
i += 1
v_host = arguments[i]
i += 1
# literal '*'
i += 1
v_realname = arguments[i]
i += 1
return cls(
source,
v_target,
v_nickname,
v_user,
v_host,
v_realname,
)
MESSAGES[311] = WhoIsUser
@attr.s(slots=True, frozen=True)
class WhoIsServer(Message):
"""`312 <target> <nickname> <server> <info>`
"""
verb = 312
target = attr.ib()
nickname = attr.ib()
server = attr.ib()
info = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.nickname)
ret.append(self.server)
ret.append(self.info)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 4
if num_optionals < 0:
raise IrcParseError('bad arguments for WhoIsServer')
i = 0
v_target = arguments[i]
i += 1
v_nickname = arguments[i]
i += 1
v_server = arguments[i]
i += 1
v_info = arguments[i]
i += 1
return cls(
source,
v_target,
v_nickname,
v_server,
v_info,
)
MESSAGES[312] = WhoIsServer
@attr.s(slots=True, frozen=True)
class WhoIsOperator(Message):
"""`313 <target> <nickname> :is an IRC operator`
"""
verb = 313
target = attr.ib()
nickname = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.nickname)
ret.append('is an IRC operator')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for WhoIsOperator')
i = 0
v_target = arguments[i]
i += 1
v_nickname = arguments[i]
i += 1
# literal 'is an IRC operator'
i += 1
return cls(
source,
v_target,
v_nickname,
)
MESSAGES[313] = WhoIsOperator
@attr.s(slots=True, frozen=True)
class WhoWasUser(Message):
"""`314 <target> <nickname> <user> <host> * <realname>`
"""
verb = 314
target = attr.ib()
nickname = attr.ib()
user = attr.ib()
host = attr.ib()
realname = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.nickname)
ret.append(self.user)
ret.append(self.host)
ret.append('*')
ret.append(self.realname)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 6
if num_optionals < 0:
raise IrcParseError('bad arguments for WhoWasUser')
i = 0
v_target = arguments[i]
i += 1
v_nickname = arguments[i]
i += 1
v_user = arguments[i]
i += 1
v_host = arguments[i]
i += 1
# literal '*'
i += 1
v_realname = arguments[i]
i += 1
return cls(
source,
v_target,
v_nickname,
v_user,
v_host,
v_realname,
)
MESSAGES[314] = WhoWasUser
@attr.s(slots=True, frozen=True)
class WhoEnd(Message):
"""`315 <target> <name> :End of WHO list`
"""
verb = 315
target = attr.ib()
name = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.name)
ret.append('End of WHO list')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for WhoEnd')
i = 0
v_target = arguments[i]
i += 1
v_name = arguments[i]
i += 1
# literal 'End of WHO list'
i += 1
return cls(
source,
v_target,
v_name,
)
MESSAGES[315] = WhoEnd
@attr.s(slots=True, frozen=True)
class WhoIsIdle(Message):
"""`317 <target> <nickname> <int:time> :seconds idle`
"""
verb = 317
target = attr.ib()
nickname = attr.ib()
time = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.nickname)
ret.append(str(self.time))
ret.append('seconds idle')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 4
if num_optionals < 0:
raise IrcParseError('bad arguments for WhoIsIdle')
i = 0
v_target = arguments[i]
i += 1
v_nickname = arguments[i]
i += 1
v_time = int(arguments[i])
i += 1
# literal 'seconds idle'
i += 1
return cls(
source,
v_target,
v_nickname,
v_time,
)
MESSAGES[317] = WhoIsIdle
@attr.s(slots=True, frozen=True)
class WhoIsEnd(Message):
"""`318 <target> <nickname> :End of WHOIS list`
"""
verb = 318
target = attr.ib()
nickname = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.nickname)
ret.append('End of WHOIS list')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for WhoIsEnd')
i = 0
v_target = arguments[i]
i += 1
v_nickname = arguments[i]
i += 1
# literal 'End of WHOIS list'
i += 1
return cls(
source,
v_target,
v_nickname,
)
MESSAGES[318] = WhoIsEnd
@attr.s(slots=True, frozen=True)
class WhoIsChannels(Message):
"""`319 <target> <nickname> <#channels>`
"""
verb = 319
target = attr.ib()
nickname = attr.ib()
channels = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.nickname)
ret.append(self.channels)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for WhoIsChannels')
i = 0
v_target = arguments[i]
i += 1
v_nickname = arguments[i]
i += 1
v_channels = arguments[i]
i += 1
return cls(
source,
v_target,
v_nickname,
v_channels,
)
MESSAGES[319] = WhoIsChannels
@attr.s(slots=True, frozen=True)
class ListReply(Message):
"""`322 <target> <#channel> <int:visible> <topic>`
"""
verb = 322
target = attr.ib()
channel = attr.ib()
visible = attr.ib()
topic = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.channel)
ret.append(str(self.visible))
ret.append(self.topic)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 4
if num_optionals < 0:
raise IrcParseError('bad arguments for ListReply')
i = 0
v_target = arguments[i]
i += 1
v_channel = arguments[i]
i += 1
v_visible = int(arguments[i])
i += 1
v_topic = arguments[i]
i += 1
return cls(
source,
v_target,
v_channel,
v_visible,
v_topic,
)
MESSAGES[322] = ListReply
@attr.s(slots=True, frozen=True)
class ListEnd(Message):
"""`323 <target> :End of LIST`
"""
verb = 323
target = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append('End of LIST')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for ListEnd')
i = 0
v_target = arguments[i]
i += 1
# literal 'End of LIST'
i += 1
return cls(
source,
v_target,
)
MESSAGES[323] = ListEnd
@attr.s(slots=True, frozen=True)
class ChannelModeIs(Message):
"""`324 <target> <#channel> <mode> <params>`
"""
verb = 324
target = attr.ib()
channel = attr.ib()
mode = attr.ib()
params = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.channel)
ret.append(self.mode)
ret.append(self.params)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 4
if num_optionals < 0:
raise IrcParseError('bad arguments for ChannelModeIs')
i = 0
v_target = arguments[i]
i += 1
v_channel = arguments[i]
i += 1
v_mode = arguments[i]
i += 1
v_params = arguments[i]
i += 1
return cls(
source,
v_target,
v_channel,
v_mode,
v_params,
)
MESSAGES[324] = ChannelModeIs
@attr.s(slots=True, frozen=True)
class UniqOpIs(Message):
"""`325 <target> <#channel> <nickname>`
"""
verb = 325
target = attr.ib()
channel = attr.ib()
nickname = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.channel)
ret.append(self.nickname)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for UniqOpIs')
i = 0
v_target = arguments[i]
i += 1
v_channel = arguments[i]
i += 1
v_nickname = arguments[i]
i += 1
return cls(
source,
v_target,
v_channel,
v_nickname,
)
MESSAGES[325] = UniqOpIs
@attr.s(slots=True, frozen=True)
class NoTopicReply(Message):
"""`331 <target> <#channel> :No topic is set`
"""
verb = 331
target = attr.ib()
channel = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.channel)
ret.append('No topic is set')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for NoTopicReply')
i = 0
v_target = arguments[i]
i += 1
v_channel = arguments[i]
i += 1
# literal 'No topic is set'
i += 1
return cls(
source,
v_target,
v_channel,
)
MESSAGES[331] = NoTopicReply
@attr.s(slots=True, frozen=True)
class TopicReply(Message):
"""`332 <target> <#channel> <topic>`
"""
verb = 332
target = attr.ib()
channel = attr.ib()
topic = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.channel)
ret.append(self.topic)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for TopicReply')
i = 0
v_target = arguments[i]
i += 1
v_channel = arguments[i]
i += 1
v_topic = arguments[i]
i += 1
return cls(
source,
v_target,
v_channel,
v_topic,
)
MESSAGES[332] = TopicReply
@attr.s(slots=True, frozen=True)
class Inviting(Message):
"""`341 <target> <#channel> <nick>`
"""
verb = 341
target = attr.ib()
channel = attr.ib()
nick = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.channel)
ret.append(self.nick)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for Inviting')
i = 0
v_target = arguments[i]
i += 1
v_channel = arguments[i]
i += 1
v_nick = arguments[i]
i += 1
return cls(
source,
v_target,
v_channel,
v_nick,
)
MESSAGES[341] = Inviting
@attr.s(slots=True, frozen=True)
class Summoning(Message):
"""`342 <target> <user> :Summoning user to IRC`
"""
verb = 342
target = attr.ib()
user = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.user)
ret.append('Summoning user to IRC')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for Summoning')
i = 0
v_target = arguments[i]
i += 1
v_user = arguments[i]
i += 1
# literal 'Summoning user to IRC'
i += 1
return cls(
source,
v_target,
v_user,
)
MESSAGES[342] = Summoning
@attr.s(slots=True, frozen=True)
class InviteList(Message):
"""`346 <target> <#channel> <mask>`
"""
verb = 346
target = attr.ib()
channel = attr.ib()
mask = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.channel)
ret.append(self.mask)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for InviteList')
i = 0
v_target = arguments[i]
i += 1
v_channel = arguments[i]
i += 1
v_mask = arguments[i]
i += 1
return cls(
source,
v_target,
v_channel,
v_mask,
)
MESSAGES[346] = InviteList
@attr.s(slots=True, frozen=True)
class InviteListEnd(Message):
"""`347 <target> <#channel> :End of channel invite list`
"""
verb = 347
target = attr.ib()
channel = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.channel)
ret.append('End of channel invite list')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for InviteListEnd')
i = 0
v_target = arguments[i]
i += 1
v_channel = arguments[i]
i += 1
# literal 'End of channel invite list'
i += 1
return cls(
source,
v_target,
v_channel,
)
MESSAGES[347] = InviteListEnd
@attr.s(slots=True, frozen=True)
class ExceptList(Message):
"""`348 <target> <#channel> <mask>`
"""
verb = 348
target = attr.ib()
channel = attr.ib()
mask = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.channel)
ret.append(self.mask)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for ExceptList')
i = 0
v_target = arguments[i]
i += 1
v_channel = arguments[i]
i += 1
v_mask = arguments[i]
i += 1
return cls(
source,
v_target,
v_channel,
v_mask,
)
MESSAGES[348] = ExceptList
@attr.s(slots=True, frozen=True)
class ExceptListEnd(Message):
"""`349 <target> <#channel> :End of channel exception list`
"""
verb = 349
target = attr.ib()
channel = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.channel)
ret.append('End of channel exception list')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for ExceptListEnd')
i = 0
v_target = arguments[i]
i += 1
v_channel = arguments[i]
i += 1
# literal 'End of channel exception list'
i += 1
return cls(
source,
v_target,
v_channel,
)
MESSAGES[349] = ExceptListEnd
@attr.s(slots=True, frozen=True)
class VersionReply(Message):
"""`351 <target> <version> <server> <comments>`
"""
verb = 351
target = attr.ib()
version = attr.ib()
server = attr.ib()
comments = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.version)
ret.append(self.server)
ret.append(self.comments)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 4
if num_optionals < 0:
raise IrcParseError('bad arguments for VersionReply')
i = 0
v_target = arguments[i]
i += 1
v_version = arguments[i]
i += 1
v_server = arguments[i]
i += 1
v_comments = arguments[i]
i += 1
return cls(
source,
v_target,
v_version,
v_server,
v_comments,
)
MESSAGES[351] = VersionReply
@attr.s(slots=True, frozen=True)
class WhoReply(Message):
"""`352 <target> <#channel> <user> <host> <server> <nickname> <props> <realname>`
"""
verb = 352
target = attr.ib()
channel = attr.ib()
user = attr.ib()
host = attr.ib()
server = attr.ib()
nickname = attr.ib()
props = attr.ib()
realname = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.channel)
ret.append(self.user)
ret.append(self.host)
ret.append(self.server)
ret.append(self.nickname)
ret.append(self.props)
ret.append(self.realname)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 8
if num_optionals < 0:
raise IrcParseError('bad arguments for WhoReply')
i = 0
v_target = arguments[i]
i += 1
v_channel = arguments[i]
i += 1
v_user = arguments[i]
i += 1
v_host = arguments[i]
i += 1
v_server = arguments[i]
i += 1
v_nickname = arguments[i]
i += 1
v_props = arguments[i]
i += 1
v_realname = arguments[i]
i += 1
return cls(
source,
v_target,
v_channel,
v_user,
v_host,
v_server,
v_nickname,
v_props,
v_realname,
)
MESSAGES[352] = WhoReply
@attr.s(slots=True, frozen=True)
class NamesReply(Message):
"""`353 <target> <mode> <#channel> <nicknames_>`
"""
verb = 353
target = attr.ib()
mode = attr.ib()
channel = attr.ib()
nicknames = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.mode)
ret.append(self.channel)
ret.append(' '.join(v for v in self.nicknames))
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 4
if num_optionals < 0:
raise IrcParseError('bad arguments for NamesReply')
i = 0
v_target = arguments[i]
i += 1
v_mode = arguments[i]
i += 1
v_channel = arguments[i]
i += 1
v_nicknames = [v for v in arguments[i].split()]
i += 1
return cls(
source,
v_target,
v_mode,
v_channel,
v_nicknames,
)
MESSAGES[353] = NamesReply
@attr.s(slots=True, frozen=True)
class LinksReply(Message):
"""`364 <target> <mask> <server> <info>`
"""
verb = 364
target = attr.ib()
mask = attr.ib()
server = attr.ib()
info = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.mask)
ret.append(self.server)
ret.append(self.info)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 4
if num_optionals < 0:
raise IrcParseError('bad arguments for LinksReply')
i = 0
v_target = arguments[i]
i += 1
v_mask = arguments[i]
i += 1
v_server = arguments[i]
i += 1
v_info = arguments[i]
i += 1
return cls(
source,
v_target,
v_mask,
v_server,
v_info,
)
MESSAGES[364] = LinksReply
@attr.s(slots=True, frozen=True)
class LinksEnd(Message):
"""`365 <target> <mask> :End of LINKS list`
"""
verb = 365
target = attr.ib()
mask = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.mask)
ret.append('End of LINKS list')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for LinksEnd')
i = 0
v_target = arguments[i]
i += 1
v_mask = arguments[i]
i += 1
# literal 'End of LINKS list'
i += 1
return cls(
source,
v_target,
v_mask,
)
MESSAGES[365] = LinksEnd
@attr.s(slots=True, frozen=True)
class NamesEnd(Message):
"""`366 <target> <#channel> :End of NAMES list`
"""
verb = 366
target = attr.ib()
channel = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.channel)
ret.append('End of NAMES list')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for NamesEnd')
i = 0
v_target = arguments[i]
i += 1
v_channel = arguments[i]
i += 1
# literal 'End of NAMES list'
i += 1
return cls(
source,
v_target,
v_channel,
)
MESSAGES[366] = NamesEnd
@attr.s(slots=True, frozen=True)
class BanList(Message):
"""`367 <target> <#channel> <mask>`
"""
verb = 367
target = attr.ib()
channel = attr.ib()
mask = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.channel)
ret.append(self.mask)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for BanList')
i = 0
v_target = arguments[i]
i += 1
v_channel = arguments[i]
i += 1
v_mask = arguments[i]
i += 1
return cls(
source,
v_target,
v_channel,
v_mask,
)
MESSAGES[367] = BanList
@attr.s(slots=True, frozen=True)
class BanListEnd(Message):
"""`368 <target> <#channel> :End of channel ban list`
"""
verb = 368
target = attr.ib()
channel = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.channel)
ret.append('End of channel ban list')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for BanListEnd')
i = 0
v_target = arguments[i]
i += 1
v_channel = arguments[i]
i += 1
# literal 'End of channel ban list'
i += 1
return cls(
source,
v_target,
v_channel,
)
MESSAGES[368] = BanListEnd
@attr.s(slots=True, frozen=True)
class WhoWasEnd(Message):
"""`369 <target> <nickname> :End of WHOWAS`
"""
verb = 369
target = attr.ib()
nickname = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.nickname)
ret.append('End of WHOWAS')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for WhoWasEnd')
i = 0
v_target = arguments[i]
i += 1
v_nickname = arguments[i]
i += 1
# literal 'End of WHOWAS'
i += 1
return cls(
source,
v_target,
v_nickname,
)
MESSAGES[369] = WhoWasEnd
@attr.s(slots=True, frozen=True)
class InfoReply(Message):
"""`371 <target> <info>`
"""
verb = 371
target = attr.ib()
info = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.info)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for InfoReply')
i = 0
v_target = arguments[i]
i += 1
v_info = arguments[i]
i += 1
return cls(
source,
v_target,
v_info,
)
MESSAGES[371] = InfoReply
@attr.s(slots=True, frozen=True)
class MotdText(Message):
"""`372 <target> <message>`
"""
verb = 372
target = attr.ib()
message = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.message)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for MotdText')
i = 0
v_target = arguments[i]
i += 1
v_message = arguments[i]
i += 1
return cls(
source,
v_target,
v_message,
)
MESSAGES[372] = MotdText
@attr.s(slots=True, frozen=True)
class InfoEnd(Message):
"""`374 <target> :End of INFO list`
"""
verb = 374
target = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append('End of INFO list')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for InfoEnd')
i = 0
v_target = arguments[i]
i += 1
# literal 'End of INFO list'
i += 1
return cls(
source,
v_target,
)
MESSAGES[374] = InfoEnd
@attr.s(slots=True, frozen=True)
class MotdStart(Message):
"""`375 <target> <message>`
"""
verb = 375
target = attr.ib()
message = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.message)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for MotdStart')
i = 0
v_target = arguments[i]
i += 1
v_message = arguments[i]
i += 1
return cls(
source,
v_target,
v_message,
)
MESSAGES[375] = MotdStart
@attr.s(slots=True, frozen=True)
class MotdEnd(Message):
"""`376 <target> :End of MOTD command`
"""
verb = 376
target = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append('End of MOTD command')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for MotdEnd')
i = 0
v_target = arguments[i]
i += 1
# literal 'End of MOTD command'
i += 1
return cls(
source,
v_target,
)
MESSAGES[376] = MotdEnd
@attr.s(slots=True, frozen=True)
class YoureOper(Message):
"""`381 <target> :You are now an IRC operator`
"""
verb = 381
target = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append('You are now an IRC operator')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for YoureOper')
i = 0
v_target = arguments[i]
i += 1
# literal 'You are now an IRC operator'
i += 1
return cls(
source,
v_target,
)
MESSAGES[381] = YoureOper
@attr.s(slots=True, frozen=True)
class Rehashing(Message):
"""`382 <target> <file> Rehashing`
"""
verb = 382
target = attr.ib()
file = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.file)
ret.append('Rehashing')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for Rehashing')
i = 0
v_target = arguments[i]
i += 1
v_file = arguments[i]
i += 1
# literal 'Rehashing'
i += 1
return cls(
source,
v_target,
v_file,
)
MESSAGES[382] = Rehashing
@attr.s(slots=True, frozen=True)
class YoureService(Message):
"""`383 <target> <message>`
"""
verb = 383
target = attr.ib()
message = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.message)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for YoureService')
i = 0
v_target = arguments[i]
i += 1
v_message = arguments[i]
i += 1
return cls(
source,
v_target,
v_message,
)
MESSAGES[383] = YoureService
@attr.s(slots=True, frozen=True)
class TimeReply(Message):
"""`391 <target> <server> <time>`
"""
verb = 391
target = attr.ib()
server = attr.ib()
time = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.server)
ret.append(self.time)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for TimeReply')
i = 0
v_target = arguments[i]
i += 1
v_server = arguments[i]
i += 1
v_time = arguments[i]
i += 1
return cls(
source,
v_target,
v_server,
v_time,
)
MESSAGES[391] = TimeReply
@attr.s(slots=True, frozen=True)
class UsersStart(Message):
"""`392 <target> :UserID Terminal Host`
"""
verb = 392
target = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append('UserID Terminal Host')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for UsersStart')
i = 0
v_target = arguments[i]
i += 1
# literal 'UserID Terminal Host'
i += 1
return cls(
source,
v_target,
)
MESSAGES[392] = UsersStart
@attr.s(slots=True, frozen=True)
class UsersReply(Message):
"""`393 <target> <message>`
"""
verb = 393
target = attr.ib()
message = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.message)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for UsersReply')
i = 0
v_target = arguments[i]
i += 1
v_message = arguments[i]
i += 1
return cls(
source,
v_target,
v_message,
)
MESSAGES[393] = UsersReply
@attr.s(slots=True, frozen=True)
class UsersEnd(Message):
"""`394 <target> :End of users`
"""
verb = 394
target = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append('End of users')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for UsersEnd')
i = 0
v_target = arguments[i]
i += 1
# literal 'End of users'
i += 1
return cls(
source,
v_target,
)
MESSAGES[394] = UsersEnd
@attr.s(slots=True, frozen=True)
class NoUsers(Message):
"""`395 <target> :Nobody logged in`
"""
verb = 395
target = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append('Nobody logged in')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for NoUsers')
i = 0
v_target = arguments[i]
i += 1
# literal 'Nobody logged in'
i += 1
return cls(
source,
v_target,
)
MESSAGES[395] = NoUsers
@attr.s(slots=True, frozen=True)
class NoSuchNick(Message):
"""`401 <target> <nickname> :No such nick/channel`
"""
verb = 401
target = attr.ib()
nickname = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.nickname)
ret.append('No such nick/channel')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for NoSuchNick')
i = 0
v_target = arguments[i]
i += 1
v_nickname = arguments[i]
i += 1
# literal 'No such nick/channel'
i += 1
return cls(
source,
v_target,
v_nickname,
)
MESSAGES[401] = NoSuchNick
@attr.s(slots=True, frozen=True)
class NoSuchServer(Message):
"""`402 <target> <server> :No such server`
"""
verb = 402
target = attr.ib()
server = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.server)
ret.append('No such server')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for NoSuchServer')
i = 0
v_target = arguments[i]
i += 1
v_server = arguments[i]
i += 1
# literal 'No such server'
i += 1
return cls(
source,
v_target,
v_server,
)
MESSAGES[402] = NoSuchServer
@attr.s(slots=True, frozen=True)
class NoSuchChannel(Message):
"""`403 <target> <#channel> :No such channel`
"""
verb = 403
target = attr.ib()
channel = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.channel)
ret.append('No such channel')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for NoSuchChannel')
i = 0
v_target = arguments[i]
i += 1
v_channel = arguments[i]
i += 1
# literal 'No such channel'
i += 1
return cls(
source,
v_target,
v_channel,
)
MESSAGES[403] = NoSuchChannel
@attr.s(slots=True, frozen=True)
class CantSendToChan(Message):
"""`404 <target> <#channel> :Cannot send to channel`
"""
verb = 404
target = attr.ib()
channel = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.channel)
ret.append('Cannot send to channel')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for CantSendToChan')
i = 0
v_target = arguments[i]
i += 1
v_channel = arguments[i]
i += 1
# literal 'Cannot send to channel'
i += 1
return cls(
source,
v_target,
v_channel,
)
MESSAGES[404] = CantSendToChan
@attr.s(slots=True, frozen=True)
class TooManyChannels(Message):
"""`405 <target> <#channel> :You have joined too many channels`
"""
verb = 405
target = attr.ib()
channel = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.channel)
ret.append('You have joined too many channels')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for TooManyChannels')
i = 0
v_target = arguments[i]
i += 1
v_channel = arguments[i]
i += 1
# literal 'You have joined too many channels'
i += 1
return cls(
source,
v_target,
v_channel,
)
MESSAGES[405] = TooManyChannels
@attr.s(slots=True, frozen=True)
class WasNoSuchNick(Message):
"""`406 <target> <nickname> :There was no such nickname`
"""
verb = 406
target = attr.ib()
nickname = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.nickname)
ret.append('There was no such nickname')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for WasNoSuchNick')
i = 0
v_target = arguments[i]
i += 1
v_nickname = arguments[i]
i += 1
# literal 'There was no such nickname'
i += 1
return cls(
source,
v_target,
v_nickname,
)
MESSAGES[406] = WasNoSuchNick
@attr.s(slots=True, frozen=True)
class TooManyTargets(Message):
"""`407 <target> <orig-target> <message>`
"""
verb = 407
target = attr.ib()
orig_target = attr.ib()
message = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.orig_target)
ret.append(self.message)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for TooManyTargets')
i = 0
v_target = arguments[i]
i += 1
v_orig_target = arguments[i]
i += 1
v_message = arguments[i]
i += 1
return cls(
source,
v_target,
v_orig_target,
v_message,
)
MESSAGES[407] = TooManyTargets
@attr.s(slots=True, frozen=True)
class NoSuchService(Message):
"""`408 <target> <name> :No such service`
"""
verb = 408
target = attr.ib()
name = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.name)
ret.append('No such service')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for NoSuchService')
i = 0
v_target = arguments[i]
i += 1
v_name = arguments[i]
i += 1
# literal 'No such service'
i += 1
return cls(
source,
v_target,
v_name,
)
MESSAGES[408] = NoSuchService
@attr.s(slots=True, frozen=True)
class NoOrigin(Message):
"""`409 <target> :No origin specified`
"""
verb = 409
target = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append('No origin specified')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for NoOrigin')
i = 0
v_target = arguments[i]
i += 1
# literal 'No origin specified'
i += 1
return cls(
source,
v_target,
)
MESSAGES[409] = NoOrigin
@attr.s(slots=True, frozen=True)
class NoRecipient(Message):
"""`411 <target> :No recipient given`
"""
verb = 411
target = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append('No recipient given')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for NoRecipient')
i = 0
v_target = arguments[i]
i += 1
# literal 'No recipient given'
i += 1
return cls(
source,
v_target,
)
MESSAGES[411] = NoRecipient
@attr.s(slots=True, frozen=True)
class NoTextToSend(Message):
"""`412 <target> :No text to send`
"""
verb = 412
target = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append('No text to send')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for NoTextToSend')
i = 0
v_target = arguments[i]
i += 1
# literal 'No text to send'
i += 1
return cls(
source,
v_target,
)
MESSAGES[412] = NoTextToSend
@attr.s(slots=True, frozen=True)
class NoTopLevel(Message):
"""`413 <target> <mask> :No toplevel domain specified`
"""
verb = 413
target = attr.ib()
mask = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.mask)
ret.append('No toplevel domain specified')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for NoTopLevel')
i = 0
v_target = arguments[i]
i += 1
v_mask = arguments[i]
i += 1
# literal 'No toplevel domain specified'
i += 1
return cls(
source,
v_target,
v_mask,
)
MESSAGES[413] = NoTopLevel
@attr.s(slots=True, frozen=True)
class WildTopLevel(Message):
"""`414 <target> <mask> :Wildcard in toplevel domain`
"""
verb = 414
target = attr.ib()
mask = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.mask)
ret.append('Wildcard in toplevel domain')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for WildTopLevel')
i = 0
v_target = arguments[i]
i += 1
v_mask = arguments[i]
i += 1
# literal 'Wildcard in toplevel domain'
i += 1
return cls(
source,
v_target,
v_mask,
)
MESSAGES[414] = WildTopLevel
@attr.s(slots=True, frozen=True)
class BadMask(Message):
"""`415 <target> <mask> :Bad Server/host mask`
"""
verb = 415
target = attr.ib()
mask = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.mask)
ret.append('Bad Server/host mask')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for BadMask')
i = 0
v_target = arguments[i]
i += 1
v_mask = arguments[i]
i += 1
# literal 'Bad Server/host mask'
i += 1
return cls(
source,
v_target,
v_mask,
)
MESSAGES[415] = BadMask
@attr.s(slots=True, frozen=True)
class UnknownCommand(Message):
"""`421 <target> <command> :Unknown command`
"""
verb = 421
target = attr.ib()
command = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.command)
ret.append('Unknown command')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for UnknownCommand')
i = 0
v_target = arguments[i]
i += 1
v_command = arguments[i]
i += 1
# literal 'Unknown command'
i += 1
return cls(
source,
v_target,
v_command,
)
MESSAGES[421] = UnknownCommand
@attr.s(slots=True, frozen=True)
class NoMotd(Message):
"""`422 <target> :MOTD File is missing`
"""
verb = 422
target = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append('MOTD File is missing')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for NoMotd')
i = 0
v_target = arguments[i]
i += 1
# literal 'MOTD File is missing'
i += 1
return cls(
source,
v_target,
)
MESSAGES[422] = NoMotd
@attr.s(slots=True, frozen=True)
class NoAdminInfo(Message):
"""`423 <target> <server> :No administrative info available`
"""
verb = 423
target = attr.ib()
server = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.server)
ret.append('No administrative info available')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for NoAdminInfo')
i = 0
v_target = arguments[i]
i += 1
v_server = arguments[i]
i += 1
# literal 'No administrative info available'
i += 1
return cls(
source,
v_target,
v_server,
)
MESSAGES[423] = NoAdminInfo
@attr.s(slots=True, frozen=True)
class FileError(Message):
"""`424 <target> <message>`
"""
verb = 424
target = attr.ib()
message = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.message)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for FileError')
i = 0
v_target = arguments[i]
i += 1
v_message = arguments[i]
i += 1
return cls(
source,
v_target,
v_message,
)
MESSAGES[424] = FileError
@attr.s(slots=True, frozen=True)
class NoNicknameGiven(Message):
"""`431 <target> :No nickname given`
"""
verb = 431
target = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append('No nickname given')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for NoNicknameGiven')
i = 0
v_target = arguments[i]
i += 1
# literal 'No nickname given'
i += 1
return cls(
source,
v_target,
)
MESSAGES[431] = NoNicknameGiven
@attr.s(slots=True, frozen=True)
class ErroneusNickname(Message):
"""`432 <target> <nickname> :Erroneous nickname`
"""
verb = 432
target = attr.ib()
nickname = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.nickname)
ret.append('Erroneous nickname')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for ErroneusNickname')
i = 0
v_target = arguments[i]
i += 1
v_nickname = arguments[i]
i += 1
# literal 'Erroneous nickname'
i += 1
return cls(
source,
v_target,
v_nickname,
)
MESSAGES[432] = ErroneusNickname
@attr.s(slots=True, frozen=True)
class NicknameInUse(Message):
"""`433 <target> <nickname> :Nickname is already in use`
"""
verb = 433
target = attr.ib()
nickname = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.nickname)
ret.append('Nickname is already in use')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for NicknameInUse')
i = 0
v_target = arguments[i]
i += 1
v_nickname = arguments[i]
i += 1
# literal 'Nickname is already in use'
i += 1
return cls(
source,
v_target,
v_nickname,
)
MESSAGES[433] = NicknameInUse
@attr.s(slots=True, frozen=True)
class NickCollision(Message):
"""`436 <target> <nickname> <message>`
"""
verb = 436
target = attr.ib()
nickname = attr.ib()
message = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.nickname)
ret.append(self.message)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for NickCollision')
i = 0
v_target = arguments[i]
i += 1
v_nickname = arguments[i]
i += 1
v_message = arguments[i]
i += 1
return cls(
source,
v_target,
v_nickname,
v_message,
)
MESSAGES[436] = NickCollision
@attr.s(slots=True, frozen=True)
class UnavailResource(Message):
"""`437 <target> <name> :Nick/channel is temporarily unavailable`
"""
verb = 437
target = attr.ib()
name = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.name)
ret.append('Nick/channel is temporarily unavailable')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for UnavailResource')
i = 0
v_target = arguments[i]
i += 1
v_name = arguments[i]
i += 1
# literal 'Nick/channel is temporarily unavailable'
i += 1
return cls(
source,
v_target,
v_name,
)
MESSAGES[437] = UnavailResource
@attr.s(slots=True, frozen=True)
class UserNotInChannel(Message):
"""`441 <target> <nickname> <#channel> :They aren't on that channel`
"""
verb = 441
target = attr.ib()
nickname = attr.ib()
channel = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.nickname)
ret.append(self.channel)
ret.append("They aren't on that channel")
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 4
if num_optionals < 0:
raise IrcParseError('bad arguments for UserNotInChannel')
i = 0
v_target = arguments[i]
i += 1
v_nickname = arguments[i]
i += 1
v_channel = arguments[i]
i += 1
# literal "They aren't on that channel"
i += 1
return cls(
source,
v_target,
v_nickname,
v_channel,
)
MESSAGES[441] = UserNotInChannel
@attr.s(slots=True, frozen=True)
class NotOnChannel(Message):
"""`442 <target> <#channel> :You're not on that channel`
"""
verb = 442
target = attr.ib()
channel = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.channel)
ret.append("You're not on that channel")
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for NotOnChannel')
i = 0
v_target = arguments[i]
i += 1
v_channel = arguments[i]
i += 1
# literal "You're not on that channel"
i += 1
return cls(
source,
v_target,
v_channel,
)
MESSAGES[442] = NotOnChannel
@attr.s(slots=True, frozen=True)
class UserOnChannel(Message):
"""`443 <target> <user> <#channel> :is already on channel`
"""
verb = 443
target = attr.ib()
user = attr.ib()
channel = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.user)
ret.append(self.channel)
ret.append('is already on channel')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 4
if num_optionals < 0:
raise IrcParseError('bad arguments for UserOnChannel')
i = 0
v_target = arguments[i]
i += 1
v_user = arguments[i]
i += 1
v_channel = arguments[i]
i += 1
# literal 'is already on channel'
i += 1
return cls(
source,
v_target,
v_user,
v_channel,
)
MESSAGES[443] = UserOnChannel
@attr.s(slots=True, frozen=True)
class NoLogin(Message):
"""`444 <target> <user> :User not logged in`
"""
verb = 444
target = attr.ib()
user = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.user)
ret.append('User not logged in')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for NoLogin')
i = 0
v_target = arguments[i]
i += 1
v_user = arguments[i]
i += 1
# literal 'User not logged in'
i += 1
return cls(
source,
v_target,
v_user,
)
MESSAGES[444] = NoLogin
@attr.s(slots=True, frozen=True)
class SummonDisabled(Message):
"""`445 <target> :SUMMON has been disabled`
"""
verb = 445
target = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append('SUMMON has been disabled')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for SummonDisabled')
i = 0
v_target = arguments[i]
i += 1
# literal 'SUMMON has been disabled'
i += 1
return cls(
source,
v_target,
)
MESSAGES[445] = SummonDisabled
@attr.s(slots=True, frozen=True)
class UsersDisabled(Message):
"""`446 <target> :USERS has been disabled`
"""
verb = 446
target = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append('USERS has been disabled')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for UsersDisabled')
i = 0
v_target = arguments[i]
i += 1
# literal 'USERS has been disabled'
i += 1
return cls(
source,
v_target,
)
MESSAGES[446] = UsersDisabled
@attr.s(slots=True, frozen=True)
class NotRegistered(Message):
"""`451 <target> :You have not registered`
"""
verb = 451
target = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append('You have not registered')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for NotRegistered')
i = 0
v_target = arguments[i]
i += 1
# literal 'You have not registered'
i += 1
return cls(
source,
v_target,
)
MESSAGES[451] = NotRegistered
@attr.s(slots=True, frozen=True)
class NeedMoreParams(Message):
"""`461 <target> <command> :Not enough parameters`
"""
verb = 461
target = attr.ib()
command = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.command)
ret.append('Not enough parameters')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for NeedMoreParams')
i = 0
v_target = arguments[i]
i += 1
v_command = arguments[i]
i += 1
# literal 'Not enough parameters'
i += 1
return cls(
source,
v_target,
v_command,
)
MESSAGES[461] = NeedMoreParams
@attr.s(slots=True, frozen=True)
class AlreadyRegistered(Message):
"""`462 <target> :Unauthorized command (already registered)`
"""
verb = 462
target = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append('Unauthorized command (already registered)')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for AlreadyRegistered')
i = 0
v_target = arguments[i]
i += 1
# literal 'Unauthorized command (already registered)'
i += 1
return cls(
source,
v_target,
)
MESSAGES[462] = AlreadyRegistered
@attr.s(slots=True, frozen=True)
class NoPermForHost(Message):
"""`463 <target> :Your host isn't among the privileged`
"""
verb = 463
target = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append("Your host isn't among the privileged")
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for NoPermForHost')
i = 0
v_target = arguments[i]
i += 1
# literal "Your host isn't among the privileged"
i += 1
return cls(
source,
v_target,
)
MESSAGES[463] = NoPermForHost
@attr.s(slots=True, frozen=True)
class PasswordMismatch(Message):
"""`464 <target> :Password incorrect`
"""
verb = 464
target = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append('Password incorrect')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for PasswordMismatch')
i = 0
v_target = arguments[i]
i += 1
# literal 'Password incorrect'
i += 1
return cls(
source,
v_target,
)
MESSAGES[464] = PasswordMismatch
@attr.s(slots=True, frozen=True)
class YoureBannedCreep(Message):
"""`465 <target> :You are banned from this server`
"""
verb = 465
target = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append('You are banned from this server')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for YoureBannedCreep')
i = 0
v_target = arguments[i]
i += 1
# literal 'You are banned from this server'
i += 1
return cls(
source,
v_target,
)
MESSAGES[465] = YoureBannedCreep
@attr.s(slots=True, frozen=True)
class YouWillBeBanned(Message):
"""`466 <target>`
"""
verb = 466
target = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 1
if num_optionals < 0:
raise IrcParseError('bad arguments for YouWillBeBanned')
i = 0
v_target = arguments[i]
i += 1
return cls(
source,
v_target,
)
MESSAGES[466] = YouWillBeBanned
@attr.s(slots=True, frozen=True)
class KeySet(Message):
"""`467 <target> <#channel> :Channel key already set`
"""
verb = 467
target = attr.ib()
channel = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.channel)
ret.append('Channel key already set')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for KeySet')
i = 0
v_target = arguments[i]
i += 1
v_channel = arguments[i]
i += 1
# literal 'Channel key already set'
i += 1
return cls(
source,
v_target,
v_channel,
)
MESSAGES[467] = KeySet
@attr.s(slots=True, frozen=True)
class ChannelIsFull(Message):
"""`471 <target> <#channel> :Cannot join channel (+l)`
"""
verb = 471
target = attr.ib()
channel = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.channel)
ret.append('Cannot join channel (+l)')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for ChannelIsFull')
i = 0
v_target = arguments[i]
i += 1
v_channel = arguments[i]
i += 1
# literal 'Cannot join channel (+l)'
i += 1
return cls(
source,
v_target,
v_channel,
)
MESSAGES[471] = ChannelIsFull
@attr.s(slots=True, frozen=True)
class UnknownMode(Message):
"""`472 <target> <char> :is unknown mode char to me`
"""
verb = 472
target = attr.ib()
char = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.char)
ret.append('is unknown mode char to me')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for UnknownMode')
i = 0
v_target = arguments[i]
i += 1
v_char = arguments[i]
i += 1
# literal 'is unknown mode char to me'
i += 1
return cls(
source,
v_target,
v_char,
)
MESSAGES[472] = UnknownMode
@attr.s(slots=True, frozen=True)
class InviteOnlyChan(Message):
"""`473 <target> <#channel> :Cannot join channel (+i)`
"""
verb = 473
target = attr.ib()
channel = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.channel)
ret.append('Cannot join channel (+i)')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for InviteOnlyChan')
i = 0
v_target = arguments[i]
i += 1
v_channel = arguments[i]
i += 1
# literal 'Cannot join channel (+i)'
i += 1
return cls(
source,
v_target,
v_channel,
)
MESSAGES[473] = InviteOnlyChan
@attr.s(slots=True, frozen=True)
class BannedFromChan(Message):
"""`474 <target> <#channel> :Cannot join channel (+b)`
"""
verb = 474
target = attr.ib()
channel = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.channel)
ret.append('Cannot join channel (+b)')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for BannedFromChan')
i = 0
v_target = arguments[i]
i += 1
v_channel = arguments[i]
i += 1
# literal 'Cannot join channel (+b)'
i += 1
return cls(
source,
v_target,
v_channel,
)
MESSAGES[474] = BannedFromChan
@attr.s(slots=True, frozen=True)
class BadChannelKey(Message):
"""`475 <target> <#channel> :Cannot join channel (+k)`
"""
verb = 475
target = attr.ib()
channel = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.channel)
ret.append('Cannot join channel (+k)')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for BadChannelKey')
i = 0
v_target = arguments[i]
i += 1
v_channel = arguments[i]
i += 1
# literal 'Cannot join channel (+k)'
i += 1
return cls(
source,
v_target,
v_channel,
)
MESSAGES[475] = BadChannelKey
@attr.s(slots=True, frozen=True)
class BadChanMask(Message):
"""`476 <target> <#channel> :Bad Channel Mask`
"""
verb = 476
target = attr.ib()
channel = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.channel)
ret.append('Bad Channel Mask')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for BadChanMask')
i = 0
v_target = arguments[i]
i += 1
v_channel = arguments[i]
i += 1
# literal 'Bad Channel Mask'
i += 1
return cls(
source,
v_target,
v_channel,
)
MESSAGES[476] = BadChanMask
@attr.s(slots=True, frozen=True)
class NoChanModes(Message):
"""`477 <target> <#channel> :Channel doesn't support modes`
"""
verb = 477
target = attr.ib()
channel = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.channel)
ret.append("Channel doesn't support modes")
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for NoChanModes')
i = 0
v_target = arguments[i]
i += 1
v_channel = arguments[i]
i += 1
# literal "Channel doesn't support modes"
i += 1
return cls(
source,
v_target,
v_channel,
)
MESSAGES[477] = NoChanModes
@attr.s(slots=True, frozen=True)
class BanListFull(Message):
"""`478 <target> <#channel> <char> :Channel list is full`
"""
verb = 478
target = attr.ib()
channel = attr.ib()
char = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.channel)
ret.append(self.char)
ret.append('Channel list is full')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 4
if num_optionals < 0:
raise IrcParseError('bad arguments for BanListFull')
i = 0
v_target = arguments[i]
i += 1
v_channel = arguments[i]
i += 1
v_char = arguments[i]
i += 1
# literal 'Channel list is full'
i += 1
return cls(
source,
v_target,
v_channel,
v_char,
)
MESSAGES[478] = BanListFull
@attr.s(slots=True, frozen=True)
class NoPrivileges(Message):
"""`481 <target> :Permission Denied- You're not an IRC operator`
"""
verb = 481
target = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append("Permission Denied- You're not an IRC operator")
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for NoPrivileges')
i = 0
v_target = arguments[i]
i += 1
# literal "Permission Denied- You're not an IRC operator"
i += 1
return cls(
source,
v_target,
)
MESSAGES[481] = NoPrivileges
@attr.s(slots=True, frozen=True)
class ChanOpPrivsNeeded(Message):
"""`482 <target> <#channel> :You're not channel operator`
"""
verb = 482
target = attr.ib()
channel = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append(self.channel)
ret.append("You're not channel operator")
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 3
if num_optionals < 0:
raise IrcParseError('bad arguments for ChanOpPrivsNeeded')
i = 0
v_target = arguments[i]
i += 1
v_channel = arguments[i]
i += 1
# literal "You're not channel operator"
i += 1
return cls(
source,
v_target,
v_channel,
)
MESSAGES[482] = ChanOpPrivsNeeded
@attr.s(slots=True, frozen=True)
class CantKillServer(Message):
"""`483 <target> :You can't kill a server!`
"""
verb = 483
target = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append("You can't kill a server!")
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for CantKillServer')
i = 0
v_target = arguments[i]
i += 1
# literal "You can't kill a server!"
i += 1
return cls(
source,
v_target,
)
MESSAGES[483] = CantKillServer
@attr.s(slots=True, frozen=True)
class Restricted(Message):
"""`484 <target> :Your connection is restricted!`
"""
verb = 484
target = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append('Your connection is restricted!')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for Restricted')
i = 0
v_target = arguments[i]
i += 1
# literal 'Your connection is restricted!'
i += 1
return cls(
source,
v_target,
)
MESSAGES[484] = Restricted
@attr.s(slots=True, frozen=True)
class UniqOpPrivsNeeded(Message):
"""`485 <target> :You're not the original channel operator`
"""
verb = 485
target = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append("You're not the original channel operator")
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for UniqOpPrivsNeeded')
i = 0
v_target = arguments[i]
i += 1
# literal "You're not the original channel operator"
i += 1
return cls(
source,
v_target,
)
MESSAGES[485] = UniqOpPrivsNeeded
@attr.s(slots=True, frozen=True)
class NoOperHost(Message):
"""`491 <target> :No O-lines for your host`
"""
verb = 491
target = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append('No O-lines for your host')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for NoOperHost')
i = 0
v_target = arguments[i]
i += 1
# literal 'No O-lines for your host'
i += 1
return cls(
source,
v_target,
)
MESSAGES[491] = NoOperHost
@attr.s(slots=True, frozen=True)
class UserModeUnknownFlag(Message):
"""`501 <target> :Unknown MODE flag`
"""
verb = 501
target = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append('Unknown MODE flag')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for UserModeUnknownFlag')
i = 0
v_target = arguments[i]
i += 1
# literal 'Unknown MODE flag'
i += 1
return cls(
source,
v_target,
)
MESSAGES[501] = UserModeUnknownFlag
@attr.s(slots=True, frozen=True)
class UsersDontMatch(Message):
"""`502 <target> :Cannot change mode for other users`
"""
verb = 502
target = attr.ib()
@property
def arguments(self):
ret = []
ret.append(self.target)
ret.append('Cannot change mode for other users')
return ret
@classmethod
def from_arguments(cls, source, arguments):
num_optionals = len(arguments) - 2
if num_optionals < 0:
raise IrcParseError('bad arguments for UsersDontMatch')
i = 0
v_target = arguments[i]
i += 1
# literal 'Cannot change mode for other users'
i += 1
return cls(
source,
v_target,
)
MESSAGES[502] = UsersDontMatch
if __name__ == '__main__':
import code
code.interact(local=locals())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment