Skip to content
Snippets Groups Projects
chat.cpp 50.6 KiB
Newer Older
	attr(cfg.color[clr_chatlocal]);
	strcpy(str,"HELLO");
	guruchat(str,gurubuf,gurunum,lastanswer);
	str[0]=0;
	while(online && (sys_status&SS_GURUCHAT)) {
		checkline();
		action=NODE_GCHT;
		SYNC;
		if(wordwrap[0]==0) {
			if((ch=inkey(K_NONE,1000))==0) {
				if(str[0]) {
					attr(cfg.color[clr_chatlocal]);
					guruchat(str,gurubuf,gurunum,lastanswer); 
					str[0]=0;
				}
				continue;
			}
		}
		attr(cfg.color[clr_chatremote]);
		getstr(str,78,K_WRAP|K_CHAT);
	}
	bputs(text[EndOfChat]);
	sys_status&=~SS_GURUCHAT;
	console=con;				/* restore console state */
}