diff --git a/include/psyc/method.h b/include/psyc/method.h index 9bbac06..23da0e4 100644 --- a/include/psyc/method.h +++ b/include/psyc/method.h @@ -16,6 +16,7 @@ typedef enum PsycMethod { PSYC_MC_ECHO, PSYC_MC_ECHO_CONTEXT_ENTER, PSYC_MC_ECHO_CONTEXT_LEAVE, + PSYC_MC_ECHO_HELLO, PSYC_MC_ERROR, PSYC_MC_FAILURE, PSYC_MC_INFO, @@ -26,7 +27,6 @@ typedef enum PsycMethod { PSYC_MC_NOTICE, PSYC_MC_NOTICE_CONTEXT_ENTER, PSYC_MC_NOTICE_CONTEXT_LEAVE, - PSYC_MC_NOTICE_HELLO, PSYC_MC_REQUEST, PSYC_MC_REQUEST_CONTEXT_ENTER, PSYC_MC_REQUEST_CONTEXT_LEAVE, @@ -46,7 +46,7 @@ typedef union PsycTemplates { PsycString _echo; PsycString _echo_context_enter; PsycString _echo_context_leave; - PsycString _echo_hello_offer; + PsycString _echo_hello; PsycString _error; PsycString _failure; PsycString _info; diff --git a/src/templates.h b/src/templates.h index 38c587d..da6548d 100644 --- a/src/templates.h +++ b/src/templates.h @@ -4,8 +4,8 @@ _("You enter [_nick_place]" ), ._echo_context_leave = _("You leave [_nick_place]"), -._echo_hello_offer = - _("Received hello message"), +._echo_hello = + _("Received hello of psyc://[_pubkey]:g/"), ._notice_context_enter = _("[_nick] enters [_nick_place]"), ._notice_context_leave = diff --git a/src/variable.c b/src/variable.c index 4db11ec..99fde96 100644 --- a/src/variable.c +++ b/src/variable.c @@ -51,6 +51,7 @@ const PsycDictInt psyc_methods[] = { { PSYC_C2STRI("_data"), PSYC_MC_DATA }, { PSYC_C2STRI("_echo_context_enter"), PSYC_MC_ECHO_CONTEXT_ENTER }, { PSYC_C2STRI("_echo_context_leave"), PSYC_MC_ECHO_CONTEXT_LEAVE }, + { PSYC_C2STRI("_echo_hello"), PSYC_MC_ECHO_HELLO }, { PSYC_C2STRI("_echo"), PSYC_MC_ECHO }, { PSYC_C2STRI("_failure"), PSYC_MC_FAILURE }, { PSYC_C2STRI("_info"), PSYC_MC_INFO }, @@ -60,7 +61,6 @@ const PsycDictInt psyc_methods[] = { { PSYC_C2STRI("_message"), PSYC_MC_MESSAGE }, { PSYC_C2STRI("_notice_context_enter"), PSYC_MC_NOTICE_CONTEXT_ENTER }, { PSYC_C2STRI("_notice_context_leave"), PSYC_MC_NOTICE_CONTEXT_LEAVE }, - { PSYC_C2STRI("_notice_hello"), PSYC_MC_NOTICE_HELLO }, { PSYC_C2STRI("_notice"), PSYC_MC_NOTICE }, { PSYC_C2STRI("_request_context_enter"), PSYC_MC_REQUEST_CONTEXT_ENTER }, { PSYC_C2STRI("_request_context_leave"), PSYC_MC_REQUEST_CONTEXT_LEAVE }, @@ -144,6 +144,7 @@ psyc_method (char *method, size_t methodlen, PsycMethod *family, unsigned int *f case PSYC_MC_ECHO: case PSYC_MC_ECHO_CONTEXT_ENTER: case PSYC_MC_ECHO_CONTEXT_LEAVE: + case PSYC_MC_ECHO_HELLO: *family = PSYC_MC_ECHO; *flag = PSYC_METHOD_TEMPLATE | PSYC_METHOD_REPLY | PSYC_METHOD_VISIBLE; break;