Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)

src/l/a/Lampost-Mud-HEAD/lampost/comm/message.py   Lampost-Mud(Download)
from lampost.context.resource import m_requires, provides
from lampost.gameops.action import ActionError
from lampost.util.lmutil import timestamp
 
m_requires('log', 'datastore', 'dispatcher', 'session_manager', 'user_manager', __name__)
        msg_id = db_counter("message_id")
        message = {'msg_type': msg_type, 'msg_id': msg_id, 'content': content, 'source': user_manager.id_to_name(source_id)}
        timestamp(message)
        set_db_hash(_message_key(player_id), msg_id, message)
        try:

src/l/a/Lampost-Mud-HEAD/lampost/comm/channel.py   Lampost-Mud(Download)
from lampost.client.services import ClientService
from lampost.gameops.action import make_action
from lampost.context.resource import m_requires, provides
from lampost.util.lmutil import timestamp
 
    def dispatch_message(self, channel_id, text):
        message = {'id': channel_id, 'text': text}
        timestamp(message)
        for session in self.sessions:
            if channel_id in session.channel_ids: