X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fwho.c;h=11c68d86c99602c3c8dddf456e01d0e55e3a3925;hb=25220160fc09e185bbf9f13f7565bb568cc5a463;hp=de0160e7f9be9154e79fae280dadc9425fa1482d;hpb=f09450da02a4925076392bf133fee33cc78c1467;p=citadel.git diff --git a/webcit/who.c b/webcit/who.c index de0160e7f..11c68d86c 100644 --- a/webcit/who.c +++ b/webcit/who.c @@ -1,6 +1,8 @@ #include "webcit.h" +CtxType CTX_WHO = CTX_NONE; + typedef struct UserStateStruct { StrBuf *UserName; StrBuf *Room; @@ -140,34 +142,6 @@ void terminate_session(void) } -/* - * Change your session info (fake roomname and hostname) - */ -void edit_me(void) -{ - char buf[SIZ]; - - output_headers(1, 0, 0, 0, 0, 0); - if (havebstr("change_room_name_button")) { - serv_printf("RCHG %s", bstr("fake_roomname")); - serv_getln(buf, sizeof buf); - do_template("who"); - } else if (havebstr("change_host_name_button")) { - serv_printf("HCHG %s", bstr("fake_hostname")); - serv_getln(buf, sizeof buf); - do_template("who"); - } else if (havebstr("change_user_name_button")) { - serv_printf("UCHG %s", bstr("fake_username")); - serv_getln(buf, sizeof buf); - do_template("who"); - } else if (havebstr("cancel_button")) { - do_template("who"); - } else { - do_template("who_edit"); - } - end_burst(); -} - void _terminate_session(void) { slrp_highest(); terminate_session(); @@ -307,10 +281,9 @@ void InitModule_WHO (void) { - + RegisterCTX(CTX_WHO); WebcitAddUrlHandler(HKEY("terminate_session"), "", 0, _terminate_session, 0); - WebcitAddUrlHandler(HKEY("edit_me"), "", 0, edit_me, 0); RegisterIterator("WHOLIST", 1, NULL, GetWholistHash, NULL, DeleteWholistHash, CTX_WHO, CTX_NONE, IT_NOFLAG); @@ -326,9 +299,9 @@ InitModule_WHO RegisterNamespace("WHO:NSESSIONS", 0, 1, tmplput_who_nsessions, NULL, CTX_WHO); RegisterNamespace("WHO:NSESSIONS", 0, 1, tmplput_who_nsessions, NULL, CTX_WHO); - RegisterConditional(HKEY("WHO:IDLE"), 1, conditional_who_idle, CTX_WHO); - RegisterConditional(HKEY("WHO:NSESSIONS"), 1, conditional_who_nsessions, CTX_WHO); - RegisterConditional(HKEY("WHO:ISME"), 1, conditional_who_isme, CTX_WHO); - RegisterConditional(HKEY("WHO:REALROOM"), 1, conditional_who_realroom, CTX_WHO); - RegisterConditional(HKEY("WHO:REALHOST"), 1, conditional_who_realhost, CTX_WHO); + RegisterConditional("WHO:IDLE", 1, conditional_who_idle, CTX_WHO); + RegisterConditional("WHO:NSESSIONS", 1, conditional_who_nsessions, CTX_WHO); + RegisterConditional("WHO:ISME", 1, conditional_who_isme, CTX_WHO); + RegisterConditional("WHO:REALROOM", 1, conditional_who_realroom, CTX_WHO); + RegisterConditional("WHO:REALHOST", 1, conditional_who_realhost, CTX_WHO); }