mirror of
https://github.com/evennia/evennia.git
synced 2026-03-28 10:37:16 +01:00
* Added copy_object() to the object manager
* Added @copy command (builders only) * Moved the greeting for first-time logins into a hook in basicplayer * Fixed bug in @set to handle whitespace better * Added the /drop switch to @create /Griatch
This commit is contained in:
parent
ee1b891ef4
commit
0e46a61c85
5 changed files with 150 additions and 16 deletions
|
|
@ -7,6 +7,7 @@ SCRIPT_DEFAULT_PLAYER variable in settings.py to point to the new class.
|
|||
"""
|
||||
import time
|
||||
from src import comsys
|
||||
from src.config.models import ConfigValue
|
||||
|
||||
class EvenniaBasicPlayer(object):
|
||||
def at_player_creation(self):
|
||||
|
|
@ -32,6 +33,17 @@ class EvenniaBasicPlayer(object):
|
|||
pobject.set_attribute("Last", "%s" % (time.strftime("%a %b %d %H:%M:%S %Y", time.localtime()),))
|
||||
pobject.set_attribute("Lastsite", "%s" % (session.address[0],))
|
||||
pobject.set_flag("CONNECTED", True)
|
||||
|
||||
def at_first_login(self, session):
|
||||
"""
|
||||
This hook is called only *once*, when the player is created and logs
|
||||
in for first time. It is called after the user has logged in, but
|
||||
before at_post_login() is called.
|
||||
"""
|
||||
pobject = self.scripted_obj
|
||||
pobject.emit_to("Welcome to %s, %s.\n\r" % (
|
||||
ConfigValue.objects.get_configvalue('site_name'),
|
||||
pobject.get_name(show_dbref=False)))
|
||||
|
||||
def at_post_login(self, session):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue