mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
Send an OOB message to the client once a player logs in.
This commit is contained in:
parent
9d714a9c55
commit
a0cd61df27
2 changed files with 9 additions and 0 deletions
|
|
@ -725,6 +725,10 @@ class DefaultPlayer(with_metaclass(TypeclassBase, PlayerDB)):
|
|||
if session and protocol_flags:
|
||||
session.update_flags(**protocol_flags)
|
||||
|
||||
# inform the client that we logged in through an OOB message
|
||||
if session:
|
||||
session.msg(logged_in={})
|
||||
|
||||
self._send_to_connect_channel("|G%s connected|n" % self.key)
|
||||
if _MULTISESSION_MODE == 0:
|
||||
# in this mode we should have only one character available. We
|
||||
|
|
|
|||
|
|
@ -220,6 +220,10 @@ function onPrompt(args, kwargs) {
|
|||
doWindowResize();
|
||||
}
|
||||
|
||||
// Called when the user logged in
|
||||
function onLoggedIn() {
|
||||
}
|
||||
|
||||
// Silences events we don't do anything with.
|
||||
function onSilence(cmdname, args, kwargs) {}
|
||||
|
||||
|
|
@ -337,6 +341,7 @@ $(document).ready(function() {
|
|||
Evennia.emitter.on("prompt", onPrompt);
|
||||
Evennia.emitter.on("default", onDefault);
|
||||
Evennia.emitter.on("connection_close", onConnectionClose);
|
||||
Evennia.emitter.on("logged_in", onLoggedIn);
|
||||
// silence currently unused events
|
||||
Evennia.emitter.on("connection_open", onSilence);
|
||||
Evennia.emitter.on("connection_error", onSilence);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue