Fix small issues with fake nicks and channels

This commit is contained in:
Vgr E. Barry 2016-11-02 23:35:13 -04:00
parent d090e573b7
commit 62abf6dae8
2 changed files with 4 additions and 3 deletions

View File

@ -248,7 +248,7 @@ class FakeChannel(Channel):
def part(self, message=""):
self.state = _States.Left
def send(self, data, *, notice=False, privmsg=False):
def send(self, data, **kw):
debuglog("Would message fake channel {0}: {1!r}".format(self.name, data))
def mode(self, *changes):
@ -260,7 +260,8 @@ class FakeChannel(Channel):
for change in changes:
if isinstance(change, str):
modes.append(change)
if change.startswith(("+", "-")): # we're probably asking for the list modes otherwise
modes.append(change)
else:
mode, target = change
modes.append(mode)

View File

@ -433,7 +433,7 @@ class FakeUser(User):
def queue_message(self, message):
self.send(message) # don't actually queue it
def send(self, data, *, notice=False, privmsg=False):
def send(self, data, **kw):
debuglog("Would message fake user {0}: {1!r}".format(self.nick, data))
@property