From ef221f41658286968d709487ef25a8dcee48173d Mon Sep 17 00:00:00 2001 From: jesopo Date: Mon, 3 Jun 2019 13:30:39 +0100 Subject: v1.8.0 release --- src/IRCBot.py | 2 +- src/IRCLine.py | 8 ++++---- src/utils/irc/__init__.py | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/IRCBot.py b/src/IRCBot.py index 37559d95..f5407e59 100644 --- a/src/IRCBot.py +++ b/src/IRCBot.py @@ -2,7 +2,7 @@ import enum, queue, os, select, socket, threading, time, traceback, typing, uuid from src import EventManager, Exports, IRCServer, Logging, ModuleManager from src import Socket, utils -VERSION = "v1.7.1" +VERSION = "v1.8.0" SOURCE = "https://git.io/bitbot" class TriggerResult(enum.Enum): diff --git a/src/IRCLine.py b/src/IRCLine.py index 9a545479..a612c0ad 100644 --- a/src/IRCLine.py +++ b/src/IRCLine.py @@ -39,12 +39,12 @@ class Hostmask(object): class ParsedLine(object): def __init__(self, command: str, args: typing.List[str], - prefix: Hostmask=None, + source: Hostmask=None, tags: typing.Dict[str, str]=None): self.command = command self._args = args self.args = IRCArgs(args) - self.prefix = prefix + self.source = source self.tags = {} if tags == None else tags def __repr__(self): @@ -69,8 +69,8 @@ class ParsedLine(object): if self.tags: pieces.append(self._tag_str(self.tags)) - if self.prefix: - pieces.append(str(self.prefix)) + if self.source: + pieces.append(str(self.source)) pieces.append(self.command.upper()) diff --git a/src/utils/irc/__init__.py b/src/utils/irc/__init__.py index 5a6fb69b..9577bcc1 100644 --- a/src/utils/irc/__init__.py +++ b/src/utils/irc/__init__.py @@ -45,7 +45,7 @@ def message_tag_unescape(s): def parse_line(line: str) -> IRCLine.ParsedLine: tags = {} # type: typing.Dict[str, typing.Any] - prefix = None # type: typing.Optional[IRCLine.Hostmask] + source = None # type: typing.Optional[IRCLine.Hostmask] command = None if line[0] == "@": @@ -65,8 +65,8 @@ def parse_line(line: str) -> IRCLine.ParsedLine: trailing = trailing_split if line[0] == ":": - prefix_str, line = line[1:].split(" ", 1) - prefix = seperate_hostmask(prefix_str) + source_str, line = line[1:].split(" ", 1) + source = seperate_hostmask(source_str) command, sep, line = line.partition(" ") args = [] # type: typing.List[str] @@ -77,7 +77,7 @@ def parse_line(line: str) -> IRCLine.ParsedLine: if not trailing == None: args.append(typing.cast(str, trailing)) - return IRCLine.ParsedLine(command, args, prefix, tags) + return IRCLine.ParsedLine(command, args, source, tags) REGEX_COLOR = re.compile("%s(?:(\d{1,2})(?:,(\d{1,2}))?)?" % utils.consts.COLOR) -- cgit v1.3.1-10-gc9f91