Handle channel.msg tuple-form outputfuncs. Resolve #2699.

This commit is contained in:
Griatch 2022-09-25 01:01:44 +02:00
parent 4f8753b683
commit 8486905a66

View file

@ -5,12 +5,12 @@ Account that are controlled by the server.
""" """
import time import time
from django.conf import settings from django.conf import settings
from django.utils.translation import gettext as _
from evennia.accounts.accounts import DefaultAccount from evennia.accounts.accounts import DefaultAccount
from evennia.scripts.scripts import DefaultScript from evennia.scripts.scripts import DefaultScript
from evennia.utils import search from evennia.utils import search, utils
from evennia.utils import utils
from django.utils.translation import gettext as _
_IDLE_TIMEOUT = settings.IDLE_TIMEOUT _IDLE_TIMEOUT = settings.IDLE_TIMEOUT
@ -538,9 +538,8 @@ class GrapevineBot(Bot):
if not from_obj or from_obj != [self]: if not from_obj or from_obj != [self]:
# send outputfunc channel(msg, chan, sender) # send outputfunc channel(msg, chan, sender)
# TODO we should refactor channel formatting to operate on the text = text[0] if isinstance(text, (tuple, list)) else text
# account/object level instead. For now, remove the channel/name
# prefix since we pass that explicitly anyway
prefix, text = text.split(":", 1) prefix, text = text.split(":", 1)
super().msg( super().msg(