/* * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). * m_xline.c: xlines an user. * * Copyright (C) 2002 by the past and present ircd coders, and others. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * * $Id$ */ #include "stdinc.h" #include "list.h" #include "channel.h" #include "client.h" #include "irc_string.h" #include "sprintf_irc.h" #include "ircd.h" #include "conf.h" #include "hostmask.h" #include "numeric.h" #include "fdlist.h" #include "s_bsd.h" #include "log.h" #include "s_misc.h" #include "send.h" #include "hash.h" #include "s_serv.h" #include "parse.h" #include "modules.h" #include "resv.h" #include "conf_db.h" static int valid_xline(struct Client *, char *, char *, int); static void write_xline(struct Client *, char *, char *, time_t); static void remove_xline(struct Client *, char *); static int remove_xline_match(const char *); static void relay_xline(struct Client *, char *[]); /* mo_xline() * * inputs - pointer to server * - pointer to client * - parameter count * - parameter list * output - * side effects - x line is added * */ static void mo_xline(struct Client *client_p, struct Client *source_p, int parc, char *parv[]) { char *reason = NULL; char *gecos = NULL; struct MaskItem *conf = NULL; char *target_server = NULL; time_t tkline_time = 0; if (!HasOFlag(source_p, OPER_FLAG_X)) { sendto_one(source_p, form_str(ERR_NOPRIVS), me.name, source_p->name, "xline"); return; } /* * XLINE