Skip to content
Snippets Groups Projects
Commit 222d9254 authored by mcmlxxix's avatar mcmlxxix
Browse files

Chat() loop can now accept a keystroke as an argument

parent 202caaa7
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,7 @@
For more advanced chatting, see
ChatEngine this.Init() method
*/
function Chat(Engine)
function Chat(Engine,key)
{
if(this.fullscreen) console.clear();
else
......@@ -27,8 +27,9 @@ function Chat(Engine)
}
while(1)
{
var key=console.inkey(K_NOCRLF|K_NOSPIN|K_NOECHO,25);
if(!key) key=console.inkey(K_NOCRLF|K_NOSPIN|K_NOECHO,5);
if(!Engine.ProcessKey(key)) break;
key="";
}
}
//*************MAIN ENGINE*************
......@@ -278,11 +279,11 @@ function ChatEngine(root,name,log_)
Log("Error: Unknown");
break;
}
exit(0);
}
console.ctrlkey_passthru=oldpass;
bbs.sys_status&=~SS_MOFF;
bbs.sys_status&=~SS_PAUSEOFF;
exit(0);
}
}
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