+2001-04-18 Kevin L. Mitchell <klmitch@mit.edu>
+
+ * ircd/s_user.c (set_user_mode): pull-up of changes to prevent
+ users from turning on +s and +g
+
+ * ircd/s_misc.c (exit_client): pull-up of changes to turn off
+ net.split notice
+
+ * ircd/parse.c: pull-up of changes to disable /trace, /links, and
+ /map for users
+
+ * ircd/m_whois.c (do_whois): pull-up of server name masking for
+ /whois
+
+ * ircd/m_user.c (m_user): removal of umode and snomask defaulting
+ functions, pull-up
+
+ * ircd/m_stats.c (m_stats): pull-up of stats-disabling stuff
+
+ * ircd/m_map.c (m_map_redirect): pull-up of m_map_redirect()
+
+ * ircd/m_links.c (m_links_redirect): pull-up of m_links_redirect()
+
+ * ircd/channel.c (channel_modes): pull-up of channel key display
+ as *
+
+ * include/ircd_policy.h: pull-up of ircd_policy.h
+
+ * include/client.h: pull-up of Set/ClearServNotice()
+
+ * ircd/gline.c (do_gline): report client name in G-line message
+ (pull-up)
+
+ * ircd/s_user.c (register_user): pull-up--show IP address in some
+ server notices dealing only with users; report which connection
+ class has filled up
+
+ * ircd/s_stats.c (report_deny_list): use conf->flags &
+ DENY_FLAGS_IP insteaf of conf->ip_kill
+
+ * ircd/m_stats.c (report_klines): use conf->flags & DENY_FLAGS_IP
+ insteaf of conf->ip_kill
+
+ * ircd/s_conf.c: use flags field in struct DenyConf; pull-up of
+ K-line by real name
+
+ * include/s_conf.h: use a flags field in struct DenyConf; define
+ DENY_FLAGS_FILE, DENY_FLAGS_IP, and DENY_FLAGS_REALNAME for
+ pull-up of K-line by real name
+
+ * ircd/m_trace.c: pull-up of IP show for user connections
+
+ * doc/example.conf: pull-up of the realname K-line documentation
+
+ * ircd/ircd.c: forward port of pid file advisory locking mechanism
+
2001-04-16 Kevin L. Mitchell <klmitch@mit.edu>
* ircd/send.c (sendcmdto_flag_butone): recast to just broadcast to
# even if an IP address has a properly resolving host name.
k:192.168.*:!klines/martians:*
+# Additionally, you may specify a hostmask prefixed with $R to indicate
+# a match should be performed against the "real-name" / "info" field
+# instead of the host/IP.
+K:$R*sub7*:"You are infected with a Trojan":*
+
#
# You probably want your server connected to other servers, so your users
# have other users to chat with.
#define SetOper(x) (cli_flags(x) |= FLAGS_OPER)
#define SetUPing(x) (cli_flags(x) |= FLAGS_UPING)
#define SetWallops(x) (cli_flags(x) |= FLAGS_WALLOP)
+#define SetServNotice(x) (cli_flags(x) |= FLAGS_SERVNOTICE)
#define ClearAccess(x) (cli_flags(x) &= ~FLAGS_CHKACCESS)
#define ClearBurst(x) (cli_flags(x) &= ~FLAGS_BURST)
#define ClearOper(x) (cli_flags(x) &= ~FLAGS_OPER)
#define ClearUPing(x) (cli_flags(x) &= ~FLAGS_UPING)
#define ClearWallops(x) (cli_flags(x) &= ~FLAGS_WALLOP)
+#define ClearServNotice(x) (cli_flags(x) &= ~FLAGS_SERVNOTICE)
/* server notice stuff */
extern int m_jupe(struct Client*, struct Client*, int, char*[]);
extern int m_kick(struct Client*, struct Client*, int, char*[]);
extern int m_links(struct Client*, struct Client*, int, char*[]);
+extern int m_links_redirect(struct Client*, struct Client*, int, char*[]);
extern int m_list(struct Client*, struct Client*, int, char*[]);
extern int m_lusers(struct Client*, struct Client*, int, char*[]);
extern int m_map(struct Client*, struct Client*, int, char*[]);
+extern int m_map_redirect(struct Client*, struct Client*, int, char*[]);
extern int m_mode(struct Client*, struct Client*, int, char*[]);
extern int m_motd(struct Client*, struct Client*, int, char*[]);
extern int m_names(struct Client*, struct Client*, int, char*[]);
uid_t euid;
unsigned int bootopt;
int running;
+ int pid_fd;
const char* server_bin;
const char* server_root;
const char* server_log;
--- /dev/null
+/*
+ * IRC - Internet Relay Chat, include/ircd_policy.h
+ * Copyright (C) 1990 Jarkko Oikarinen and
+ * University of Oulu, Computing Center
+ *
+ * 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, 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Id$
+ */
+#ifndef INCLUDED_ircd_policy_h
+#define INCLUDED_ircd_policy_h
+
+/* This file contains undernet admin policy decisions, even if they are
+ * braindead and silly. These aren't configurable as they are network
+ * policy, and should not be changed (depending on what network your
+ * on different ones of these should be defined
+ */
+
+/* CFV-165 - Hiding Nonessential information from non-opers
+ *
+ * 1) Removal of server notices from users
+ *
+ * This is implemented as disallowing users from setting +s
+ */
+#define HEAD_IN_SAND_SNOTICES
+#define SERVNOTICE_OPER_ONLY
+
+/* CFV-165 - Hiding Nonessential information from non-opers
+ *
+ * 2) Removal of server wallops from users
+ *
+ * This is implemented by making all server wallops DESYNC's, and removing
+ * +g from normal users.
+ */
+#define HEAD_IN_SAND_DESYNCS
+#define DEBUG_OPER_ONLY
+
+/* CFV-165 - Hiding Nonessential information from non-opers
+ *
+ * 3) Removal of operator wallops from users
+ *
+ * This is implemented as disallowing users from setting +w
+ */
+#define HEAD_IN_SAND_WALLOPS
+/* #define WALLOPS_OPER_ONLY */
+
+/* CFV-165 - Hiding Nonessential information from non-opers
+ *
+ * 5) Removal of /MAP from users.
+ *
+ */
+#define HEAD_IN_SAND_MAP
+
+/* CFV-165 - Hiding Nonessential information from non-opers
+ *
+ * 6) Removal of links from users
+ */
+#define HEAD_IN_SAND_LINKS
+
+/* CFV-165 - Hiding Nonessential information from non-opers
+ *
+ * 7) Restrict the output of LINKS to only display known leaves.
+ */
+
+/* CFV-165 - Hiding Nonessential information from non-opers
+ *
+ * 8) Removal of /TRACE from users.
+ */
+#define HEAD_IN_SAND_TRACE
+
+/* CFV-165 - Hiding Nonessential information from non-opers
+ *
+ * 9-13) Removal of various stats from non users
+ */
+#define HEAD_IN_SAND_STATS_L
+#define HEAD_IN_SAND_STATS_C
+#define HEAD_IN_SAND_STATS_G
+#define HEAD_IN_SAND_STATS_H
+#define HEAD_IN_SAND_STATS_K
+#define HEAD_IN_SAND_STATS_F
+#define HEAD_IN_SAND_STATS_I
+#define HEAD_IN_SAND_STATS_M
+#define HEAD_IN_SAND_STATS_m
+#define HEAD_IN_SAND_STATS_O
+#undef HEAD_IN_SAND_STATS_P
+#define HEAD_IN_SAND_STATS_R
+#define HEAD_IN_SAND_STATS_D
+#define HEAD_IN_SAND_STATS_d
+#define HEAD_IN_SAND_STATS_t
+#define HEAD_IN_SAND_STATS_T
+#define HEAD_IN_SAND_STATS_U
+#undef HEAD_IN_SAND_STATS_u
+#undef HEAD_IN_SAND_STATS_W
+#define HEAD_IN_SAND_STATS_X
+#define HEAD_IN_SAND_STATS_Y
+#define HEAD_IN_SAND_STATS_Z
+
+/* CFV-165 - Hiding Nonessential information from non-opers
+ *
+ * 14) Removal of server names in net break sign-offs.
+ */
+
+#define HEAD_IN_SAND_NETSPLIT
+
+/* CFV-165 - Hiding Nonessential information from non-opers
+ *
+ * 15) Removal of server names in replies to /WHOIS
+ */
+
+#define HEAD_IN_SAND_WHOIS_SERVERNAME
+
+#endif /* INCLUDED_ircd_policy_h */
char* message;
char* usermask;
unsigned int s_addr;
- char is_file;
- char ip_kill;
+ unsigned int flags;
char bits; /* Number of bits for ipkills */
};
+#define DENY_FLAGS_FILE 0x0001 /* Comment is a filename */
+#define DENY_FLAGS_IP 0x0002 /* K-line by IP address */
+#define DENY_FLAGS_REALNAME 0x0004 /* K-line by real name */
+
/*
* A line: A:<line 1>:<line 2>:<line 3>
*/
../include/ircd_string.h ../config/config.h ../config/setup.h \
../include/ircd_chattr.h ../include/s_debug.h ../include/ircd_defs.h
ircd_features.o: ircd_features.c ../config/config.h ../config/setup.h \
- ../include/ircd_features.h ../include/client.h ../include/ircd_defs.h \
+ ../include/ircd_features.h ../include/channel.h \
+ ../include/ircd_defs.h ../include/class.h ../include/client.h \
../include/dbuf.h ../include/msgq.h ../include/ircd_handler.h \
../include/hash.h ../include/ircd.h ../include/struct.h \
../include/ircd_alloc.h ../include/fda.h ../include/ircd_log.h \
../include/ircd_reply.h ../include/ircd_string.h \
- ../include/ircd_chattr.h ../include/match.h ../include/msg.h \
- ../include/numeric.h ../include/numnicks.h ../include/random.h \
- ../include/s_bsd.h ../include/s_debug.h ../include/s_misc.h \
- ../include/send.h ../include/support.h ../include/sys.h
+ ../include/ircd_chattr.h ../include/match.h ../include/motd.h \
+ ../include/msg.h ../include/numeric.h ../include/numnicks.h \
+ ../include/random.h ../include/s_bsd.h ../include/s_debug.h \
+ ../include/s_misc.h ../include/send.h ../include/support.h \
+ ../include/sys.h ../include/whowas.h
ircd_log.o: ircd_log.c ../include/ircd_log.h ../include/client.h \
../include/ircd_defs.h ../config/config.h ../config/setup.h \
../include/dbuf.h ../include/msgq.h ../include/ircd_handler.h \
../include/sprintf_irc.h ../include/sys.h
m_admin.o: m_admin.c ../include/client.h ../include/ircd_defs.h \
../config/config.h ../config/setup.h ../include/dbuf.h \
- ../include/msgq.h ../include/ircd_handler.h ../include/ircd_reply.h \
+ ../include/msgq.h ../include/ircd_handler.h ../include/hash.h \
+ ../include/ircd.h ../include/struct.h ../include/ircd_reply.h \
../include/msg.h ../include/numeric.h ../include/numnicks.h \
../include/s_conf.h ../include/s_user.h
m_away.o: m_away.c ../include/client.h ../include/ircd_defs.h \
../config/config.h ../config/setup.h ../include/dbuf.h \
../include/msgq.h ../include/ircd_handler.h ../include/ircd.h \
- ../include/struct.h ../include/ircd_reply.h ../include/ircd_string.h \
+ ../include/struct.h ../include/ircd_alloc.h ../include/fda.h \
+ ../include/ircd_reply.h ../include/ircd_string.h \
../include/ircd_chattr.h ../include/msg.h ../include/numeric.h \
../include/numnicks.h ../include/s_user.h ../include/send.h
m_burst.o: m_burst.c ../include/channel.h ../config/config.h \
../include/struct.h ../include/ircd_reply.h ../include/ircd_string.h \
../include/ircd_chattr.h ../include/msg.h ../include/numeric.h \
../include/numnicks.h ../include/s_misc.h ../include/s_user.h \
- ../include/send.h ../include/version.h
+ ../include/s_conf.h ../include/send.h ../include/version.h
m_invite.o: m_invite.c ../include/channel.h ../config/config.h \
../config/setup.h ../include/ircd_defs.h ../include/client.h \
../include/dbuf.h ../include/msgq.h ../include/ircd_handler.h \
m_links.o: m_links.c ../include/client.h ../include/ircd_defs.h \
../config/config.h ../config/setup.h ../include/dbuf.h \
../include/msgq.h ../include/ircd_handler.h ../include/ircd.h \
- ../include/struct.h ../include/ircd_reply.h ../include/ircd_string.h \
- ../include/ircd_chattr.h ../include/match.h ../include/msg.h \
- ../include/numeric.h ../include/numnicks.h ../include/s_user.h \
- ../include/send.h
+ ../include/struct.h ../include/ircd_policy.h ../include/ircd_reply.h \
+ ../include/ircd_string.h ../include/ircd_chattr.h ../include/match.h \
+ ../include/msg.h ../include/numeric.h ../include/numnicks.h \
+ ../include/s_user.h ../include/send.h
m_list.o: m_list.c ../include/channel.h ../config/config.h \
../config/setup.h ../include/ircd_defs.h ../include/client.h \
../include/dbuf.h ../include/msgq.h ../include/ircd_handler.h \
../include/hash.h ../include/ircd.h ../include/struct.h \
../include/ircd_alloc.h ../include/fda.h ../include/ircd_chattr.h \
+ ../include/ircd_features.h ../include/ircd_log.h \
../include/ircd_reply.h ../include/ircd_string.h ../include/msg.h \
../include/numeric.h ../include/numnicks.h ../include/send.h
m_lusers.o: m_lusers.c ../include/client.h ../include/ircd_defs.h \
m_map.o: m_map.c ../include/client.h ../include/ircd_defs.h \
../config/config.h ../config/setup.h ../include/dbuf.h \
../include/msgq.h ../include/ircd_handler.h ../include/ircd.h \
- ../include/struct.h ../include/ircd_reply.h \
+ ../include/struct.h ../include/ircd_policy.h ../include/ircd_reply.h \
../include/ircd_snprintf.h ../include/ircd_string.h \
../include/ircd_chattr.h ../include/list.h ../include/match.h \
../include/numeric.h ../include/s_user.h ../include/s_serv.h \
../include/msgq.h ../include/ircd_handler.h ../include/gline.h \
../include/hash.h ../include/ircd.h ../include/struct.h \
../include/ircd_alloc.h ../include/fda.h ../include/ircd_chattr.h \
- ../include/ircd_features.h ../include/ircd_reply.h \
- ../include/ircd_string.h ../include/list.h ../include/listener.h \
- ../include/match.h ../include/motd.h ../include/msg.h \
- ../include/numeric.h ../include/numnicks.h ../include/opercmds.h \
- ../include/s_bsd.h ../include/s_conf.h ../include/s_debug.h \
- ../include/s_misc.h ../include/s_serv.h ../include/s_user.h \
- ../include/send.h ../include/userload.h
+ ../include/ircd_features.h ../include/ircd_policy.h \
+ ../include/ircd_reply.h ../include/ircd_string.h ../include/list.h \
+ ../include/listener.h ../include/match.h ../include/motd.h \
+ ../include/msg.h ../include/numeric.h ../include/numnicks.h \
+ ../include/opercmds.h ../include/s_bsd.h ../include/s_conf.h \
+ ../include/s_debug.h ../include/s_misc.h ../include/s_serv.h \
+ ../include/s_user.h ../include/send.h ../include/userload.h
m_time.o: m_time.c ../include/client.h ../include/ircd_defs.h \
../config/config.h ../config/setup.h ../include/dbuf.h \
../include/msgq.h ../include/ircd_handler.h ../include/ircd.h \
../include/msg.h ../include/numeric.h ../include/numnicks.h \
../include/s_conf.h ../include/s_user.h ../include/send.h \
../include/uping.h
-m_user.o: m_user.c ../include/client.h ../include/ircd_defs.h \
- ../config/config.h ../config/setup.h ../include/dbuf.h \
- ../include/msgq.h ../include/ircd_handler.h ../include/ircd.h \
- ../include/struct.h ../include/ircd_chattr.h ../include/ircd_reply.h \
- ../include/ircd_string.h ../include/numeric.h ../include/numnicks.h \
- ../include/s_debug.h ../include/s_misc.h ../include/s_user.h \
- ../include/send.h
+m_user.o: m_user.c ../include/handlers.h ../include/client.h \
+ ../include/ircd_defs.h ../config/config.h ../config/setup.h \
+ ../include/dbuf.h ../include/msgq.h ../include/ircd_handler.h \
+ ../include/ircd.h ../include/struct.h ../include/ircd_chattr.h \
+ ../include/ircd_reply.h ../include/ircd_string.h ../include/numeric.h \
+ ../include/numnicks.h ../include/s_debug.h ../include/s_misc.h \
+ ../include/s_user.h ../include/send.h
m_userhost.o: m_userhost.c ../include/client.h ../include/ircd_defs.h \
../config/config.h ../config/setup.h ../include/dbuf.h \
../include/msgq.h ../include/ircd_handler.h ../include/ircd_reply.h \
../include/msgq.h ../include/ircd_handler.h ../include/ircd_reply.h \
../include/ircd_string.h ../include/ircd_chattr.h ../include/msg.h \
../include/numeric.h ../include/send.h
+m_wallusers.o: m_wallusers.c ../include/client.h \
+ ../include/ircd_defs.h ../config/config.h ../config/setup.h \
+ ../include/dbuf.h ../include/msgq.h ../include/ircd_handler.h \
+ ../include/ircd_reply.h ../include/ircd_string.h \
+ ../include/ircd_chattr.h ../include/msg.h ../include/numeric.h \
+ ../include/send.h
m_who.o: m_who.c ../include/channel.h ../config/config.h \
../config/setup.h ../include/ircd_defs.h ../include/client.h \
../include/dbuf.h ../include/msgq.h ../include/ircd_handler.h \
../config/setup.h ../include/ircd_defs.h ../include/client.h \
../include/dbuf.h ../include/msgq.h ../include/ircd_handler.h \
../include/hash.h ../include/ircd.h ../include/struct.h \
- ../include/ircd_reply.h ../include/ircd_string.h \
- ../include/ircd_chattr.h ../include/match.h ../include/msg.h \
- ../include/numeric.h ../include/numnicks.h ../include/s_user.h \
- ../include/send.h ../include/whocmds.h
+ ../include/ircd_policy.h ../include/ircd_reply.h \
+ ../include/ircd_string.h ../include/ircd_chattr.h ../include/match.h \
+ ../include/msg.h ../include/numeric.h ../include/numnicks.h \
+ ../include/s_user.h ../include/send.h ../include/whocmds.h
m_whowas.o: m_whowas.c ../include/client.h ../include/ircd_defs.h \
../config/config.h ../config/setup.h ../include/dbuf.h \
../include/msgq.h ../include/ircd_handler.h ../include/hash.h \
../include/ircd.h ../include/struct.h ../include/ircd_chattr.h \
../include/parse.h ../include/s_bsd.h ../include/s_misc.h \
../include/send.h
-parse.o: parse.c ../include/parse.h ../include/client.h \
- ../include/ircd_defs.h ../config/config.h ../config/setup.h \
+parse.o: parse.c ../config/config.h ../config/setup.h \
+ ../include/parse.h ../include/client.h ../include/ircd_defs.h \
../include/dbuf.h ../include/msgq.h ../include/ircd_handler.h \
../include/channel.h ../include/handlers.h ../include/hash.h \
../include/ircd.h ../include/struct.h ../include/ircd_alloc.h \
../include/fda.h ../include/ircd_chattr.h ../include/ircd_features.h \
- ../include/ircd_reply.h ../include/ircd_string.h ../include/msg.h \
- ../include/numeric.h ../include/numnicks.h ../include/opercmds.h \
- ../include/querycmds.h ../include/res.h ../include/s_bsd.h \
- ../include/s_conf.h ../include/s_debug.h ../include/s_misc.h \
- ../include/s_numeric.h ../include/s_user.h ../include/send.h \
- ../include/sys.h ../include/whocmds.h ../include/whowas.h
+ ../include/ircd_policy.h ../include/ircd_reply.h \
+ ../include/ircd_string.h ../include/msg.h ../include/numeric.h \
+ ../include/numnicks.h ../include/opercmds.h ../include/querycmds.h \
+ ../include/res.h ../include/s_bsd.h ../include/s_conf.h \
+ ../include/s_debug.h ../include/s_misc.h ../include/s_numeric.h \
+ ../include/s_user.h ../include/send.h ../include/sys.h \
+ ../include/whocmds.h ../include/whowas.h
querycmds.o: querycmds.c ../include/querycmds.h \
../include/ircd_features.h
random.o: random.c ../include/random.h ../include/client.h \
../include/ircd_defs.h ../include/client.h ../include/dbuf.h \
../include/msgq.h ../include/ircd_handler.h ../include/hash.h \
../include/ircd.h ../include/struct.h ../include/ircd_alloc.h \
- ../include/fda.h ../include/ircd_log.h ../include/ircd_reply.h \
- ../include/ircd_string.h ../include/ircd_chattr.h ../include/list.h \
- ../include/match.h ../include/msg.h ../include/numeric.h \
- ../include/numnicks.h ../include/parse.h ../include/querycmds.h \
- ../include/ircd_features.h ../include/res.h ../include/s_bsd.h \
- ../include/s_conf.h ../include/s_debug.h ../include/s_user.h \
- ../include/send.h ../include/sprintf_irc.h ../include/support.h \
- ../include/sys.h ../include/uping.h ../include/userload.h
+ ../include/fda.h ../include/ircd_log.h ../include/ircd_policy.h \
+ ../include/ircd_reply.h ../include/ircd_string.h \
+ ../include/ircd_chattr.h ../include/list.h ../include/match.h \
+ ../include/msg.h ../include/numeric.h ../include/numnicks.h \
+ ../include/parse.h ../include/querycmds.h ../include/ircd_features.h \
+ ../include/res.h ../include/s_bsd.h ../include/s_conf.h \
+ ../include/s_debug.h ../include/s_user.h ../include/send.h \
+ ../include/sprintf_irc.h ../include/support.h ../include/sys.h \
+ ../include/uping.h ../include/userload.h
s_numeric.o: s_numeric.c ../include/s_numeric.h ../include/channel.h \
../config/config.h ../config/setup.h ../include/ircd_defs.h \
../include/client.h ../include/dbuf.h ../include/msgq.h \
../include/gline.h ../include/hash.h ../include/ircd.h \
../include/struct.h ../include/ircd_alloc.h ../include/fda.h \
../include/ircd_chattr.h ../include/ircd_features.h \
- ../include/ircd_log.h ../include/ircd_reply.h \
- ../include/ircd_string.h ../include/list.h ../include/match.h \
- ../include/motd.h ../include/msg.h ../include/numeric.h \
- ../include/numnicks.h ../include/parse.h ../include/querycmds.h \
- ../include/random.h ../include/s_bsd.h ../include/s_conf.h \
- ../include/s_debug.h ../include/s_misc.h ../include/s_serv.h \
- ../include/send.h ../include/sprintf_irc.h ../include/support.h \
- ../include/supported.h ../include/sys.h ../include/userload.h \
- ../include/version.h ../include/whowas.h ../include/handlers.h
+ ../include/ircd_log.h ../include/ircd_policy.h \
+ ../include/ircd_reply.h ../include/ircd_string.h ../include/list.h \
+ ../include/match.h ../include/motd.h ../include/msg.h \
+ ../include/numeric.h ../include/numnicks.h ../include/parse.h \
+ ../include/querycmds.h ../include/random.h ../include/s_bsd.h \
+ ../include/s_conf.h ../include/s_debug.h ../include/s_misc.h \
+ ../include/s_serv.h ../include/send.h ../include/sprintf_irc.h \
+ ../include/support.h ../include/supported.h ../include/sys.h \
+ ../include/userload.h ../include/version.h ../include/whowas.h \
+ ../include/handlers.h
send.o: send.c ../include/send.h ../include/channel.h \
../config/config.h ../config/setup.h ../include/ircd_defs.h \
../include/class.h ../include/client.h ../include/dbuf.h \
../include/ircd_defs.h ../config/config.h ../config/setup.h \
../include/dbuf.h ../include/msgq.h ../include/ircd_handler.h \
../include/ircd.h ../include/struct.h ../include/ircd_alloc.h \
- ../include/fda.h ../include/ircd_chattr.h ../include/ircd_string.h \
- ../include/list.h ../include/numeric.h ../include/s_misc.h \
- ../include/s_user.h ../include/send.h ../include/support.h \
- ../include/sys.h ../include/msg.h
+ ../include/fda.h ../include/ircd_chattr.h ../include/ircd_features.h \
+ ../include/ircd_string.h ../include/list.h ../include/numeric.h \
+ ../include/s_debug.h ../include/s_misc.h ../include/s_user.h \
+ ../include/send.h ../include/support.h ../include/sys.h \
+ ../include/msg.h
if (*chptr->mode.key) {
*mbuf++ = 'k';
+ if (chptr->mode.limit)
+ strcat(pbuf, " ");
if (is_chan_op(cptr, chptr) || IsServer(cptr)) {
- if (chptr->mode.limit)
- strcat(pbuf, " ");
strcat(pbuf, chptr->mode.key);
- }
+ } else
+ strcat(pbuf, "*");
}
*mbuf = '\0';
}
/* let the ops know about it */
sendto_opmask_butone(0, SNO_GLINE, "G-line active for %s",
- get_client_name(acptr, FALSE));
+ get_client_name(acptr, TRUE));
/* and get rid of him */
if ((tval = exit_client_msg(cptr, acptr, &me, "G-lined (%s)",
#include <string.h>
#include <sys/socket.h>
#include <sys/stat.h>
+#include <sys/types.h>
#include <unistd.h>
time_t nextconnect = 1; // time for next try_connections call
time_t nextping = 1; // same as above for check_pings()
-static struct Daemon thisServer = { 0 }; // server process info
+static struct Daemon thisServer = { 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0 };
* write_pidfile
*--------------------------------------------------------------------------*/
static void write_pidfile(void) {
- FILE *pidf;
-
- if (!(pidf = fopen(feature_str(FEAT_PPATH), "w+"))) {
- Debug((DEBUG_NOTICE,
- "Error opening pid file \"%s\": %s", feature_str(FEAT_PPATH),
- strerror(errno)));
+ char buff[20];
+
+ if (thisServer.pid_fd >= 0) {
+ memset(buff, 0, sizeof(buff));
+ sprintf(buff, "%5d\n", (int)getpid());
+ if (write(thisServer.pid_fd, buff, strlen(buff)) == -1)
+ Debug((DEBUG_NOTICE, "Error writing to pid file %s: %m",
+ feature_str(FEAT_PPATH)));
return;
}
-
- if (fprintf(pidf, "%5d\n", getpid()) < 5)
- Debug((DEBUG_NOTICE, "Error writing to pid file %s",
- feature_str(FEAT_PPATH)));
-
- fclose(pidf);
+ Debug((DEBUG_NOTICE, "Error opening pid file %s: %m",
+ feature_str(FEAT_PPATH)));
}
+/* check_pid
+ *
+ * inputs:
+ * none
+ * returns:
+ * true - if the pid file exists (and is readable), and the pid refered
+ * to in the file is still running.
+ * false - otherwise.
+ */
+static int check_pid(void)
+{
+ struct flock lock;
+
+ lock.l_type = F_WRLCK;
+ lock.l_start = 0;
+ lock.l_whence = SEEK_SET;
+ lock.l_len = 0;
+
+ if ((thisServer.pid_fd = open(feature_str(FEAT_PPATH), O_CREAT | O_RDWR,
+ 0600)) >= 0)
+ return fcntl(thisServer.pid_fd, F_SETLK, &lock);
+
+ return 0;
+}
+
/*----------------------------------------------------------------------------
* try_connections
setup_signals();
feature_init(); /* initialize features... */
log_init(*argv);
-
+ if (check_pid()) {
+ Debug((DEBUG_FATAL, "Failed to acquire PID file lock after fork"));
+ exit(2);
+ }
set_nomem_handler(outofmemory);
if (!init_string()) {
#endif /* 0 */
#include "client.h"
#include "ircd.h"
+#include "ircd_policy.h"
#include "ircd_reply.h"
#include "ircd_string.h"
#include "match.h"
return 0;
}
+#ifdef HEAD_IN_SAND_LINKS
+int m_links_redirect(struct Client* cptr, struct Client* sptr, int parc,
+ char* parv[])
+{
+ sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :%s", sptr,
+ "/LINKS has been disabled, from CFV-165. "
+ "Visit http://www.undernet.org/servers.php");
+ return 0;
+}
+#endif
+
/*
* ms_links - server message handler
*
#endif /* 0 */
#include "client.h"
#include "ircd.h"
+#include "ircd_policy.h"
#include "ircd_reply.h"
#include "ircd_snprintf.h"
#include "ircd_string.h"
#include "list.h"
#include "match.h"
+#include "msg.h"
#include "numeric.h"
#include "s_user.h"
#include "s_serv.h"
return 0;
}
+#ifdef HEAD_IN_SAND_MAP
+int m_map_redirect(struct Client* cptr, struct Client* sptr, int parc,
+ char* parv[])
+{
+ sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :%s", sptr,
+ "/MAP has been disabled, from CFV-165. "
+ "Visit http://www.undernet.org/servers.php");
+ return 0;
+}
+#endif
#if 0
/*
* note: it is guaranteed that parv[0]..parv[parc-1] are all
* non-NULL pointers.
*/
-#if 0
-/*
- * No need to include handlers.h here the signatures must match
- * and we don't need to force a rebuild of all the handlers everytime
- * we add a new one to the list. --Bleep
- */
#include "handlers.h"
-#endif /* 0 */
/*
* XXX - ack!!!
*/
#include "ircd_alloc.h"
#include "ircd_chattr.h"
#include "ircd_features.h"
+#include "ircd_policy.h"
#include "ircd_reply.h"
#include "ircd_string.h"
#include "list.h"
(wilds && !mmatch(host, conf->hostmask) &&
(!user || !mmatch(user, conf->usermask))))
{
- send_reply(sptr, RPL_STATSKLINE, (conf->ip_kill) ? 'k' : 'K',
+ send_reply(sptr, RPL_STATSKLINE,
+ (conf->flags & DENY_FLAGS_IP) ? 'k' : 'K',
conf->hostmask, conf->message, conf->usermask);
if (--count == 0)
return 1;
*/
int m_stats(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
{
- struct Message *mptr;
- struct Client *acptr;
- struct ConfItem *aconf;
char stat = parc > 1 ? parv[1][0] : '\0';
const char **infotext = statsinfo;
- int i;
if (hunt_stats(cptr, sptr, parc, parv, stat) != HUNTED_ISME)
return 0;
{
case 'L':
case 'l':
+#ifdef HEAD_IN_SAND_STATS_L
+ return m_not_oper(sptr,cptr,parc,parv);
+#else
{
+ struct Client *acptr;
+ int i;
int doall = 0;
int wilds = 0;
char *name = "*";
(int)cli_sendK(acptr), (int)cli_receiveM(acptr),
(int)cli_receiveK(acptr), CurrentTime - cli_firsttime(acptr));
}
- break;
}
+#endif
+ break;
+
case 'C':
case 'c':
+#ifdef HEAD_IN_SAND_STATS_C
+ return m_not_oper(sptr,cptr,parc,parv);
+#else
report_configured_links(sptr, CONF_SERVER);
+#endif
break;
+
case 'G':
case 'g': /* send glines */
+#ifdef HEAD_IN_SAND_STATS_G
+ return m_not_oper(sptr,cptr,parc,parv);
+#else
gline_stats(sptr);
+#endif
break;
+
case 'H':
case 'h':
+#ifdef HEAD_IN_SAND_STATS_H
+ return m_not_oper(sptr,cptr,parc,parv);
+#else
report_configured_links(sptr, CONF_HUB | CONF_LEAF);
+#endif
break;
+
case 'K':
case 'k': /* display CONF_IPKILL as well as CONF_KILL -Kev */
+#ifdef HEAD_IN_SAND_STATS_K
+ /* Simple version - if you want to fix it - send in a patch */
+ return m_not_oper(sptr,cptr,parc,parv);
+#else
if (0 == report_klines(sptr, (parc == 4) ? parv[3] : 0, 0))
return 0;
+#endif
break;
case 'F':
case 'f':
+#ifdef HEAD_IN_SAND_STATS_F
+ return m_not_oper(sptr,cptr,parc,parv);
+#else
feature_report(sptr);
+#endif
break;
+
case 'I':
case 'i':
+#ifdef HEAD_IN_SAND_STATS_I
+ /* Simple version - if you want to fix it - send in a patch */
+ return m_not_oper(sptr,cptr,parc,parv);
+#else
{
+ struct ConfItem *aconf;
int wilds = 0;
int count = 1000;
char* host;
}
}
}
- break;
}
+#endif
+ break;
+
case 'M':
+#ifdef HEAD_IN_SAND_STATS_M
+ return m_not_oper(sptr,cptr,parc,parv);
+#else
#if !defined(NDEBUG)
send_reply(sptr, RPL_STATMEMTOT, fda_get_byte_count(),
fda_get_block_count());
+#endif
#endif
break;
+
case 'm':
+#ifdef HEAD_IN_SAND_STATS_m
+ return m_not_oper(sptr,cptr,parc,parv);
+#else
+ {
+ struct Message *mptr;
+
for (mptr = msgtab; mptr->cmd; mptr++)
if (mptr->count)
send_reply(sptr, RPL_STATSCOMMANDS, mptr->cmd, mptr->count,
mptr->bytes);
+ }
+#endif
break;
+
case 'o':
case 'O':
+#ifdef HEAD_IN_SAND_STATS_O
+ return m_not_oper(sptr,cptr,parc,parv);
+#else
report_configured_links(sptr, CONF_OPS);
+#endif
break;
+
case 'p':
case 'P':
/*
* show hidden ports to opers, if there are more than 3 parameters,
* interpret the fourth parameter as the port number.
*/
+#ifdef HEAD_IN_SAND_STATS_P
+ return m_not_oper(sptr,cptr,parc,parv)
+#else
show_ports(sptr, 0, (parc > 3) ? atoi(parv[3]) : 0, 100);
+#endif
break;
+
case 'R':
case 'r':
+#ifdef HEAD_IN_SAND_STATS_R
+ return m_not_oper(sptr,cptr,parc,parv);
+#else
#ifdef DEBUGMODE
send_usage(sptr, parv[0]);
+#endif
#endif
break;
+
case 'D':
+#ifdef HEAD_IN_SAND_STATS_D
+ return m_not_oper(sptr,cptr,parc,parv);
+#else
report_crule_list(sptr, CRULE_ALL);
+#endif
break;
+
case 'd':
+#ifdef HEAD_IN_SAND_STATS_d
+ return m_not_oper(sptr,cptr,parc,parv);
+#else
report_crule_list(sptr, CRULE_MASK);
+#endif
break;
+
case 't':
+#ifdef HEAD_IN_SAND_STATS_t
+ return m_not_oper(sptr,cptr,parc,parv);
+#else
tstats(sptr, parv[0]);
+#endif
break;
+
case 'T':
+#ifdef HEAD_IN_SAND_STATS_T
+ return m_not_oper(sptr,cptr,parc,parv);
+#else
motd_report(sptr);
+#endif
break;
+
case 'U':
+#ifdef HEAD_IN_SAND_STATS_U
+ return m_not_oper(sptr,cptr,parc,parv);
+#else
report_configured_links(sptr, CONF_UWORLD);
+#endif
break;
+
case 'u':
+#ifdef HEAD_IN_SAND_STATS_u
+ return m_not_oper(sptr,cptr,parc,parv);
+#else
{
time_t nowr;
send_reply(sptr, RPL_STATSUPTIME, nowr / 86400, (nowr / 3600) % 24,
(nowr / 60) % 60, nowr % 60);
send_reply(sptr, RPL_STATSCONN, max_connection_count, max_client_count);
- break;
}
+#endif
+ break;
+
case 'W':
case 'w':
+#ifdef HEAD_IN_SAND_STATS_W
+ return m_not_oper(sptr,cptr,parc,parv);
+#else
calc_load(sptr);
+#endif
break;
+
case 'X':
case 'x':
+#ifdef HEAD_IN_SAND_STATS_X
+ return m_not_oper(sptr,cptr,parc,parv);
+#else
#ifdef DEBUGMODE
class_send_meminfo(sptr);
send_listinfo(sptr, parv[0]);
+#endif
#endif
break;
+
case 'Y':
case 'y':
+#ifdef HEAD_IN_SAND_STATS_Y
+ return m_not_oper(sptr,cptr,parc,parv);
+#else
report_classes(sptr);
+#endif
break;
+
case 'Z':
case 'z':
+#ifdef HEAD_IN_SAND_STATS_Z
+ return m_not_oper(sptr,cptr,parc,parv);
+#else
count_memory(sptr, parv[0]);
+#endif
break;
+
default:
stat = '*';
while (*infotext)
!(dow && IsInvisible(acptr)))) || !dow || IsAnOper(acptr)) {
if (IsAnOper(acptr))
send_reply(sptr, RPL_TRACEOPERATOR, conClass,
- get_client_name(acptr, HIDE_IP),
+ get_client_name(acptr, SHOW_IP),
CurrentTime - cli_lasttime(acptr));
else
send_reply(sptr, RPL_TRACEUSER, conClass,
- get_client_name(acptr, HIDE_IP),
+ get_client_name(acptr, SHOW_IP),
CurrentTime - cli_lasttime(acptr));
cnt++;
}
!(dow && IsInvisible(acptr)))) || !dow || IsAnOper(acptr)) {
if (IsAnOper(acptr))
send_reply(sptr, RPL_TRACEOPERATOR, conClass,
- get_client_name(acptr, HIDE_IP),
+ get_client_name(acptr, SHOW_IP),
CurrentTime - cli_lasttime(acptr));
else
send_reply(sptr, RPL_TRACEUSER, conClass,
- get_client_name(acptr, HIDE_IP),
+ get_client_name(acptr, SHOW_IP),
CurrentTime - cli_lasttime(acptr));
cnt++;
}
!(dow && IsInvisible(acptr)))) || !dow || IsAnOper(acptr)) {
if (IsAnOper(acptr))
send_reply(sptr, RPL_TRACEOPERATOR, conClass,
- get_client_name(acptr, HIDE_IP),
+ get_client_name(acptr, SHOW_IP),
CurrentTime - cli_lasttime(acptr));
else
send_reply(sptr, RPL_TRACEUSER, conClass,
- get_client_name(acptr, HIDE_IP),
+ get_client_name(acptr, SHOW_IP),
CurrentTime - cli_lasttime(acptr));
cnt++;
}
* note: it is guaranteed that parv[0]..parv[parc-1] are all
* non-NULL pointers.
*/
-#if 0
-/*
- * No need to include handlers.h here the signatures must match
- * and we don't need to force a rebuild of all the handlers everytime
- * we add a new one to the list. --Bleep
- */
#include "handlers.h"
-#endif /* 0 */
#include "client.h"
#include "ircd.h"
#include "ircd_chattr.h"
#include <stdlib.h>
#include <string.h>
-#define UFLAGS (FLAGS_INVISIBLE|FLAGS_SERVNOTICE)
-
/*
* m_user
*
* parv[0] = sender prefix
* parv[1] = username (login name, account)
- * parv[2] = umode mask (host name)
- * parv[3] = server notice mask (server name)
+ * parv[2] = host name (ignored)
+ * parv[3] = server name (ignored)
* parv[4] = users real name info
*/
int m_user(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
{
char* username;
- const char* umode;
- const char* snomask;
const char* info;
struct User* user;
else
username = "NoUser";
- umode = (EmptyString(parv[2])) ? "." : parv[2];
- snomask = (EmptyString(parv[3])) ? "." : parv[3];
info = (EmptyString(parv[4])) ? "No Info" : parv[4];
user = make_user(cptr);
- if (!strchr(umode, '.')) /* Not an IP# as hostname ? */
- cli_flags(cptr) |= (UFLAGS & atoi(umode));
-
- if ((cli_flags(cptr) & FLAGS_SERVNOTICE))
- set_snomask(cptr, (IsDigit(*snomask) && !strchr(snomask, '.')) ?
- (atoi(snomask) & SNO_USER) : SNO_DEFAULT, SNO_SET);
-
user->server = &me;
ircd_strncpy(cli_info(cptr), info, REALLEN);
#include "client.h"
#include "hash.h"
#include "ircd.h"
+#include "ircd_policy.h"
#include "ircd_reply.h"
#include "ircd_string.h"
#include "match.h"
if (buf[0] != '\0')
send_reply(sptr, RPL_WHOISCHANNELS, name, buf);
}
- send_reply(sptr, RPL_WHOISSERVER, name, cli_name(a2cptr), cli_info(a2cptr));
+
+#ifdef HEAD_IN_SAND_WHOIS_SERVERNAME
+ if (!IsOper(sptr))
+ send_reply(sptr, RPL_WHOISSERVER, name, "*.undernet.org",
+ "The Undernet Underworld");
+ else
+#endif
+ send_reply(sptr, RPL_WHOISSERVER, name, cli_name(a2cptr),
+ cli_info(a2cptr));
if (user)
{
*
* $Id$
*/
+#include "config.h"
#include "parse.h"
#include "client.h"
#include "channel.h"
#include "ircd_alloc.h"
#include "ircd_chattr.h"
#include "ircd_features.h"
+#include "ircd_policy.h"
#include "ircd_reply.h"
#include "ircd_string.h"
#include "msg.h"
TOK_TRACE,
0, MAXPARA, MFLG_SLOW, 0,
/* UNREG, CLIENT, SERVER, OPER, SERVICE */
+#ifdef HEAD_IN_SAND_TRACE
+ { m_unregistered, m_not_oper, ms_trace, mo_trace, m_ignore }
+#else
{ m_unregistered, m_trace, ms_trace, mo_trace, m_ignore }
+#endif
},
{
MSG_PASS,
TOK_MAP,
0, MAXPARA, MFLG_SLOW, 0,
/* UNREG, CLIENT, SERVER, OPER, SERVICE */
+#ifdef HEAD_IN_SAND_MAP
+ { m_unregistered, m_map_redirect, m_ignore, m_map, m_ignore }
+#else
{ m_unregistered, m_map, m_ignore, m_map, m_ignore }
+#endif
},
{
MSG_VERSION,
TOK_LINKS,
0, MAXPARA, MFLG_SLOW, 0,
/* UNREG, CLIENT, SERVER, OPER, SERVICE */
+#ifdef HEAD_IN_SAND_LINKS
+ { m_unregistered, m_links_redirect, ms_links, m_links, m_ignore }
+#else
{ m_unregistered, m_links, ms_links, m_links, m_ignore }
+#endif
},
{
MSG_ADMIN,
assert(0 != conf);
memset(conf, 0, sizeof(struct DenyConf));
- DupString(conf->hostmask, fields[1]);
+ if (fields[1][0] == '$' && fields[1][1] == 'R') {
+ DupString(conf->hostmask, fields[1] + 2);
+ conf->flags |= DENY_FLAGS_REALNAME;
+ } else
+ DupString(conf->hostmask, fields[1]);
+
collapse(conf->hostmask);
if (!EmptyString(fields[2])) {
const char* p = fields[2];
if ('!' == *p) {
- conf->is_file = 1;
+ conf->flags |= DENY_FLAGS_FILE;
++p;
}
DupString(conf->message, p);
conf->s_addr = inet_addr(ipname);
Debug((DEBUG_DEBUG, "IPkill: %s = %08x/%i (%08x)", ipname,
conf->s_addr, conf->bits, NETMASK(conf->bits)));
+ conf->flags |= DENY_FLAGS_IP;
}
conf->next = denyConfList;
denyConfList = conf;
{
const char* host;
const char* name;
+ const char* realname;
struct DenyConf* deny;
struct Gline* agline = NULL;
host = cli_sockhost(cptr);
name = cli_user(cptr)->username;
+ realname = cli_info(cptr);
assert(strlen(host) <= HOSTLEN);
assert((name ? strlen(name) : 0) <= HOSTLEN);
-
+ assert((realname ? strlen(realname) : 0) <= REALLEN);
+
/* 2000-07-14: Rewrote this loop for massive speed increases.
* -- Isomer
*/
for (deny = denyConfList; deny; deny = deny->next) {
if (0 != match(deny->usermask, name))
continue;
-
+
if (EmptyString(deny->hostmask))
break;
-
- if (deny->ip_kill) { /* k: by IP */
+
+ if (deny->flags & DENY_FLAGS_REALNAME) { /* K: by real name */
+ if (0 == match(deny->hostmask, realname))
+ break;
+ } else if (deny->flags & DENY_FLAGS_IP) { /* k: by IP */
Debug((DEBUG_DEBUG, "ip: %08x network: %08x/%i mask: %08x",
cli_ip(cptr).s_addr, deny->s_addr, deny->bits, NETMASK(deny->bits)));
if ((cli_ip(cptr).s_addr & NETMASK(deny->bits)) == deny->s_addr)
send_reply(cptr, SND_EXPLICIT | ERR_YOUREBANNEDCREEP,
":Connection from your host is refused on this server.");
else {
- if (deny->is_file)
+ if (deny->flags & DENY_FLAGS_FILE)
killcomment(cptr, deny->message);
else
send_reply(cptr, SND_EXPLICIT | ERR_YOUREBANNEDCREEP, ":%s.", deny->message);
#include "ircd.h"
#include "ircd_alloc.h"
#include "ircd_log.h"
+#include "ircd_policy.h"
#include "ircd_reply.h"
#include "ircd_string.h"
#include "list.h"
if (IsServer(victim))
{
+#ifdef HEAD_IN_SAND_NETSPLIT
+ strcpy(comment1, "*.net *.split");
+#else
strcpy(comment1, cli_name(cli_serv(victim)->up));
strcat(comment1, " ");
strcat(comment1, cli_name(victim));
+#endif
if (IsUser(killer))
sendto_opmask_butone(killer, SNO_OLDSNO, "%s SQUIT by %s [%s]:",
(cli_user(killer)->server == victim ||
{
const struct DenyConf* p = conf_get_deny_list();
for ( ; p; p = p->next)
- send_reply(to, RPL_STATSKLINE, (p->ip_kill) ? 'k' : 'K',
+ send_reply(to, RPL_STATSKLINE, (p->flags & DENY_FLAGS_IP) ? 'k' : 'K',
p->hostmask, p->message, p->usermask);
}
#include "ircd_chattr.h"
#include "ircd_features.h"
#include "ircd_log.h"
+#include "ircd_policy.h"
#include "ircd_reply.h"
#include "ircd_string.h"
#include "list.h"
{
last_too_many1 = CurrentTime;
sendto_opmask_butone(0, SNO_TOOMANY, "Too many connections in "
- "class for %s.",
- get_client_name(sptr, HIDE_IP));
+ "class %i for %s.", get_client_class(sptr),
+ get_client_name(sptr, SHOW_IP));
}
++ServerStats->is_ref;
IPcheck_connect_fail(cli_ip(sptr));
last_too_many2 = CurrentTime;
sendto_opmask_butone(0, SNO_TOOMANY, "Too many connections from "
"same IP for %s.",
- get_client_name(sptr, HIDE_IP));
+ get_client_name(sptr, SHOW_IP));
}
++ServerStats->is_ref;
return exit_client(cptr, sptr, &me,
tmpmask = (what == MODE_ADD) ?
(IsAnOper(sptr) ? SNO_OPERDEFAULT : SNO_DEFAULT) : 0;
if (tmpmask)
- cli_flags(sptr) |= FLAGS_SERVNOTICE;
+ SetServNotice(sptr);
else
- cli_flags(sptr) &= ~FLAGS_SERVNOTICE;
+ ClearServNotice(sptr);
break;
case 'w':
if (what == MODE_ADD)
if (feature_bool(FEAT_WALLOPS_OPER_ONLY) && !IsAnOper(sptr) &&
!(setflags & FLAGS_WALLOP))
ClearWallops(sptr);
+#ifdef SERVNOTICE_OPER_ONLY
+ if (MyConnect(sptr) && !IsAnOper(sptr) && !(setflags & FLAGS_SERVNOTICE)) {
+ ClearServNotice(sptr);
+ set_snomask(sptr, 0, SNO_SET);
+ }
+#endif
+#ifdef DEBUG_OPER_ONLY
+ if (!IsAnOper(sptr) && !(setflags & FLAGS_DEBUG))
+ ClearDebug(sptr);
+#endif
}
if (MyConnect(sptr)) {
if ((setflags & (FLAGS_OPER | FLAGS_LOCOP)) && !IsAnOper(sptr))
det_confs_butmask(sptr, CONF_CLIENT & ~CONF_OPS);
- if (tmpmask != cli_snomask(sptr))
- set_snomask(sptr, tmpmask, SNO_SET);
- if (cli_snomask(sptr) && snomask_given)
- send_reply(sptr, RPL_SNOMASK, cli_snomask(sptr), cli_snomask(sptr));
+ if (SendServNotice(sptr)) {
+ if (tmpmask != cli_snomask(sptr))
+ set_snomask(sptr, tmpmask, SNO_SET);
+ if (cli_snomask(sptr) && snomask_given)
+ send_reply(sptr, RPL_SNOMASK, cli_snomask(sptr), cli_snomask(sptr));
+ }
}
/*
* Compare new flags with old flags and send string which