Skip to content
Snippets Groups Projects
Commit f770bb79 authored by deuce's avatar deuce
Browse files

Add line break to end of sysop messages,

Handle tabs in chat.
parent 55085138
No related branches found
No related tags found
No related merge requests found
...@@ -126,7 +126,7 @@ int chatchar(WINDOW *win, int ch, box_t *boxch) { ...@@ -126,7 +126,7 @@ int chatchar(WINDOW *win, int ch, box_t *boxch) {
wmove(win,cury,curx); wmove(win,cury,curx);
wrefresh(win); wrefresh(win);
break; break;
case '\r': case '\r':
case '\n': case '\n':
curx=2; curx=2;
...@@ -145,6 +145,11 @@ int chatchar(WINDOW *win, int ch, box_t *boxch) { ...@@ -145,6 +145,11 @@ int chatchar(WINDOW *win, int ch, box_t *boxch) {
wrefresh(win); wrefresh(win);
break; break;
case TAB:
curx+=8;
curx-=((curx-2)%8)+1;
wmove(win,cury,curx);
ch=' ';
default: default:
waddch(win,ch); waddch(win,ch);
getyx(win,cury,curx); getyx(win,cury,curx);
......
...@@ -227,7 +227,7 @@ int sendmessage(scfg_t *cfg, int nodenum,node_t *node) { ...@@ -227,7 +227,7 @@ int sendmessage(scfg_t *cfg, int nodenum,node_t *node) {
char str[80],str2[80]; char str[80],str2[80];
uifc.input(WIN_MID,0,0,"Telegram",str2,58,K_WRAP|K_MSG); 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)) if(getnodedat(cfg,nodenum,node,NULL))
return(-1); return(-1);
if(node->useron==0) if(node->useron==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