/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2009, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Copyright (C) 1986-2010, Dave Pare, Jeff Bailey, Thomas Ruschak,
* Ken Stevens, Steve McClure
*
* This program is free software; you can redistribute it and/or modify
int
typed_wu(natid from, natid to, char *message, int type)
{
- int len;
+ size_t len;
struct telstr tel;
struct natstr *np;
struct iovec iov[2];
mailbox(box, to);
if (type != TEL_ANNOUNCE)
- if ((np = getnatp(to)) == 0 || np->nat_stat < STAT_SANCT)
+ if (!(np = getnatp(to)) || np->nat_stat < STAT_SANCT)
return -1;
#if !defined(_WIN32)
if ((fd = open(box, O_WRONLY | O_APPEND, 0)) < 0) {
tel.tel_from = from;
(void)time(&tel.tel_date);
len = strlen(message);
- if (CANT_HAPPEN(len > MAXTELSIZE)) {
- len = MAXTELSIZE;
- message[len] = 0;
- }
tel.tel_length = len;
tel.tel_type = type;
iov[0].iov_base = &tel;