+-occasionally dgl crashes, leaving the shmem semaphore in a state
+ where the shmem block has to be freed.
+
+-configure option --ncurses and --ncursesw
+
< kerio> paxed: it would also be cool to have %g and %s work within a game definition too
< kerio> paxed: is this intended behavior? i can't set two different spooldirs for two different games
key not defined in other commands):
commands[default] = ...
--change dgl-banner handling; we only use the top line of it nowadays...
- (maybe make that info config line: bannerline = "## $SERVERID" or something)
-allow the admin to config the watching menu:
-top banner
-bottom banner
into a menu def. auto=try to detect it from file extension.
would be useful to be able to define a program to run that
generates the banner? (eg. nethack hiscore list via nethack itself)
+ to output raw escape codes under ncurses, use write(1, "foo", strlen("foo"))
+ (must restore cursor position after printing or ncurses is confoosed)
-BUG: cannot quit watching until caught up with the stream.
-allow configuring the watching, new user registration,
email/passwd change, etc. screens.
}
void
-drawbanner (struct dg_banner *ban, unsigned int start_line, unsigned int howmany)
+drawbanner (struct dg_banner *ban)
{
unsigned int i;
if (!ban) return;
- if (howmany > ban->len || howmany == 0)
- howmany = ban->len;
-
- for (i = 0; i < howmany; i++)
- mvaddstr (start_line + i, 1, ban->lines[i]);
+ for (i = 0; i < ban->len; i++)
+ mvaddstr (1 + i, 1, ban->lines[i]);
}
void
offset = 0;
erase ();
- drawbanner (&banner, 1, 1);
+ drawbanner (&banner);
if (len > 0) {
while (offset >= len) { offset -= max_height; }
clear();
if (me->flags & DGLACCT_EMAIL_LOCK) {
- drawbanner(&banner, 1, 1);
+ drawbanner(&banner);
mvprintw(5, 1, "Sorry, you cannot change the email.--More--");
dgl_getch();
return;
for (;;)
{
- drawbanner(&banner, 1,1);
+ drawbanner(&banner);
mvprintw(3, 1, "Your current email is: %s", me->email);
mvaddstr(4, 1, "Please enter a new one (max 80 chars; blank line aborts)");
if (me->flags & DGLACCT_PASSWD_LOCK) {
clear();
- drawbanner(&banner, 1, 1);
+ drawbanner(&banner);
mvprintw(5, 1, "Sorry, you cannot change the password.--More--");
dgl_getch();
return 0;
char repeatbuf[DGL_PASSWDLEN+1];
clear ();
- drawbanner (&banner, 1, 1);
+ drawbanner (&banner);
mvprintw (5, 1,
"Please enter a%s password. Remember that this is sent over the net",
/* print the enter your message line */
clear ();
- drawbanner (&banner, 1, 1);
+ drawbanner (&banner);
mvprintw (5, 1,
"Enter your message here. It is to be one line only and %i characters or less.",
DGL_MAILMSGLEN);
{
clear ();
- drawbanner (&banner, 1, 1);
+ drawbanner (&banner);
if (from_ttyplay == 1)
mvaddstr (4, 1, "This operation requires you to be logged in.");
clear ();
- drawbanner (&banner, 1, 1);
+ drawbanner (&banner);
mvaddstr (5, 1, "Please enter your password.");
mvaddstr (7, 1, "=> ");
{
clear ();
- drawbanner (&banner, 1, 1);
+ drawbanner (&banner);
mvaddstr (5, 1, "Sorry, too many users have registered now.");
mvaddstr (6, 1, "You might email the server administrator.");
sprintf(buf, "%i character max.", globalconfig.max_newnick_len);
- drawbanner (&banner, 1, 1);
+ drawbanner (&banner);
mvaddstr (5, 1, "Welcome new user. Please enter a username.");
mvaddstr (6, 1,
{
clear ();
- drawbanner (&banner, 1, 1);
+ drawbanner (&banner);
mvaddstr (5, 1, "Please enter your email address.");
mvaddstr (6, 1, "This is sent _nowhere_ but will be used if you ask"
if (firsttime)
{
clear ();
- drawbanner (&banner, 1, 1);
+ drawbanner (&banner);
#define HUP_WAIT 10 /* seconds before HUPPING */
mvprintw (3, 1,
if (globalconfig.utf8esc) write(1, "\033%G", 3);
clear();
}
- drawbanner(&ban, 1, 0);
+ drawbanner(&ban);
if (menu->cursor_x >= 0 && menu->cursor_y >= 0)
mvprintw(menu->cursor_y, menu->cursor_x, "");
refresh();