diff options
| author | Franklin Wei <frankhwei536@gmail.com> | 2014-07-16 10:37:52 -0400 |
|---|---|---|
| committer | Franklin Wei <frankhwei536@gmail.com> | 2014-07-16 10:37:52 -0400 |
| commit | 2bbe10b2d56307a0b941eae4a546382637ff5674 (patch) | |
| tree | d97cc8f1be87b5f0de12cca47e54a12ba0f99009 /joshua.c | |
| parent | 3b104903087460158fd79c9cae27ada2d4dc103e (diff) | |
| download | wargames-server-2bbe10b2d56307a0b941eae4a546382637ff5674.zip wargames-server-2bbe10b2d56307a0b941eae4a546382637ff5674.tar.gz wargames-server-2bbe10b2d56307a0b941eae4a546382637ff5674.tar.bz2 wargames-server-2bbe10b2d56307a0b941eae4a546382637ff5674.tar.xz | |
Rewrote command-handling code, some minor tweaks elsewhere
Diffstat (limited to 'joshua.c')
| -rw-r--r-- | joshua.c | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -55,7 +55,18 @@ void be_joshua(int fd) attron(COLOR_PAIR(1));*/ bool gamesPhase=false; char buf[33]; - print_string("\n\n"); + if(connection_data[out_fd].know_termsize==1) + { + /* the terminal size could change while the spaces are being printed, so use a while loop */ + int n=0; + while(n<connection_data[out_fd].term_width*2) + { + print_string(" "); + ++n; + } + } + else + print_string("\n\n"); do { if(!gamesPhase) print_string("LOGON: "); |