Compare commits

...

3 Commits

1 changed files with 25 additions and 0 deletions

View File

@ -5,7 +5,32 @@ Rooms are simple containers that has no location of their own.
"""
from lib.rpsystem import ContribRPRoom
from evennia.utils import logger
# rpsystem
class Room(ContribRPRoom):
pass
class VBGB(Room):
def at_say(
self,
message,
msg_self=None,
msg_location=None,
receivers=None,
msg_receivers=None,
**kwargs,
):
if not self.channel:
# connect to Evennia channel
channel = search.channel_search("VBGB")
if not channel:
raise RuntimeError(f"Evennia Channel 'VBGB' not found.")
channel = channel[0]
# Cache this channel
self.channel = channel
self.channel.connect(self)
logger.log_msg(message)
logger.log_msg(self.id)
self.channel.msg(message, senders=self.id)
return super().at_say(self, message, msg_self,msg_location, receivers, msg_receivers, **kwargs)