Skip to content
Snippets Groups Projects
chat.cpp 51.2 KiB
Newer Older
		while(ch--) {
			mswait(200);
	bprintf(text[SysopIsHere],cfg.guru[gurunum]->name);
	if(getnodedat(cfg.node_num,&thisnode,true)==0) {
		thisnode.aux=gurunum;
		putnodedat(cfg.node_num,&thisnode);
	}
	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 */
}