Skip to content
Snippets Groups Projects
Commit 0ecc119d authored by rswindell's avatar rswindell
Browse files

Added nodesync() method.

parent 307deb57
No related branches found
No related tags found
No related merge requests found
...@@ -353,6 +353,21 @@ js_hangup(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) ...@@ -353,6 +353,21 @@ js_hangup(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
return(JS_TRUE); return(JS_TRUE);
} }
static JSBool
js_nodesync(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
sbbs_t* sbbs;
if((sbbs=(sbbs_t*)JS_GetContextPrivate(cx))==NULL)
return(JS_FALSE);
sbbs->getnodedat(sbbs->cfg.node_num,&sbbs->thisnode,0);
sbbs->nodesync();
*rval=JSVAL_VOID;
return(JS_TRUE);
}
static JSBool static JSBool
js_exec(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) js_exec(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{ {
...@@ -838,6 +853,7 @@ static JSFunctionSpec js_bbs_functions[] = { ...@@ -838,6 +853,7 @@ static JSFunctionSpec js_bbs_functions[] = {
{"logoff", js_logoff, 0}, // logoff procedure {"logoff", js_logoff, 0}, // logoff procedure
{"logout", js_logout, 0}, // logout procedure {"logout", js_logout, 0}, // logout procedure
{"hangup", js_hangup, 0}, // hangup immediately {"hangup", js_hangup, 0}, // hangup immediately
{"nodesync", js_nodesync, 0}, // synchronize node with system
/* menuing */ /* menuing */
{"menu", js_menu, 1}, // show menu {"menu", js_menu, 1}, // show menu
{"log_key", js_logkey, 1}, // log key to node.log (comma optional) {"log_key", js_logkey, 1}, // log key to node.log (comma optional)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment