* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Id$
+ */
+/** @file
+ * @brief Miscellaneous support functions.
+ * @version $Id$
*/
#include "config.h"
static void exit_one_client(struct Client* bcptr, const char* comment)
{
struct SLink *lp;
+ struct Ban *bp;
if (cli_serv(bcptr) && cli_serv(bcptr)->client_list) /* Was SetServerYXX called ? */
ClearServerYXX(bcptr); /* Removes server from server_list[] */
* Stop a running /LIST clean
*/
if (MyUser(bcptr) && cli_listing(bcptr)) {
- cli_listing(bcptr)->chptr->mode.mode &= ~MODE_LISTED;
MyFree(cli_listing(bcptr));
cli_listing(bcptr) = NULL;
}
del_invite(bcptr, lp->value.chptr);
/* Clean up silencefield */
- while ((lp = cli_user(bcptr)->silence))
- del_silence(bcptr, lp->value.cp);
+ while ((bp = cli_user(bcptr)->silence)) {
+ cli_user(bcptr)->silence = bp->next;
+ free_ban(bp);
+ }
/* Clean up snotice lists */
if (MyUser(bcptr))
{
sp->is_sbs += cli_sendB(acptr);
sp->is_sbr += cli_receiveB(acptr);
- sp->is_sks += cli_sendK(acptr);
- sp->is_skr += cli_receiveK(acptr);
sp->is_sti += CurrentTime - cli_firsttime(acptr);
sp->is_sv++;
- if (sp->is_sbs > 1023)
- {
- sp->is_sks += (sp->is_sbs >> 10);
- sp->is_sbs &= 0x3ff;
- }
- if (sp->is_sbr > 1023)
- {
- sp->is_skr += (sp->is_sbr >> 10);
- sp->is_sbr &= 0x3ff;
- }
}
else if (IsUser(acptr))
{
sp->is_cbs += cli_sendB(acptr);
sp->is_cbr += cli_receiveB(acptr);
- sp->is_cks += cli_sendK(acptr);
- sp->is_ckr += cli_receiveK(acptr);
sp->is_cti += CurrentTime - cli_firsttime(acptr);
sp->is_cl++;
- if (sp->is_cbs > 1023)
- {
- sp->is_cks += (sp->is_cbs >> 10);
- sp->is_cbs &= 0x3ff;
- }
- if (sp->is_cbr > 1023)
- {
- sp->is_ckr += (sp->is_cbr >> 10);
- sp->is_cbr &= 0x3ff;
- }
}
else if (IsUnknown(acptr))
sp->is_ni++;
send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":Client server");
send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":connected %u %u",
sp->is_cl, sp->is_sv);
- send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":bytes sent %u.%uK %u.%uK",
- sp->is_cks, sp->is_cbs, sp->is_sks, sp->is_sbs);
- send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":bytes recv %u.%uK %u.%uK",
- sp->is_ckr, sp->is_cbr, sp->is_skr, sp->is_sbr);
- send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":time connected %Tu %Tu",
+ send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":bytes sent %Lu %Lu",
+ sp->is_cbs, sp->is_sbs);
+ send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":bytes recv %Lu %Lu",
+ sp->is_cbr, sp->is_sbr);
+ send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG, ":time connected %Lu %Lu",
sp->is_cti, sp->is_sti);
}