mirror of
https://github.com/evennia/evennia.git
synced 2026-04-02 05:57:16 +02:00
Move ircbot factory path to class variable for easy overloading
This commit is contained in:
parent
e668160ab7
commit
72efd113f1
1 changed files with 5 additions and 2 deletions
|
|
@ -146,8 +146,11 @@ class IRCBot(Bot):
|
|||
Bot for handling IRC connections.
|
||||
|
||||
"""
|
||||
# override this on a child class to use custom factory
|
||||
factory_path = "evennia.server.portal.irc.IRCBotFactory"
|
||||
|
||||
def start(self, ev_channel=None, irc_botname=None, irc_channel=None, irc_network=None, irc_port=None, irc_ssl=None):
|
||||
def start(self, ev_channel=None, irc_botname=None, irc_channel=None,
|
||||
irc_network=None, irc_port=None, irc_ssl=None):
|
||||
"""
|
||||
Start by telling the portal to start a new session.
|
||||
|
||||
|
|
@ -203,7 +206,7 @@ class IRCBot(Bot):
|
|||
"network": self.db.irc_network,
|
||||
"port": self.db.irc_port,
|
||||
"ssl": self.db.irc_ssl}
|
||||
_SESSIONS.start_bot_session("evennia.server.portal.irc.IRCBotFactory", configdict)
|
||||
_SESSIONS.start_bot_session(self.factory_path, configdict)
|
||||
|
||||
def at_msg_send(self, **kwargs):
|
||||
"Shortcut here or we can end up in infinite loop"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue