mirror of
https://github.com/evennia/evennia.git
synced 2026-03-21 15:26:30 +01:00
* Added cmd_page. I think I'm running into SQLite problems, as when the command runs, it simply dumps the session.
I tried to test this on MySQL, but I can't get syncdb to work, either. (tsalaroth mking@arikel.net)
This commit is contained in:
parent
ec4ab1e913
commit
d017ff0d39
1 changed files with 17 additions and 0 deletions
|
|
@ -237,6 +237,23 @@ def cmd_examine(cdat):
|
|||
|
||||
session.msg("Location: %s" % (target_obj.get_location(),))
|
||||
|
||||
def cmd_page(cdat):
|
||||
"""
|
||||
Send a message to target user (if online).
|
||||
"""
|
||||
session = cdat['session']
|
||||
target_name = cdat['uinput']['splitted'][1:][0]
|
||||
message = cdat['uinput']['splitted'][1:][1:]
|
||||
target = Object.objects.get(name__iexact=target_name)
|
||||
try:
|
||||
if target.is_connected_plr():
|
||||
target.emit_to("% pages you with: %s" % (session.something, message))
|
||||
session.get_pobject().emit_to("Page sent.")
|
||||
else:
|
||||
session.get_pobject().emit_to("User %s is not logged on." % target_name.capitalize())
|
||||
except:
|
||||
session.get_pobject().emit_to("User %s not found." % target_name)
|
||||
|
||||
def cmd_quit(cdat):
|
||||
"""
|
||||
Gracefully disconnect the user as per his own request.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue