Resolve conflicts against master.

This commit is contained in:
Griatch 2017-02-11 18:17:04 +01:00
parent 91ffde5eaf
commit 831b1567ae
3 changed files with 6 additions and 8 deletions

View file

@ -8,8 +8,6 @@ from __future__ import print_function
from django.conf import settings from django.conf import settings
from evennia.players.players import DefaultPlayer from evennia.players.players import DefaultPlayer
from evennia.scripts.scripts import DefaultScript from evennia.scripts.scripts import DefaultScript
from evennia.commands.command import Command
from evennia.commands.cmdset import CmdSet
from evennia.utils import search from evennia.utils import search
_IDLE_TIMEOUT = settings.IDLE_TIMEOUT _IDLE_TIMEOUT = settings.IDLE_TIMEOUT
@ -218,7 +216,7 @@ class IRCBot(Bot):
if not from_obj or from_obj != [self.id]: if not from_obj or from_obj != [self.id]:
super(IRCBot, self).msg(text=text, options={"bot_data_out": True}) super(IRCBot, self).msg(text=text, options={"bot_data_out": True})
def execute_cmd(self, text=None, session=None): def execute_cmd(self, text=None, session=None, **kwargs):
""" """
Take incoming data and send it to connected channel. This is Take incoming data and send it to connected channel. This is
triggered by the CmdListen command in the BotCmdSet. triggered by the CmdListen command in the BotCmdSet.
@ -278,7 +276,7 @@ class RSSBot(Bot):
"rate": self.db.rss_rate} "rate": self.db.rss_rate}
_SESSIONS.start_bot_session("evennia.server.portal.rss.RSSBotFactory", configdict) _SESSIONS.start_bot_session("evennia.server.portal.rss.RSSBotFactory", configdict)
def execute_cmd(self, text=None, session=None): def execute_cmd(self, text=None, session=None, **kwargs):
""" """
Echo RSS input to connected channel Echo RSS input to connected channel

View file

@ -105,7 +105,7 @@ def bot_data_in(session, *args, **kwargs):
return return
kwargs.pop("options", None) kwargs.pop("options", None)
# Trigger the execute_cmd method of the corresponding bot. # Trigger the execute_cmd method of the corresponding bot.
session.player.execute_cmd(text=txt, session=session) session.player.execute_cmd(session=session, text=txt, **kwargs)
session.update_session_counters() session.update_session_counters()

View file

@ -178,7 +178,7 @@ class IRCBot(irc.IRCClient, Session):
if not msg.startswith('***'): if not msg.startswith('***'):
user = user.split('!', 1)[0] user = user.split('!', 1)[0]
user = ansi.raw(user) user = ansi.raw(user)
self.data_in("%s@%s: %s" % (user, channel, msg)) self.data_in(text=msg, type="msg", user=user, channel=channel)
def action(self, user, channel, msg): def action(self, user, channel, msg):
""" """
@ -192,7 +192,7 @@ class IRCBot(irc.IRCClient, Session):
""" """
if not msg.startswith('**'): if not msg.startswith('**'):
user = user.split('!', 1)[0] user = user.split('!', 1)[0]
self.data_in("%s@%s %s" % (user, channel, msg)) self.data_in(text=msg, type="action", user=user, channel=channel)
def data_in(self, text=None, **kwargs): def data_in(self, text=None, **kwargs):
""" """
@ -204,7 +204,7 @@ class IRCBot(irc.IRCClient, Session):
""" """
self.sessionhandler.data_in(self, bot_data_in=text, **kwargs) self.sessionhandler.data_in(self, bot_data_in=text)
def send_text(self, *args, **kwargs): def send_text(self, *args, **kwargs):
""" """