mirror of
git://git.psyc.eu/libpsyc
synced 2024-08-15 03:19:02 +00:00
hello methods & templates
This commit is contained in:
parent
cd2e898c40
commit
dbcd35102b
3 changed files with 6 additions and 5 deletions
|
@ -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;
|
||||
|
|
|
@ -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 =
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue