1/* * module *
    2% logon.pl
    3%
    4% This file defines how the agents gain their presence and leave the sim
    5% Comments below document the basic idea.
    6%
    7% Dec 13, 2035
    8% Douglas Miles
    9*/
   10% :-swi_module(user). 
   11:-swi_module(modLogin, []).   12
   13:- include(prologmud(mud_header)).   14
   15% :- register_module_type (mtCommand).
   16:- multifile lmcache:wants_logout/1.   17:- dynamic lmcache:wants_logout/1.   18
   19% rename
   20baseKB:action_info(actRename(ftString),"Rename your player").
   21baseKB:agent_call_command(Agent,actRename(Other)):- padd(Agent,mudNamed(Other)).
   22
   23% become
   24baseKB:text_actverb(become,actLogin).
   25
   26% logon
   27baseKB:text_actverb(logon,actLogin).
   28
   29% login
   30baseKB:action_info(actLogin(isOptional(tAgent,isRandom(tAgent))),"(Re)Login and assume the role of an agent").
   31baseKB:agent_call_command(Agent,actLogin(Other)):- show_call(become_player(Agent,Other)).
   32
   33% logout
   34baseKB:action_info(actLogout(isOptional(tAgent,isSelfAgent)),"logs out of game (quits)").
   35baseKB:agent_call_command(_Agent,actLogout(Other)):-get_agent_session(Other,O),call(asserta(lmcache:wants_logout(O))).
   36
   37% quit
   38baseKB:text_actverb(quit,actLogout).
   39
   40% logoff
   41baseKB:text_actverb(logoff,actLogout).
   42
   43
   44:- include(prologmud(mud_footer)).