Commit f770bb79 authored by deuce's avatar deuce
Browse files

Add line break to end of sysop messages,

Handle tabs in chat.
parent 55085138
......@@ -126,7 +126,7 @@ int chatchar(WINDOW *win, int ch, box_t *boxch) {
wmove(win,cury,curx);
wrefresh(win);
break;
case '\r':
case '\n':
curx=2;
......@@ -145,6 +145,11 @@ int chatchar(WINDOW *win, int ch, box_t *boxch) {
wrefresh(win);
break;
case TAB:
curx+=8;
curx-=((curx-2)%8)+1;
wmove(win,cury,curx);
ch=' ';
default:
waddch(win,ch);
getyx(win,cury,curx);
......
......@@ -227,7 +227,7 @@ int sendmessage(scfg_t *cfg, int nodenum,node_t *node) {
char str[80],str2[80];
uifc.input(WIN_MID,0,0,"Telegram",str2,58,K_WRAP|K_MSG);
sprintf(str,"\1n\1y\1hMessage From Sysop:\1w %s",str2);
sprintf(str,"\1n\1y\1hMessage From Sysop:\1w %s\r\n",str2);
if(getnodedat(cfg,nodenum,node,NULL))
return(-1);
if(node->useron==0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment