mirror of
https://github.com/tbamud/tbamud.git
synced 2025-12-23 18:50:13 +01:00
[May 04 2008] - Rumble
Fixed numerous warnings for gcc -g -O2 -W -Wshadow -Wcast-qual flags. Fixed zpurge mudlog to use zone vnum not rnum. (thanks Jamdog) Fix to parse_mobile conversion to 128 bits. (thanks Jamdog) Changed autorun.sh from 9091 to 4000. (thanks John Smith) [Apr 27 2008] - Rumble Removed some defunct gemote code. (thanks Fizban) [Apr 26 2008] - Rumble Added README.BSD. (thanks Blix) Cleaned up act.comm.c, mobs can now use comm channels. (thanks Rhade)
This commit is contained in:
parent
84bd1766b2
commit
33e6a8c41b
9 changed files with 169 additions and 35 deletions
|
|
@ -33,7 +33,7 @@
|
||||||
ulimit -c unlimited
|
ulimit -c unlimited
|
||||||
|
|
||||||
# The port on which to run the MUD
|
# The port on which to run the MUD
|
||||||
PORT=9091
|
PORT=4000
|
||||||
|
|
||||||
# Default flags to pass to the MUD server (see admin.txt for a description
|
# Default flags to pass to the MUD server (see admin.txt for a description
|
||||||
# of all flags).
|
# of all flags).
|
||||||
|
|
|
||||||
14
changelog
14
changelog
|
|
@ -3,6 +3,16 @@ help, find any bugs, or have ideas for improvement please stop by TBA at
|
||||||
telnet://tbamud.com:9091 or email rumble@tbamud.com --Rumble
|
telnet://tbamud.com:9091 or email rumble@tbamud.com --Rumble
|
||||||
|
|
||||||
tbaMUD 3.56
|
tbaMUD 3.56
|
||||||
|
[May 04 2008] - Rumble
|
||||||
|
Fixed numerous warnings for gcc -g -O2 -W -Wshadow -Wcast-qual flags.
|
||||||
|
Fixed zpurge mudlog to use zone vnum not rnum. (thanks Jamdog)
|
||||||
|
Fix to parse_mobile conversion to 128 bits. (thanks Jamdog)
|
||||||
|
Changed autorun.sh from 9091 to 4000. (thanks John Smith)
|
||||||
|
[Apr 27 2008] - Rumble
|
||||||
|
Removed some defunct gemote code. (thanks Fizban)
|
||||||
|
[Apr 26 2008] - Rumble
|
||||||
|
Added README.BSD. (thanks Blix)
|
||||||
|
Cleaned up act.comm.c, mobs can now use comm channels. (thanks Rhade)
|
||||||
[Apr 07 2008] - Rumble
|
[Apr 07 2008] - Rumble
|
||||||
Fixed typos in lib/misc/messages and socials.new
|
Fixed typos in lib/misc/messages and socials.new
|
||||||
[Apr 04 2008] - jeremyosborne
|
[Apr 04 2008] - jeremyosborne
|
||||||
|
|
@ -169,7 +179,6 @@ used if Graphviz is not available.
|
||||||
empty." message is now displayed.
|
empty." message is now displayed.
|
||||||
Merging changes to trunk for: utils.h, utils.c and structs.h doxygen comments
|
Merging changes to trunk for: utils.h, utils.c and structs.h doxygen comments
|
||||||
Adding file dox_withGraphs.doxyfile
|
Adding file dox_withGraphs.doxyfile
|
||||||
|
|
||||||
tbaMUD 3.55
|
tbaMUD 3.55
|
||||||
[Jan 17 2008] - Rumble
|
[Jan 17 2008] - Rumble
|
||||||
Updated files for 3.55 release.
|
Updated files for 3.55 release.
|
||||||
|
|
@ -201,7 +210,6 @@ tbaMUD 3.55
|
||||||
[Dec 15 2007] - Rumble
|
[Dec 15 2007] - Rumble
|
||||||
Showvnums shows [T#] for a single attached trig or [TRIGS] for multiple attached trigs (except for rooms since there is plenty of room to list all attached trigs).
|
Showvnums shows [T#] for a single attached trig or [TRIGS] for multiple attached trigs (except for rooms since there is plenty of room to list all attached trigs).
|
||||||
Fixed bug where showvnums would not show if attached. (thanks Sryth)
|
Fixed bug where showvnums would not show if attached. (thanks Sryth)
|
||||||
|
|
||||||
tbaMUD 3.54
|
tbaMUD 3.54
|
||||||
[Nov 12 2007] - Rumble
|
[Nov 12 2007] - Rumble
|
||||||
Updated users command to fix GET_INVIS_LEV bug.
|
Updated users command to fix GET_INVIS_LEV bug.
|
||||||
|
|
@ -278,7 +286,6 @@ Increased the size of a mail message from 4k to 8k.
|
||||||
[Aug 17 2007] - Rumble
|
[Aug 17 2007] - Rumble
|
||||||
128 bit fixes: pfile conversion, world sector conversion, and player flags. (thanks Jamdog)
|
128 bit fixes: pfile conversion, world sector conversion, and player flags. (thanks Jamdog)
|
||||||
Added stop_fighting calls in do_flee to fix stock bug. (thanks Juras)
|
Added stop_fighting calls in do_flee to fix stock bug. (thanks Juras)
|
||||||
|
|
||||||
tbaMUD 3.53
|
tbaMUD 3.53
|
||||||
[Jul 01 2007] - Rumble
|
[Jul 01 2007] - Rumble
|
||||||
Added run_autowiz to do_cheat. (thanks Fizban)
|
Added run_autowiz to do_cheat. (thanks Fizban)
|
||||||
|
|
@ -320,7 +327,6 @@ tbaMUD 3.53
|
||||||
Fixed nogos/nowiz from flagging everyone in who.
|
Fixed nogos/nowiz from flagging everyone in who.
|
||||||
Fixed numerous SYSERR's where mobs were using player only specials.
|
Fixed numerous SYSERR's where mobs were using player only specials.
|
||||||
Added 128 bits patch by Niese Petersen with numerous updates and fixes.
|
Added 128 bits patch by Niese Petersen with numerous updates and fixes.
|
||||||
|
|
||||||
tbaMUD 3.52
|
tbaMUD 3.52
|
||||||
[Apr 14 2007] - Rumble
|
[Apr 14 2007] - Rumble
|
||||||
IP's only visible to LVL_GOD and above now for the paranoid people out there.
|
IP's only visible to LVL_GOD and above now for the paranoid people out there.
|
||||||
|
|
|
||||||
116
doc/README.BSD
Normal file
116
doc/README.BSD
Normal file
|
|
@ -0,0 +1,116 @@
|
||||||
|
Compiling tbaMUD under BSD
|
||||||
|
based on UNIX readme for circlemud
|
||||||
|
by Jeremy Elson
|
||||||
|
For help, visit http://www.tbamud.com
|
||||||
|
|
||||||
|
Compiling tbaMUD is easy using FreeBSD. If you plan on compiling on a
|
||||||
|
FreeBSD machine, these instructions are for you. If not, check the main
|
||||||
|
README file to get a list of other operating systems that can be used to
|
||||||
|
compile and run tbaMUD.
|
||||||
|
|
||||||
|
Current versions of tbaMUD use the GNU 'autoconf' package to
|
||||||
|
automatically determine most of the important characteristics of your
|
||||||
|
system, so chances are good that tbaMUD will compile correctly on any
|
||||||
|
UNIX system -- even one that we have never seen before. However, if you
|
||||||
|
do have problems, please visit http://www.tbamud.com so that we
|
||||||
|
can try to make tbaMUD work with your system.
|
||||||
|
|
||||||
|
|
||||||
|
1) Download the latest version of tbaMUD. You can always find the
|
||||||
|
latest version at the following site:
|
||||||
|
|
||||||
|
http://www.tbamud.com
|
||||||
|
|
||||||
|
|
||||||
|
2) Unpack the archive. If you have the .tar.gz version, uncompress it
|
||||||
|
using gzip (GNU unzip) and the tar archiver. (Both of these utilities
|
||||||
|
can be downloaded from ftp.gnu.ai.mit.edu:/pub/gnu if you don't have
|
||||||
|
them.) To unpack the archive on a UNIX system, type:
|
||||||
|
|
||||||
|
gzip -dc tbaMUD-xxxx.tgz | tar xvf -
|
||||||
|
|
||||||
|
|
||||||
|
3) Configure tbaMUD for your system. tbaMUD must be configured using
|
||||||
|
the 'configure' program which attempts to guess correct values for
|
||||||
|
various system-dependent variables used during compilation. It uses
|
||||||
|
those values to create a 'Makefile' and a header file called 'conf.h'.
|
||||||
|
|
||||||
|
From tbaMUD's root directory, type
|
||||||
|
|
||||||
|
./configure
|
||||||
|
|
||||||
|
If you're using 'csh' on an old version of System V, csh might try to
|
||||||
|
execute 'configure' itself, giving you a message like "Permission denied"
|
||||||
|
when you try to run "./configure". If so, type "sh ./configure" instead.
|
||||||
|
|
||||||
|
'configure' can take several minutes if you're using a slow computer.
|
||||||
|
|
||||||
|
'configure' will attempt to use the 'gcc' compiler if it exists; if not,
|
||||||
|
it will try 'cc'. If you want to use a different compiler, set the
|
||||||
|
'CC' environment variable to the name of the compiler you wish to use.
|
||||||
|
|
||||||
|
For example, if you want to use the 'xlc' compiler, and your shell is
|
||||||
|
csh or tcsh:
|
||||||
|
|
||||||
|
setenv CC xlc
|
||||||
|
./configure
|
||||||
|
|
||||||
|
Or, if you want to use the 'xlc' compiler, and your shell is sh or bash:
|
||||||
|
|
||||||
|
CC=xlc ./configure
|
||||||
|
|
||||||
|
This will tell 'configure' to use the 'xlc' compiler instead of 'gcc'.
|
||||||
|
|
||||||
|
|
||||||
|
4) Build the tbaMUD server. This must be done from the 'src' directory.
|
||||||
|
Type:
|
||||||
|
|
||||||
|
cd src; gmake all
|
||||||
|
|
||||||
|
This will build tbaMUD proper as well as its 10 or so ancillary
|
||||||
|
utilities, which can take anywhere from 5 minutes to an hour depending
|
||||||
|
on the speed of your computer.
|
||||||
|
|
||||||
|
Note that in the future, when you need to recompile tbaMUD as you make
|
||||||
|
changes to the code, it is NOT necessary to run 'configure' again (it
|
||||||
|
should only be run once, after the first time you unpack tbaMUD from
|
||||||
|
its .tar file). If you move the source code to a different computer,
|
||||||
|
you should reconfigure it by deleting the file 'config.cache' and
|
||||||
|
running 'configure' again.
|
||||||
|
|
||||||
|
The first time you try to compile tbaMUD, you will be asked to read the
|
||||||
|
tbaMUD license. Please read it!
|
||||||
|
|
||||||
|
|
||||||
|
5) Go back to tbaMUD's root directory (by typing "cd ..") and run the
|
||||||
|
tbaMUD server. The easiest way to do this the first time is
|
||||||
|
to use the 'autorun' script, which can be run in the background by
|
||||||
|
typing:
|
||||||
|
|
||||||
|
./autorun &
|
||||||
|
|
||||||
|
Make sure to do this in tbaMUD's root directory, not the src directory
|
||||||
|
that you used for the previous step. A file called 'syslog' will start
|
||||||
|
growing in the same directory that contains tbaMUD's log messages.
|
||||||
|
|
||||||
|
If you're using 'csh' on an old version of System V, csh might try to
|
||||||
|
execute 'autorun' itself, giving you a message like "Permission denied"
|
||||||
|
when you try to run "./autorun". If so, type "sh ./autorun &" instead.
|
||||||
|
|
||||||
|
|
||||||
|
6) Wait until the line 'No connections. Going to sleep.' appears in the
|
||||||
|
syslog. This indicates that the server is ready and waiting for
|
||||||
|
connections. It shouldn't take more than about 30 seconds for the MUD
|
||||||
|
to reach this state, though performance will vary depending on how fast
|
||||||
|
your computer is.
|
||||||
|
|
||||||
|
If a file appears called 'syslog.CRASH', the MUD has terminated
|
||||||
|
(probably abnormally). Check the contents of syslog.CRASH to see
|
||||||
|
what error was encountered.
|
||||||
|
|
||||||
|
|
||||||
|
7) Type 'telnet localhost 4000' to connect. The first person to log in
|
||||||
|
will be made an implementor (level 34) with all powers.
|
||||||
|
|
||||||
|
|
||||||
|
(write to help@tbamud.com for help)
|
||||||
|
|
@ -31,6 +31,18 @@ The Ice Box Of The Gods~
|
||||||
and maybe someone will come and get you.
|
and maybe someone will come and get you.
|
||||||
~
|
~
|
||||||
12 1208 0 0 0 0
|
12 1208 0 0 0 0
|
||||||
|
E
|
||||||
|
test extra~
|
||||||
|
This is a test extradesc.
|
||||||
|
If I am correct, the mud will not boot after this is saved.
|
||||||
|
|
||||||
|
|
||||||
|
The blank lines above this is the reason.
|
||||||
|
Ok, that did not work...
|
||||||
|
|
||||||
|
Maybe this will
|
||||||
|
|
||||||
|
~
|
||||||
S
|
S
|
||||||
#1203
|
#1203
|
||||||
The Gods' Mortal Board Room~
|
The Gods' Mortal Board Room~
|
||||||
|
|
|
||||||
|
|
@ -1639,7 +1639,7 @@ ACMD(do_where)
|
||||||
ACMD(do_levels)
|
ACMD(do_levels)
|
||||||
{
|
{
|
||||||
char buf[MAX_STRING_LENGTH], arg[MAX_STRING_LENGTH];
|
char buf[MAX_STRING_LENGTH], arg[MAX_STRING_LENGTH];
|
||||||
size_t len = 0, nlen;
|
size_t len = 0, nlen;
|
||||||
int i, ret, min_lev=1, max_lev=LVL_IMMORT, val;
|
int i, ret, min_lev=1, max_lev=LVL_IMMORT, val;
|
||||||
|
|
||||||
if (IS_NPC(ch)) {
|
if (IS_NPC(ch)) {
|
||||||
|
|
|
||||||
|
|
@ -2458,7 +2458,7 @@ ACMD(do_show)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
nlen = print_zone_to_buf(buf + len, sizeof(buf) - len, zrn, 0);
|
nlen = print_zone_to_buf(buf + len, sizeof(buf) - len, zrn, 0);
|
||||||
if (len + nlen >= sizeof(buf) || nlen < 0)
|
if (len + nlen >= sizeof(buf))
|
||||||
break;
|
break;
|
||||||
len += nlen;
|
len += nlen;
|
||||||
}
|
}
|
||||||
|
|
@ -2553,13 +2553,13 @@ ACMD(do_show)
|
||||||
continue;
|
continue;
|
||||||
if (W_EXIT(i,j)->to_room == 0) {
|
if (W_EXIT(i,j)->to_room == 0) {
|
||||||
nlen = snprintf(buf + len, sizeof(buf) - len, "%2d: (void ) [%5d] %-*s%s (%s)\r\n", ++k, GET_ROOM_VNUM(i), count_color_chars(world[i].name)+40, world[i].name, QNRM, dirs[j]);
|
nlen = snprintf(buf + len, sizeof(buf) - len, "%2d: (void ) [%5d] %-*s%s (%s)\r\n", ++k, GET_ROOM_VNUM(i), count_color_chars(world[i].name)+40, world[i].name, QNRM, dirs[j]);
|
||||||
if (len + nlen >= sizeof(buf) || nlen < 0)
|
if (len + nlen >= sizeof(buf))
|
||||||
break;
|
break;
|
||||||
len += nlen;
|
len += nlen;
|
||||||
}
|
}
|
||||||
if (W_EXIT(i,j)->to_room == NOWHERE && !W_EXIT(i,j)->general_description) {
|
if (W_EXIT(i,j)->to_room == NOWHERE && !W_EXIT(i,j)->general_description) {
|
||||||
nlen = snprintf(buf + len, sizeof(buf) - len, "%2d: (Nowhere) [%5d] %-*s%s (%s)\r\n", ++k, GET_ROOM_VNUM(i), count_color_chars(world[i].name)+ 40, world[i].name, QNRM, dirs[j]);
|
nlen = snprintf(buf + len, sizeof(buf) - len, "%2d: (Nowhere) [%5d] %-*s%s (%s)\r\n", ++k, GET_ROOM_VNUM(i), count_color_chars(world[i].name)+ 40, world[i].name, QNRM, dirs[j]);
|
||||||
if (len + nlen >= sizeof(buf) || nlen < 0)
|
if (len + nlen >= sizeof(buf))
|
||||||
break;
|
break;
|
||||||
len += nlen;
|
len += nlen;
|
||||||
}
|
}
|
||||||
|
|
@ -2573,7 +2573,7 @@ ACMD(do_show)
|
||||||
for (i = 0, j = 0; i <= top_of_world; i++)
|
for (i = 0, j = 0; i <= top_of_world; i++)
|
||||||
if (ROOM_FLAGGED(i, ROOM_DEATH)) {
|
if (ROOM_FLAGGED(i, ROOM_DEATH)) {
|
||||||
nlen = snprintf(buf + len, sizeof(buf) - len, "%2d: [%5d] %s%s\r\n", ++j, GET_ROOM_VNUM(i), world[i].name, QNRM);
|
nlen = snprintf(buf + len, sizeof(buf) - len, "%2d: [%5d] %s%s\r\n", ++j, GET_ROOM_VNUM(i), world[i].name, QNRM);
|
||||||
if (len + nlen >= sizeof(buf) || nlen < 0)
|
if (len + nlen >= sizeof(buf))
|
||||||
break;
|
break;
|
||||||
len += nlen;
|
len += nlen;
|
||||||
}
|
}
|
||||||
|
|
@ -2586,7 +2586,7 @@ ACMD(do_show)
|
||||||
for (i = 0, j = 0; i <= top_of_world; i++)
|
for (i = 0, j = 0; i <= top_of_world; i++)
|
||||||
if (ROOM_FLAGGED(i, ROOM_GODROOM)) {
|
if (ROOM_FLAGGED(i, ROOM_GODROOM)) {
|
||||||
nlen = snprintf(buf + len, sizeof(buf) - len, "%2d: [%5d] %s%s\r\n", ++j, GET_ROOM_VNUM(i), world[i].name, QNRM);
|
nlen = snprintf(buf + len, sizeof(buf) - len, "%2d: [%5d] %s%s\r\n", ++j, GET_ROOM_VNUM(i), world[i].name, QNRM);
|
||||||
if (len + nlen >= sizeof(buf) || nlen < 0)
|
if (len + nlen >= sizeof(buf))
|
||||||
break;
|
break;
|
||||||
len += nlen;
|
len += nlen;
|
||||||
}
|
}
|
||||||
|
|
@ -4050,7 +4050,7 @@ ACMD(do_zpurge)
|
||||||
purge_room(real_room(vroom));
|
purge_room(real_room(vroom));
|
||||||
}
|
}
|
||||||
send_to_char(ch, "Purged zone #%d: %s.\r\n", zone_table[zone].number, zone_table[zone].name);
|
send_to_char(ch, "Purged zone #%d: %s.\r\n", zone_table[zone].number, zone_table[zone].name);
|
||||||
mudlog(NRM, MAX(LVL_GRGOD, GET_INVIS_LEV(ch)), TRUE, "(GC) %s purged zone %d (%s)", GET_NAME(ch), zone, zone_table[zone].name);
|
mudlog(NRM, MAX(LVL_GRGOD, GET_INVIS_LEV(ch)), TRUE, "(GC) %s purged zone %d (%s)", GET_NAME(ch), zone_table[zone].number, zone_table[zone].name);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
for (room = 0; room <= top_of_world; room++) {
|
for (room = 0; room <= top_of_world; room++) {
|
||||||
|
|
|
||||||
|
|
@ -232,7 +232,7 @@ static void MapArea(room_rnum room, struct char_data *ch, int x, int y, int min,
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( (pexit = world[room].dir_option[door]) > 0 &&
|
if ( (pexit = world[room].dir_option[door]) != NULL &&
|
||||||
(pexit->to_room > 0 ) && (pexit->to_room != NOWHERE) &&
|
(pexit->to_room > 0 ) && (pexit->to_room != NOWHERE) &&
|
||||||
(!IS_SET(pexit->exit_info, EX_CLOSED))) { /* A real exit */
|
(!IS_SET(pexit->exit_info, EX_CLOSED))) { /* A real exit */
|
||||||
|
|
||||||
|
|
|
||||||
42
src/comm.c
42
src/comm.c
|
|
@ -462,7 +462,7 @@ void copyover_recover()
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Init sockets, run game, and cleanup sockets */
|
/* Init sockets, run game, and cleanup sockets */
|
||||||
static void init_game(ush_int port)
|
static void init_game(ush_int local_port)
|
||||||
{
|
{
|
||||||
/* We don't want to restart if we crash before we get up. */
|
/* We don't want to restart if we crash before we get up. */
|
||||||
touch(KILLSCRIPT_FILE);
|
touch(KILLSCRIPT_FILE);
|
||||||
|
|
@ -475,7 +475,7 @@ static void init_game(ush_int port)
|
||||||
/* If copyover mother_desc is already set up */
|
/* If copyover mother_desc is already set up */
|
||||||
if (!fCopyOver) {
|
if (!fCopyOver) {
|
||||||
log ("Opening mother connection.");
|
log ("Opening mother connection.");
|
||||||
mother_desc = init_socket (port);
|
mother_desc = init_socket (local_port);
|
||||||
}
|
}
|
||||||
|
|
||||||
event_init();
|
event_init();
|
||||||
|
|
@ -523,7 +523,7 @@ static void init_game(ush_int port)
|
||||||
|
|
||||||
/* init_socket sets up the mother descriptor - creates the socket, sets
|
/* init_socket sets up the mother descriptor - creates the socket, sets
|
||||||
* its options up, binds it, and listens. */
|
* its options up, binds it, and listens. */
|
||||||
static socket_t init_socket(ush_int port)
|
static socket_t init_socket(ush_int local_port)
|
||||||
{
|
{
|
||||||
socket_t s;
|
socket_t s;
|
||||||
struct sockaddr_in sa;
|
struct sockaddr_in sa;
|
||||||
|
|
@ -598,7 +598,7 @@ static socket_t init_socket(ush_int port)
|
||||||
memset((char *)&sa, 0, sizeof(sa));
|
memset((char *)&sa, 0, sizeof(sa));
|
||||||
|
|
||||||
sa.sin_family = AF_INET;
|
sa.sin_family = AF_INET;
|
||||||
sa.sin_port = htons(port);
|
sa.sin_port = htons(local_port);
|
||||||
sa.sin_addr = *(get_bind_addr());
|
sa.sin_addr = *(get_bind_addr());
|
||||||
|
|
||||||
if (bind(s, (struct sockaddr *) &sa, sizeof(sa)) < 0) {
|
if (bind(s, (struct sockaddr *) &sa, sizeof(sa)) < 0) {
|
||||||
|
|
@ -694,7 +694,7 @@ static int get_max_players(void)
|
||||||
* new connections, polling existing connections for input, dequeueing
|
* new connections, polling existing connections for input, dequeueing
|
||||||
* output and sending it out to players, and calling "heartbeat" functions
|
* output and sending it out to players, and calling "heartbeat" functions
|
||||||
* such as mobile_activity(). */
|
* such as mobile_activity(). */
|
||||||
void game_loop(socket_t mother_desc)
|
void game_loop(socket_t local_mother_desc)
|
||||||
{
|
{
|
||||||
fd_set input_set, output_set, exc_set, null_set;
|
fd_set input_set, output_set, exc_set, null_set;
|
||||||
struct timeval last_time, opt_time, process_time, temp_time;
|
struct timeval last_time, opt_time, process_time, temp_time;
|
||||||
|
|
@ -719,8 +719,8 @@ void game_loop(socket_t mother_desc)
|
||||||
if (descriptor_list == NULL) {
|
if (descriptor_list == NULL) {
|
||||||
log("No connections. Going to sleep.");
|
log("No connections. Going to sleep.");
|
||||||
FD_ZERO(&input_set);
|
FD_ZERO(&input_set);
|
||||||
FD_SET(mother_desc, &input_set);
|
FD_SET(local_mother_desc, &input_set);
|
||||||
if (select(mother_desc + 1, &input_set, (fd_set *) 0, (fd_set *) 0, NULL) < 0) {
|
if (select(local_mother_desc + 1, &input_set, (fd_set *) 0, (fd_set *) 0, NULL) < 0) {
|
||||||
if (errno == EINTR)
|
if (errno == EINTR)
|
||||||
log("Waking up to process signal.");
|
log("Waking up to process signal.");
|
||||||
else
|
else
|
||||||
|
|
@ -733,9 +733,9 @@ void game_loop(socket_t mother_desc)
|
||||||
FD_ZERO(&input_set);
|
FD_ZERO(&input_set);
|
||||||
FD_ZERO(&output_set);
|
FD_ZERO(&output_set);
|
||||||
FD_ZERO(&exc_set);
|
FD_ZERO(&exc_set);
|
||||||
FD_SET(mother_desc, &input_set);
|
FD_SET(local_mother_desc, &input_set);
|
||||||
|
|
||||||
maxdesc = mother_desc;
|
maxdesc = local_mother_desc;
|
||||||
for (d = descriptor_list; d; d = d->next) {
|
for (d = descriptor_list; d; d = d->next) {
|
||||||
#ifndef CIRCLE_WINDOWS
|
#ifndef CIRCLE_WINDOWS
|
||||||
if (d->descriptor > maxdesc)
|
if (d->descriptor > maxdesc)
|
||||||
|
|
@ -786,8 +786,8 @@ void game_loop(socket_t mother_desc)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* If there are new connections waiting, accept them. */
|
/* If there are new connections waiting, accept them. */
|
||||||
if (FD_ISSET(mother_desc, &input_set))
|
if (FD_ISSET(local_mother_desc, &input_set))
|
||||||
new_descriptor(mother_desc);
|
new_descriptor(local_mother_desc);
|
||||||
|
|
||||||
/* Kick out the freaky folks in the exception set and marked for close */
|
/* Kick out the freaky folks in the exception set and marked for close */
|
||||||
for (d = descriptor_list; d; d = next_d) {
|
for (d = descriptor_list; d; d = next_d) {
|
||||||
|
|
@ -1070,7 +1070,7 @@ void echo_on(struct descriptor_data *d)
|
||||||
|
|
||||||
/* Color replacement arrays. Renx -- 011100 */
|
/* Color replacement arrays. Renx -- 011100 */
|
||||||
#define A "\x1B["
|
#define A "\x1B["
|
||||||
const char *ANSI[] = { "@", A"0m",A"0m",A"0;30m",A"0;34m",A"0;32m",A"0;36m",A"0;31m",
|
char *ANSI[] = { "@", A"0m",A"0m",A"0;30m",A"0;34m",A"0;32m",A"0;36m",A"0;31m",
|
||||||
A"0;35m",A"0;33m",A"0;37m",A"1;30m",A"1;34m",A"1;32m",A"1;36m",A"1;31m",
|
A"0;35m",A"0;33m",A"0;37m",A"1;30m",A"1;34m",A"1;32m",A"1;36m",A"1;31m",
|
||||||
A"1;35m",A"1;33m",A"1;37m",A"40m",A"44m",A"42m",A"46m",A"41m",A"45m",
|
A"1;35m",A"1;33m",A"1;37m",A"40m",A"44m",A"42m",A"46m",A"41m",A"45m",
|
||||||
A"43m",A"47m",A"5m",A"4m",A"1m",A"7m"
|
A"43m",A"47m",A"5m",A"4m",A"1m",A"7m"
|
||||||
|
|
@ -1090,7 +1090,7 @@ static size_t proc_colors(char *txt, size_t maxlen, int parse)
|
||||||
CREATE(d, char, maxlen);
|
CREATE(d, char, maxlen);
|
||||||
p = d;
|
p = d;
|
||||||
|
|
||||||
for( ; *s && (d-p < maxlen); ) {
|
for( ; *s && ((size_t)(d-p) < maxlen); ) {
|
||||||
/* no color code - just copy */
|
/* no color code - just copy */
|
||||||
if (*s != '@') {
|
if (*s != '@') {
|
||||||
*d++ = *s++;
|
*d++ = *s++;
|
||||||
|
|
@ -1119,7 +1119,7 @@ static size_t proc_colors(char *txt, size_t maxlen, int parse)
|
||||||
if ((*s) == CCODE[i]) { /* if so :*/
|
if ((*s) == CCODE[i]) { /* if so :*/
|
||||||
|
|
||||||
/* c now points to the first char in color code*/
|
/* c now points to the first char in color code*/
|
||||||
for(c = (char *)ANSI[i] ; *c && (d-p < maxlen); )
|
for(c = ANSI[i] ; *c && ((size_t)(d-p) < maxlen); )
|
||||||
*d++ = *c++;
|
*d++ = *c++;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
@ -2696,7 +2696,7 @@ static void circle_sleep(struct timeval *timeout)
|
||||||
static void handle_webster_file(void) {
|
static void handle_webster_file(void) {
|
||||||
FILE *fl;
|
FILE *fl;
|
||||||
struct char_data *ch = find_char(last_webster_teller);
|
struct char_data *ch = find_char(last_webster_teller);
|
||||||
char info[MAX_STRING_LENGTH], line[READ_SIZE];
|
char retval[MAX_STRING_LENGTH], line[READ_SIZE];
|
||||||
size_t len = 0, nlen = 0;
|
size_t len = 0, nlen = 0;
|
||||||
|
|
||||||
last_webster_teller = -1L;
|
last_webster_teller = -1L;
|
||||||
|
|
@ -2706,7 +2706,7 @@ static void handle_webster_file(void) {
|
||||||
|
|
||||||
fl = fopen("websterinfo", "r");
|
fl = fopen("websterinfo", "r");
|
||||||
if (!fl) {
|
if (!fl) {
|
||||||
send_to_char(ch, "It seems Merriam-Webster is offline..\r\n");
|
send_to_char(ch, "It seems the dictionary is offline..\r\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2714,19 +2714,19 @@ static void handle_webster_file(void) {
|
||||||
|
|
||||||
get_line(fl, line);
|
get_line(fl, line);
|
||||||
while (!feof(fl)) {
|
while (!feof(fl)) {
|
||||||
nlen = snprintf(info + len, sizeof(info) - len, "%s\r\n", line);
|
nlen = snprintf(retval + len, sizeof(retval) - len, "%s\r\n", line);
|
||||||
if (len + nlen >= sizeof(info) || nlen < 0)
|
if (len + nlen >= sizeof(retval))
|
||||||
break;
|
break;
|
||||||
len += nlen;
|
len += nlen;
|
||||||
get_line(fl, line);
|
get_line(fl, line);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (len >= sizeof(info)) {
|
if (len >= sizeof(retval)) {
|
||||||
const char *overflow = "\r\n**OVERFLOW**\r\n";
|
const char *overflow = "\r\n**OVERFLOW**\r\n";
|
||||||
strcpy(info + sizeof(info) - strlen(overflow) - 1, overflow); /* strcpy: OK */
|
strcpy(retval + sizeof(retval) - strlen(overflow) - 1, overflow); /* strcpy: OK */
|
||||||
}
|
}
|
||||||
fclose(fl);
|
fclose(fl);
|
||||||
|
|
||||||
send_to_char(ch, "You get this feedback from Merriam-Webster:\r\n");
|
send_to_char(ch, "You get this feedback from Merriam-Webster:\r\n");
|
||||||
page_string(ch->desc, info, 1);
|
page_string(ch->desc, retval, 1);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
2
src/db.c
2
src/db.c
|
|
@ -1634,7 +1634,7 @@ void parse_mobile(FILE *mob_f, int nr)
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (((retval = sscanf(line, "%s %s %s %s %s %s %s %s %d %c", f1, f2, f3, f4, f5, f6, f7, f8, t + 2, &letter)) == 10) && (bitwarning == TRUE)) {
|
if (((retval = sscanf(line, "%s %s %s %s %s %s %s %s %d %c", f1, f2, f3, f4, f5, f6, f7, f8, t + 2, &letter)) != 10) && (bitwarning == TRUE)) {
|
||||||
/* Let's make the implementor read some, before converting his world files. */
|
/* Let's make the implementor read some, before converting his world files. */
|
||||||
log("WARNING: Conventional mobile files detected. See config.c.");
|
log("WARNING: Conventional mobile files detected. See config.c.");
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue