Logout command supported

This commit is contained in:
BlackLight 2010-12-25 23:17:30 +01:00
parent 948cac6b58
commit 8e99be5521
2 changed files with 24 additions and 0 deletions

View file

@ -192,6 +192,7 @@
"echo",
"eval",
"find",
"logout",
"ls",
"man",
"pwd",

23
commands/logout.json Normal file
View file

@ -0,0 +1,23 @@
{
"name" : "logout",
"info" : {
"syntax" : "logout",
"brief" : "End the current user session",
},
"action" : function ( arg )
{
var out = '';
if ( shell.user == shell.json.user )
{
return out;
}
shell.user = shell.json.user;
document.cookie = '';
return out;
},
}