Merge insp20

This commit is contained in:
Attila Molnar 2015-04-20 17:40:12 +02:00
commit 8f5efbc7aa
43 changed files with 311 additions and 1779 deletions

1
.gitignore vendored
View File

@ -8,6 +8,7 @@
/BSDmakefile
/GNUmakefile
/build
/docs/doxygen
/inspircd
/inspircd.1
/inspircd-genssl.1

View File

@ -25,4 +25,4 @@ many different users.
* [Website](http://inspircd.org)
* [GitHub](https://github.com/inspircd)
* [IRC](irc://irc.chatspike.net/inspircd)
* IRC: \#inspircd on irc.inspircd.org

File diff suppressed because it is too large Load Diff

View File

@ -1,21 +0,0 @@
# Aliases for nickserv, chanserv, operserv, memoserv, hostserv
<alias text="NICKSERV" replace="PRIVMSG NickServ :$2-" requires="NickServ" uline="yes">
<alias text="CHANSERV" replace="PRIVMSG ChanServ :$2-" requires="ChanServ" uline="yes">
<alias text="OPERSERV" replace="PRIVMSG OperServ :$2-" requires="OperServ" uline="yes" operonly="yes">
<alias text="MEMOSERV" replace="PRIVMSG MemoServ :$2-" requires="MemoServ" uline="yes">
<alias text="STATSERV" replace="PRIVMSG StatServ :$2-" requires="StatServ" uline="yes" operonly="yes">
<alias text="HOSTSERV" replace="PRIVMSG HostServ :$2-" requires="HostServ" uline="yes">
# Shorthand aliases for nickserv, chanserv, operserv, memoserv, hostserv
<alias text="NS" replace="PRIVMSG NickServ :$2-" requires="NickServ" uline="yes">
<alias text="CS" replace="PRIVMSG ChanServ :$2-" requires="ChanServ" uline="yes">
<alias text="OS" replace="PRIVMSG OperServ :$2-" requires="OperServ" uline="yes" operonly="yes">
<alias text="MS" replace="PRIVMSG MemoServ :$2-" requires="MemoServ" uline="yes">
<alias text="SS" replace="PRIVMSG StatServ :$2-" requires="StatServ" uline="yes" operonly="yes">
<alias text="HS" replace="PRIVMSG HostServ :$2-" requires="HostServ" uline="yes">
# /id [channel] <password>
# Identify for a channel or nickname
<alias text="ID" format="#*" replace="PRIVMSG ChanServ :IDENTIFY $2 $3" requires="ChanServ" uline="yes">
<alias text="ID" format="*" replace="PRIVMSG NickServ :IDENTIFY $2" requires="NickServ" uline="yes">

View File

@ -1,35 +0,0 @@
# Aliases for BLSB, ConnectServ, FloodServ, NeoStats, Operlog, QuoteServ, SecureServ, SeenServ, TextServ, WarServ, YahtzeeServ, LogServ, opsb, GamesServ, ProfileServ & StupidServ
<alias text="BLSB" replace="PRIVMSG BLSB :$2-" requires="BLSB" uline="yes" operonly="yes">
<alias text="CONNECTSERV" replace="PRIVMSG ConnectServ :$2-" requires="ConnectServ" uline="yes" operonly="yes">
<alias text="FLOODSERV" replace="PRIVMSG FloodServ :$2-" requires="FloodServ" uline="yes" operonly="yes">
<alias text="NEOSTATS" replace="PRIVMSG NeoStats :$2-" requires="NeoStats" uline="yes" operonly="yes">
<alias text="OPERLOG" replace="PRIVMSG Operlog :$2-" requires="Operlog" uline="yes" operonly="yes">
<alias text="QUOTESERV" replace="PRIVMSG QuoteServ :$2-" requires="QuoteServ" uline="yes" operonly="yes">
<alias text="SECURESERV" replace="PRIVMSG SecureServ :$2-" requires="SecureServ" uline="yes" operonly="yes">
<alias text="SEENSERV" replace="PRIVMSG SeenServ :$2-" requires="SeenServ" uline="yes" operonly="yes">
<alias text="TEXTSERV" replace="PRIVMSG TextServ :$2-" requires="TextServ" uline="yes" operonly="yes">
<alias text="WARSERV" replace="PRIVMSG WarServ :$2-" requires="WarServ" uline="yes">
<alias text="YAHTZEESERV" replace="PRIVMSG YahtzeeServ :$2-" requires="YahtzeeServ" uline="yes" operonly="yes">
<alias text="LOGSERV" replace="PRIVMSG LogServ :$2-" requires="LogServ" uline="yes" operonly="yes">
<alias text="OPSB" replace="PRIVMSG opsb :$2-" requires="opsb" uline="yes" operonly="yes">
<alias text="GAMESSERV" replace="PRIVMSG GamesServ :$2-" requires="GamesServ" uline="yes">
<alias text="PROFILESERV" replace="PRIVMSG ProfileServ :$2-" requires="ProfileServ" uline="yes">
<alias text="STUPIDSERV" replace="PRIVMSG StupidServ :$2-" requires="StupidServ" uline="yes">
# Shorthand aliases for FloodServ, Operlog, QuoteServ, TextServ, WarServ, YahtzeeServ, LogServ, GamesServ, ProfileServ, SecureServ, SeenServ, NeoStats, ConnectServ & StupidServ
<alias text="FS" replace="PRIVMSG FloodServ :$2-" requires="FloodServ" uline="yes" operonly="yes">
<alias text="OL" replace="PRIVMSG Operlog :$2-" requires="Operlog" uline="yes" operonly="yes">
<alias text="QS" replace="PRIVMSG QuoteServ :$2-" requires="QuoteServ" uline="yes" operonly="yes">
<alias text="TS" replace="PRIVMSG TextServ :$2-" requires="TextServ" uline="yes" operonly="yes">
<alias text="WS" replace="PRIVMSG WarServ :$2-" requires="WarServ" uline="yes">
<alias text="YS" replace="PRIVMSG YahtzeeServ :$2-" requires="YahtzeeServ" uline="yes" operonly="yes">
<alias text="LS" replace="PRIVMSG LogServ :$2-" requires="LogServ" uline="yes" operonly="yes">
<alias text="GS" replace="PRIVMSG GamesServ :$2-" requires="GamesServ" uline="yes">
<alias text="PS" replace="PRIVMSG ProfileServ :$2-" requires="ProfileServ" uline="yes">
<alias text="SECURE" replace="PRIVMSG SecureServ :$2-" requires="SecureServ" uline="yes" operonly="yes">
<alias text="SEEN" replace="PRIVMSG SeenServ :$2-" requires="SeenServ" uline="yes" operonly="yes">
<alias text="NEO" replace="PRIVMSG NeoStats :$2-" requires="NeoStats" uline="yes" operonly="yes">
<alias text="CONN" replace="PRIVMSG ConnectServ :$2-" requires="ConnectServ" uline="yes" operonly="yes">
<alias text="STUPID" replace="PRIVMSG StupidServ :$2-" requires="StupidServ" uline="yes">

View File

@ -115,7 +115,7 @@ E.g. /RMODE #Chan b m:* will remove all mute extbans.">
<helpop key="fpart" value="/FPART <channel> <nick> [<reason>]
This behaves identically to /REMOVE. /REMOVE is a builtin mIRC command
This behaves identically to /REMOVE. /REMOVE is a built-in mIRC command
which caused trouble for some users.">
<helpop key="devoice" value="/DEVOICE <channel>
@ -378,7 +378,7 @@ Sets your name to the specified name.">
-------------
OPERMOTD CHECK CLONES USERIP TLINE
ALLTIME WALLOPS GLOBOPS
ALLTIME WALLOPS GLOBOPS MODENOTICE
SETHOST SETIDENT CHGHOST CHGIDENT CHGNAME
SETIDLE SWHOIS
@ -731,7 +731,7 @@ The duration may be specified in seconds, or in the format
<helpop key="eline" value="/ELINE <user@host> [<duration> :<reason>]
Sets or removes a e-line (local ban exception) on host mask.
Sets or removes a e-line (global ban exception) on host mask.
You must specify at least 3 parameters to add an exception, and one
parameter to remove an exception (just the user@host section).
@ -777,6 +777,12 @@ while methods G and Z also add G/Z-Lines for all the targets.
When used, the victims won't see each other getting kicked or quitting.">
<helpop key="modenotice" value="/MODENOTICE <modeletters> <message>
Sends a notice to all users who have the given mode(s) set.
If multiple mode letters are given, the notice is only sent to users
who have all of them set.">
######################
# User/Channel Modes #
######################
@ -896,6 +902,10 @@ When used, the victims won't see each other getting kicked or quitting.">
specified rate (requires nickflood module).
G Censors messages to the channel based on the
network configuration (requires censor module).
H <num>:<duration> Displays the last <num> lines of chat to joining
users. <duration> is the maximum time to keep
lines in the history buffer (requires chanhistory
module).
J <seconds> Prevents rejoin after kick for the specified
number of seconds. This prevents auto-rejoin
(requires kicknorejoin module).
@ -905,7 +915,7 @@ When used, the victims won't see each other getting kicked or quitting.">
module).
M Blocks unregistered users from speaking (requires
services account module).
N Prevents users on the channel from chainging nick
N Prevents users on the channel from changing nick
(requires nonicks module).
O Channel is IRCops only (can only be set by IRCops,
requires operchans module).
@ -1060,8 +1070,6 @@ Acting extbans:
matching users (requires blockcaps module).
C:<banmask> Blocks CTCPs from matching users (requires noctcp
module).
M:<account> Blocks messages from users logged into a matching
account (requires services account module).
N:<banmask> Blocks nick changes from matching users (requires
nonicks module).
Q:<banmask> Blocks kicks by matching users (requires nokicks
@ -1074,8 +1082,8 @@ Acting extbans:
(requires services account).
A ban given to an Acting extban may either be a nick!user@host mask
(unless stated otherwise, for example M: taking an account name),
matched against users as for a normal ban, or a Matching extban.
(unless stated otherwise), matched against users as for a normal ban,
or a Matching extban.
There is an additional special type of extended ban, a redirect ban:

View File

@ -50,7 +50,7 @@ OPER">
-------------
OPERMOTD CHECK CLONES USERIP TLINE
ALLTIME WALLOPS GLOBOPS
ALLTIME WALLOPS GLOBOPS MODENOTICE
SETHOST SETIDENT CHGHOST CHGIDENT CHGNAME
SETIDLE SWHOIS
@ -186,6 +186,10 @@ LOCKSERV UNLOCKSERV">
specified rate (requires nickflood module).
G Censors messages to the channel based on the
network configuration (requires censor module).
H <num>:<duration> Displays the last <num> lines of chat to joining
users. <duration> is the maximum time to keep
lines in the history buffer (requires chanhistory
module).
J <seconds> Prevents rejoin after kick for the specified
number of seconds. This prevents auto-rejoin
(requires kicknorejoin module).
@ -195,7 +199,7 @@ LOCKSERV UNLOCKSERV">
module).
M Blocks unregistered users from speaking (requires
services account module).
N Prevents users on the channel from chainging nick
N Prevents users on the channel from changing nick
(requires nonicks module).
O Channel is IRCops only (can only be set by IRCops,
requires operchans module).
@ -299,8 +303,6 @@ Acting extbans:
matching users (requires blockcaps module).
C:<banmask> Blocks CTCPs from matching users (requires noctcp
module).
M:<account> Blocks messages from users logged into a matching
account (requires services account module).
N:<banmask> Blocks nick changes from matching users (requires
nonicks module).
Q:<banmask> Blocks kicks by matching users (requires nokicks
@ -313,8 +315,8 @@ Acting extbans:
(requires services account).
A ban given to an Acting extban may either be a nick!user@host mask
(unless stated otherwise, for example M: taking an account name),
matched against users as for a normal ban, or a Matching extban.
(unless stated otherwise), matched against users as for a normal ban,
or a Matching extban.
There is an additional special type of extended ban, a redirect ban:

View File

@ -62,7 +62,7 @@
#<include executable="/path/to/executable parameters"> #
# #
# Executable include example: #
#<include executable="/usr/bin/wget -q -O - http://mynet.net/inspircd.conf">
#<include executable="/usr/bin/wget -q -O - http://example.com/inspircd.conf">
# #
@ -85,7 +85,7 @@
<server
# name: Hostname of your server. Does not need to resolve, but
# does need to be correct syntax (something.somethingelse.tld).
name="penguin.omega.org.za"
name="penguin.omega.example.org"
# description: Server description. Spaces are allowed.
description="Waddle World"
@ -185,7 +185,7 @@
#-#-#-#-#-#-#-#-#-#- DIE/RESTART CONFIGURATION -#-#-#-#-#-#-#-#-#-#-
# #
# You can configure the passwords here which you wish to use for #
# the /DIE and /RESTART commands. Only trusted IRCop's who will #
# the /DIE and /RESTART commands. Only trusted ircops who will #
# need this ability should know the die and restart password. #
# #
@ -277,7 +277,7 @@
# globalmax: Maximum global (network-wide) connections per IP (or CIDR mask, see below).
globalmax="3"
# maxconnwarn: Enable warnings when localmax or globalmax is hit (defaults to on)
# maxconnwarn: Enable warnings when localmax or globalmax are reached (defaults to on)
maxconnwarn="off"
# resolvehostnames: If disabled, no DNS lookups will be performed on connecting users
@ -496,7 +496,7 @@
# matched, the banlist size defaults to 64 entries. #
# #
<banlist chan="#morons" limit="128">
<banlist chan="#largechan" limit="128">
<banlist chan="*" limit="69">
#-#-#-#-#-#-#-#-#-#-#- DISABLED FEATURES -#-#-#-#-#-#-#-#-#-#-#-#-#-#
@ -579,7 +579,7 @@
# allowmismatch: Setting this option to yes will allow servers to link even
# if they don't have the same "optionally common" modules loaded. Setting this to
# yes may introduce some desyncs and weirdness.
# yes may introduce some desyncs and unwanted behaviour.
allowmismatch="no"
# defaultbind: Sets the default for <bind> tags without an address. Choices are
@ -899,10 +899,10 @@
<badhost
# host: ident@hostname to ban.
# Wildcards and CIDR (if you specify an IP) can be used.
host="*@hundredz.n.hundredz.o.1337.kiddies.example.net"
host="*@banneduser.example.net"
# reason: Reason to display when user is disconnected
reason="Too many 1337 kiddiots">
reason="Evading Bans">
<badhost host="root@*" reason="Don't IRC as root!">
<badhost host="*@198.51.100.0/24" reason="This subnet is bad.">
@ -949,7 +949,7 @@
# #
# You should already know what to do here :) #
<die value="User error. Insert new user and press any key. (you didn't edit your config properly.)">
<die value="User error. You didn't edit your config properly. Go back and try again.">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# MODULES #-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# ____ _ _____ _ _ ____ _ _ _ #

View File

@ -17,11 +17,11 @@
<link
# name: The name of the remote server. This must match
# the <server:name> value of the remote server.
name="hub.penguin.org"
name="hub.example.org"
# ipaddr: The IP address of the remote server.
# Can also be a hostname, but hostname must resolve.
ipaddr="penguin.box.com"
ipaddr="penguin.example.org"
# port: The port to connect to the server on.
# It must be bound as a server port on the other server.
@ -71,8 +71,8 @@
# A duplicate of the first link block without comments
# if you like copying & pasting.
<link name="hub.penguin.org"
ipaddr="penguin.box.com"
<link name="hub.example.org"
ipaddr="penguin.example.org"
port="7000"
allowmask="203.0.113.0/24"
timeout="300"
@ -85,7 +85,7 @@
# Link block for services. Options are the same as for the first
# link block (depending on what your services package supports).
<link name="services.antarctic.com"
<link name="services.example.com"
ipaddr="localhost"
port="7000"
allowmask="127.0.0.0/8"
@ -95,7 +95,7 @@
# Simple autoconnect block. This enables automatic connection of a server
# Recommended setup is to have leaves connect to the hub, and have no
# automatic connections started by the hub.
<autoconnect period="10m" server="hub.penguin.org">
<autoconnect period="10m" server="hub.example.org">
# Failover autoconnect block. If you have multiple hubs, or want your network
# to automatically link even if the hub is down, you can specify multiple
@ -103,7 +103,7 @@
# robin fashion until one succeeds. Period defines the time for restarting
# a single loop.
<autoconnect period="120"
server="hub.us.penguin.org hub.eu.penguin.org leaf.eu.penguin.org">
server="hub.us.example.org hub.eu.example.org leaf.eu.example.org">
#-#-#-#-#-#-#-#-#-#-#-#- ULINES CONFIGURATION #-#-#-#-#-#-#-#-#-#-#-#-#
@ -115,4 +115,4 @@
# not generate quit and connect notices, which can cut down on noise #
# to opers on the network. #
# #
<uline server="services.antarctic.com" silent="yes">
<uline server="services.example.com" silent="yes">

View File

@ -22,7 +22,8 @@
# To link servers to InspIRCd, you MUST load the m_spanningtree #
# module. If you don't do this, server links will NOT work at all. #
# This is by design, to allow for the implementation of other linking #
# protocols in modules in the future. #
# protocols in modules in the future. This module is at the bottom of #
# this file. #
# #
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
@ -302,8 +303,9 @@
# cooldown="60">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# CAP module: Provides the CAP negotiation mechanism seen in
# ratbox-derived ircds.
# CAP module: Provides the CAP negotiation mechanism required by the
# m_sasl, m_namesx, m_uhnames, and m_ircv3 modules.
# It is also recommended for the STARTTLS support in m_starttls.
#<module name="m_cap.so">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
@ -345,12 +347,12 @@
# CGI:IRC documentation.
#
# Old style:
# <cgihost type="pass" mask="www.mysite.com"> # Get IP from PASS
# <cgihost type="ident" mask="otherbox.mysite.com"> # Get IP from ident
# <cgihost type="passfirst" mask="www.mysite.com"> # See the docs
# <cgihost type="pass" mask="www.example.com"> # Get IP from PASS
# <cgihost type="ident" mask="otherbox.example.com"> # Get IP from ident
# <cgihost type="passfirst" mask="www.example.com"> # See the docs
# New style:
# <cgihost type="webirc" password="foobar"
# mask="somebox.mysite.com"> # Get IP from WEBIRC
# mask="somebox.example.com"> # Get IP from WEBIRC
#
# IMPORTANT NOTE:
# ---------------
@ -640,7 +642,7 @@
# vhost - Displayed host (optional).
#
#<title name="foo" password="bar" title="Official Chat Helper">
#<title name="bar" password="foo" host="ident@host.name" title="Official Chat Helper" vhost="helper.network.chat">
#<title name="bar" password="foo" host="ident@test.org" title="Official Chat Helper" vhost="helper.test.org">
#<title name="foo" password="fcde2b2edba56bf408601fb721fe9b5c338d10ee429ea04fae5511b68fbf8fb9" hash="sha256" title="Official Chat Helper">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
@ -699,13 +701,13 @@
# redirect - Redirect the user to a different channel. #
# #
#<badchan name="#gods*" allowopers="yes" reason="Tortoises!"> #
#<badchan name="#heaven" redirect="#hell" reason="Nice try!"> #
#<badchan name="#chan1" redirect="#chan2" reason="Chan1 is closed"> #
# #
# Redirects will not work if the target channel is set +L. #
# #
# Additionally, you may specify channels which are allowed, even if #
# a badchan tag specifies it would be denied: #
#<goodchan name="#godsleeps"> #
#<goodchan name="#funtimes"> #
# Glob masks are accepted here also. #
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
@ -867,10 +869,10 @@
# #
# See http://wiki.inspircd.org/Modules/hostchange for help. #
# #
#<host suffix="polarbears.org" separator="." prefix="">
#<hostchange mask="*@fbi.gov" action="addnick">
#<hostchange mask="*r00t@*" action="suffix">
#<hostchange mask="a@b.com" action="set" value="blah.blah.blah">
#<host suffix="invalid.org" separator="." prefix="">
#<hostchange mask="*@42.theanswer.example.org" action="addnick">
#<hostchange mask="*root@*" action="suffix">
#<hostchange mask="a@example.com" action="set" value="foo.bar.baz">
#<hostchange mask="localhost" ports="7000,7001,7005-7007" action="set" value="blahblah.foo">
# hostcycle: If loaded, when a user gets a host or ident set, it will
@ -903,7 +905,7 @@
# Restrict access to the m_httpd_stats module to all but the local
# network and when the correct password is specified:
# <httpdacl path="/stats*" types="password,whitelist"
# username="secretstuff" password="mypasshere" whitelist="127.0.0.*,10.*">
# username="secrets" password="mypasshere" whitelist="127.0.0.*,10.*">
#
# Deny all connections to all but the main index page:
# <httpdacl path="/*" types="blacklist" blacklist="*">
@ -943,7 +945,7 @@
# Invite exception module: Adds support for channel invite exceptions
# (+I).
#<module name="m_inviteexception.so">
# Does a +I bypass channel +k in addition to +i?
# bypasskey: If this is enabled, exceptions will bypass +k as well as +i
#<inviteexception bypasskey="yes">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
@ -1098,7 +1100,7 @@
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Map hiding module: replaces /MAP and /LINKS output to users with a #
# message to see a website, set by maphide="http://link.to/site" in #
# message to see a website, set by maphide="http://test.org/map" in #
# the <security> tag, instead. #
#<module name="m_maphide.so">
@ -1354,7 +1356,7 @@
# password you want to hash. For example:
#
# <oper name="Brain"
# host="ident@dialup15.isp.com"
# host="ident@dialup15.isp.test.com"
# hash="sha256"
# password="01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b"
# type="NetAdmin">
@ -1687,9 +1689,8 @@
# as identified separately from the idea of a master account, which
# can be useful for services which are heavily nick-as-account centric.
#
# Also of note is that this module implements three extbans:
# Also of note is that this module implements two extbans:
# +b R: (stop matching account names from joining)
# +b M: (stop matching account names from speaking)
# +b U:n!u@h (blocks matching unregistered users)
#
#<module name="m_services_account.so">
@ -1971,8 +1972,8 @@
# #
# host - Vhost to set. #
#
#<vhost user="some_username" pass="some_password" host="some.host">
#<vhost user="foo" password="fcde2b2edba56bf408601fb721fe9b5c338d10ee429ea04fae5511b68fbf8fb9" hash="sha256" host="some.other.host">
#<vhost user="some_username" pass="some_password" host="some.host.test.cc">
#<vhost user="foo" password="fcde2b2edba56bf408601fb721fe9b5c338d10ee429ea04fae5511b68fbf8fb9" hash="sha256" host="some.other.host.example.com">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Watch module: Adds the WATCH command, which is used by clients to

View File

@ -15,7 +15,7 @@
name="Shutdown"
# commands: Oper-only commands that opers of this class can run.
commands="DIE RESTART REHASH LOADMODULE UNLOADMODULE RELOADMODULE GUNLOADMODULE GRELOADMODULE"
commands="DIE RESTART REHASH LOADMODULE UNLOADMODULE RELOADMODULE GLOADMODULE GUNLOADMODULE GRELOADMODULE"
# privs: Special privileges that users with this class may utilise.
# VIEWING:
@ -39,11 +39,11 @@
# chanmodes: Oper-only channel modes that opers with this class can use.
chanmodes="*">
<class name="SACommands" commands="SAJOIN SAPART SANICK SAQUIT SATOPIC SAKICK SAMODE">
<class name="SACommands" commands="SAJOIN SAPART SANICK SAQUIT SATOPIC SAKICK SAMODE OJOIN">
<class name="ServerLink" commands="CONNECT SQUIT RCONNECT RSQUIT MKPASSWD ALLTIME SWHOIS JUMPSERVER LOCKSERV UNLOCKSERV" usermodes="*" chanmodes="*" privs="servers/auspex">
<class name="BanControl" commands="KILL GLINE KLINE ZLINE QLINE ELINE TLINE RLINE CHECK NICKLOCK NICKUNLOCK SHUN CLONES CBAN CLOSE" usermodes="*" chanmodes="*">
<class name="OperChat" commands="WALLOPS GLOBOPS" usermodes="*" chanmodes="*" privs="users/mass-message">
<class name="HostCloak" commands="SETHOST SETIDENT CHGNAME CHGHOST CHGIDENT SETIDLE" usermodes="*" chanmodes="*" privs="users/auspex">
<class name="HostCloak" commands="SETHOST SETIDENT SETIDLE CHGNAME CHGHOST CHGIDENT" usermodes="*" chanmodes="*" privs="users/auspex">
#-#-#-#-#-#-#-#-#-#-#-#- OPERATOR COMPOSITION -#-#-#-#-#-#-#-#-#-#-#
@ -130,8 +130,8 @@
# Operator with a plaintext password and no comments, for easy copy & paste.
<oper
name="Brain"
password="s3cret"
host="brain@dialup15.isp.com *@localhost *@example.com *@2001:db8::/32"
password="youshouldhashthis"
host="brain@dialup15.isp.test.com *@localhost *@example.com *@2001:db8::/32"
#fingerprint="67cb9dc013248a829bb2171ed11becd4"
type="NetAdmin">

View File

@ -1283,7 +1283,8 @@ struct AllModuleList {
break; \
} \
return TRUE; \
}
} \
extern "C" DllExport const char inspircd_src_version[] = INSPIRCD_VERSION " " INSPIRCD_REVISION;
#else

View File

@ -130,6 +130,10 @@ class CoreExport UserManager : public fakederef<UserManager>
*/
void RemoveCloneCounts(User *user);
/** Rebuild clone counts
*/
void RehashCloneCounts();
/** Return the number of local and global clones of this user
* @param user The user to get the clone counts for
* @return The clone counts of this user. The returned reference is volatile - you

View File

@ -122,6 +122,7 @@ FOOTER = finishmessage
@TARGET BSD_MAKE MAKE += -s
RUNCC = perl $(SOURCEPATH)/make/run-cc.pl $(CXX)
RUNLD = perl $(SOURCEPATH)/make/run-cc.pl $(CXX)
VERBOSE =
@ENDIF
@IFDEF PURE_STATIC

View File

@ -345,11 +345,16 @@ for my $mod (sort keys %todo) {
}
$mod_versions{$mod} = $ver;
my $stat = getstore($url, "src/modules/$mod.cpp");
if ($stat == 200) {
my $ua = LWP::UserAgent->new(ssl_opts => { verify_hostname => 0 });
my $response = $ua->get($url);
if ($response->is_success) {
open(MF, ">src/modules/$mod.cpp") or die "\nFilesystem not writable: $!";
print MF $response->decoded_content;
close(MF);
print " - done\n";
} else {
print " - HTTP $stat\n";
printf "\nHTTP %s: %s\n", $response->code, $response->message;
}
}

View File

@ -182,11 +182,21 @@ void CommandParser::ProcessCommand(LocalUser *user, std::string &cmd)
/* find the command, check it exists */
Command* handler = GetHandler(command);
// Penalty to give if the command fails before the handler is executed
unsigned int failpenalty = 0;
/* Modify the user's penalty regardless of whether or not the command exists */
if (!user->HasPrivPermission("users/flood/no-throttle"))
{
// If it *doesn't* exist, give it a slightly heftier penalty than normal to deter flooding us crap
user->CommandFloodPenalty += handler ? handler->Penalty * 1000 : 2000;
unsigned int penalty = (handler ? handler->Penalty * 1000 : 2000);
user->CommandFloodPenalty += penalty;
// Increase their penalty later if we fail and the command has 0 penalty by default (i.e. in Command::Penalty) to
// throttle sending ERR_* from the command parser. If the command does have a non-zero penalty then this is not
// needed because we've increased their penalty above.
if (penalty == 0)
failpenalty = 1000;
}
if (!handler)
@ -257,12 +267,14 @@ void CommandParser::ProcessCommand(LocalUser *user, std::string &cmd)
{
if (!user->IsModeSet(handler->flags_needed))
{
user->CommandFloodPenalty += failpenalty;
user->WriteNumeric(ERR_NOPRIVILEGES, ":Permission Denied - You do not have the required operator privileges");
return;
}
if (!user->HasPermission(command))
{
user->CommandFloodPenalty += failpenalty;
user->WriteNumeric(ERR_NOPRIVILEGES, ":Permission Denied - Oper type %s does not have access to command %s",
user->oper->name.c_str(), command.c_str());
return;
@ -272,6 +284,7 @@ void CommandParser::ProcessCommand(LocalUser *user, std::string &cmd)
if ((user->registered == REG_ALL) && (!user->IsOper()) && (handler->IsDisabled()))
{
/* command is disabled! */
user->CommandFloodPenalty += failpenalty;
if (ServerInstance->Config->DisabledDontExist)
{
user->WriteNumeric(ERR_UNKNOWNCOMMAND, "%s :Unknown command", command.c_str());
@ -291,6 +304,7 @@ void CommandParser::ProcessCommand(LocalUser *user, std::string &cmd)
if (command_p.size() < handler->min_params)
{
user->CommandFloodPenalty += failpenalty;
user->WriteNumeric(ERR_NEEDMOREPARAMS, "%s :Not enough parameters.", command.c_str());
if ((ServerInstance->Config->SyntaxHints) && (user->registered == REG_ALL) && (handler->syntax.length()))
user->WriteNumeric(RPL_SYNTAX, ":SYNTAX %s %s", handler->name.c_str(), handler->syntax.c_str());
@ -299,6 +313,7 @@ void CommandParser::ProcessCommand(LocalUser *user, std::string &cmd)
if ((user->registered != REG_ALL) && (!handler->WorksBeforeReg()))
{
user->CommandFloodPenalty += failpenalty;
user->WriteNumeric(ERR_NOTREGISTERED, "%s :You have not registered",command.c_str());
}
else

View File

@ -53,6 +53,7 @@ static ConfigTag* CreateEmptyTag()
ServerConfig::ServerConfig()
: EmptyTag(CreateEmptyTag())
, Limits(EmptyTag)
, NoSnoticeStack(false)
{
RawLog = HideBans = HideSplits = UndernetMsgPrefix = false;
WildcardIPv6 = InvBypassModes = true;
@ -575,7 +576,7 @@ void ServerConfig::Apply(ServerConfig* old, const std::string &useruid)
errstr << "Possible configuration error: you have not defined any <bind> blocks." << std::endl
<< "You will need to do this if you want clients to be able to connect!" << std::endl;
if (old)
if (old && valid)
{
// On first run, ports are bound later on
FailedPortList pl;
@ -784,6 +785,7 @@ void ConfigReaderThread::Finish()
* XXX: The order of these is IMPORTANT, do not reorder them without testing
* thoroughly!!!
*/
ServerInstance->Users.RehashCloneCounts();
ServerInstance->XLines->CheckELines();
ServerInstance->XLines->ApplyLines();
ChanModeReference ban(NULL, "ban");

View File

@ -33,6 +33,11 @@ using namespace DNS;
*/
class Packet : public Query
{
static bool IsValidName(const std::string& name)
{
return (name.find_first_not_of("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.-") == std::string::npos);
}
void PackName(unsigned char* output, unsigned short output_size, unsigned short& pos, const std::string& name)
{
if (pos + name.length() + 2 > output_size)
@ -183,6 +188,9 @@ class Packet : public Query
case QUERY_PTR:
{
record.rdata = this->UnpackName(input, input_size, pos);
if (!IsValidName(record.rdata))
throw Exception("Invalid name"); // XXX: Causes the request to time out
break;
}
default:

View File

@ -32,7 +32,13 @@ CommandMotd::CommandMotd(Module* parent)
CmdResult CommandMotd::Handle (const std::vector<std::string>& parameters, User *user)
{
if (parameters.size() > 0 && parameters[0] != ServerInstance->Config->ServerName)
{
// Give extra penalty if a non-oper queries the /MOTD of a remote server
LocalUser* localuser = IS_LOCAL(user);
if ((localuser) && (!user->IsOper()))
localuser->CommandFloodPenalty += 2000;
return CMD_SUCCESS;
}
ConfigTag* tag = ServerInstance->Config->EmptyTag;
LocalUser* localuser = IS_LOCAL(user);

View File

@ -94,14 +94,15 @@ CmdResult CommandList::Handle (const std::vector<std::string>& parameters, User
// if the channel is not private/secret, OR the user is on the channel anyway
bool n = (has_privs || chan->HasUser(user));
if ((!n) && (chan->IsModeSet(privatemode)))
// If we're not in the channel and +s is set on it, we want to ignore it
if ((n) || (!chan->IsModeSet(secretmode)))
{
/* Channel is +p and user is outside/not privileged */
user->WriteNumeric(RPL_LIST, "* %ld :", users);
}
else
{
if ((n) || (!chan->IsModeSet(secretmode)))
if ((!n) && (chan->IsModeSet(privatemode)))
{
// Channel is private (+p) and user is outside/not privileged
user->WriteNumeric(RPL_LIST, "* %ld :", users);
}
else
{
/* User is in the channel/privileged, channel is not +s */
user->WriteNumeric(RPL_LIST, "%s %ld :[+%s] %s", chan->name.c_str(), users, chan->ChanModes(n), chan->topic.c_str());

View File

@ -65,7 +65,7 @@ CmdResult CommandReloadmodule::Handle (const std::vector<std::string>& parameter
if (m)
{
ServerInstance->Modules->Reload(m, new ReloadModuleWorker(user->uuid, parameters[0]));
ServerInstance->Modules->Reload(m, (creator->dying ? NULL : new ReloadModuleWorker(user->uuid, parameters[0])));
return CMD_SUCCESS;
}
else

View File

@ -58,7 +58,7 @@ static void GenerateStatsLl(User* user, string_list& results, char c)
for (UserManager::LocalList::const_iterator i = list.begin(); i != list.end(); ++i)
{
LocalUser* u = *i;
results.push_back("211 "+user->nick+" "+u->nick+"["+u->ident+"@"+(c == 'l' ? u->dhost : u->GetIPString())+"] "+ConvToStr(u->eh.getSendQSize())+" "+ConvToStr(u->cmds_out)+" "+ConvToStr(u->bytes_out)+" "+ConvToStr(u->cmds_in)+" "+ConvToStr(u->bytes_in)+" "+ConvToStr(ServerInstance->Time() - u->age));
results.push_back("211 "+user->nick+" "+u->nick+"["+u->ident+"@"+(c == 'l' ? u->dhost : u->GetIPString())+"] "+ConvToStr(u->eh.getSendQSize())+" "+ConvToStr(u->cmds_out)+" "+ConvToStr(u->bytes_out)+" "+ConvToStr(u->cmds_in)+" "+ConvToStr(u->bytes_in)+" "+ConvToStr(ServerInstance->Time() - u->signon));
}
}
@ -378,7 +378,13 @@ void CommandStats::DoStats(char statschar, User* user, string_list &results)
CmdResult CommandStats::Handle (const std::vector<std::string>& parameters, User *user)
{
if (parameters.size() > 1 && parameters[1] != ServerInstance->Config->ServerName)
{
// Give extra penalty if a non-oper does /STATS <remoteserver>
LocalUser* localuser = IS_LOCAL(user);
if ((localuser) && (!user->IsOper()))
localuser->CommandFloodPenalty += 2000;
return CMD_SUCCESS;
}
string_list values;
char search = parameters[0][0];
DoStats(search, user, values);

View File

@ -58,6 +58,7 @@ CmdResult CommandUser::HandleLocal(const std::vector<std::string>& parameters, L
else
{
user->WriteNumeric(ERR_ALREADYREGISTERED, ":You may not reregister");
user->CommandFloodPenalty += 1000;
return CMD_FAILURE;
}

View File

@ -45,6 +45,7 @@ class CommandPass : public SplitCommand
// Check to make sure they haven't registered -- Fix by FCS
if (user->registered == REG_ALL)
{
user->CommandFloodPenalty += 1000;
user->WriteNumeric(ERR_ALREADYREGISTERED, ":You may not reregister");
return CMD_FAILURE;
}
@ -64,7 +65,6 @@ class CommandPing : public Command
CommandPing(Module* parent)
: Command(parent, "PING", 1, 2)
{
Penalty = 0;
syntax = "<servername> [:<servername>]";
}
@ -102,8 +102,15 @@ class CommandPong : public Command
CmdResult Handle(const std::vector<std::string>& parameters, User* user)
{
// set the user as alive so they survive to next ping
if (IS_LOCAL(user))
IS_LOCAL(user)->lastping = 1;
LocalUser* localuser = IS_LOCAL(user);
if (localuser)
{
// Increase penalty unless we've sent a PING and this is the reply
if (localuser->lastping)
localuser->CommandFloodPenalty += 1000;
else
localuser->lastping = 1;
}
return CMD_SUCCESS;
}
};

View File

@ -24,10 +24,15 @@
*/
class CommandUserhost : public Command
{
UserModeReference hideopermode;
public:
/** Constructor for userhost.
*/
CommandUserhost ( Module* parent) : Command(parent,"USERHOST", 1, 5) {
CommandUserhost(Module* parent)
: Command(parent,"USERHOST", 1)
, hideopermode(parent, "hideoper")
{
syntax = "<nick> [<nick> ...]";
}
/** Handle command.
@ -44,7 +49,11 @@ CmdResult CommandUserhost::Handle (const std::vector<std::string>& parameters, U
std::string retbuf = "302 " + user->nick + " :";
for (unsigned int i = 0; i < parameters.size(); i++)
unsigned int max = parameters.size();
if (max > 5)
max = 5;
for (unsigned int i = 0; i < max; i++)
{
User *u = ServerInstance->FindNickOnly(parameters[i]);
@ -53,7 +62,11 @@ CmdResult CommandUserhost::Handle (const std::vector<std::string>& parameters, U
retbuf += u->nick;
if (u->IsOper())
retbuf += '*';
{
// XXX: +H hidden opers must not be shown as opers
if ((u == user) || (has_privs) || (!u->IsModeSet(hideopermode)))
retbuf += '*';
}
retbuf += '=';
retbuf += (u->IsAway() ? '-' : '+');

View File

@ -144,7 +144,7 @@ bool CommandWho::whomatch(User* cuser, User* user, const char* matchtext)
long seconds = InspIRCd::Duration(matchtext);
// Okay, so time matching, we want all users connected `seconds' ago
if (user->age >= ServerInstance->Time() - seconds)
if (user->signon >= ServerInstance->Time() - seconds)
match = true;
}

View File

@ -153,7 +153,7 @@ unsigned const char rfc_case_sensitive_map[256] = {
size_t CoreExport irc::hash::operator()(const irc::string &s) const
{
register size_t t = 0;
size_t t = 0;
for (irc::string::const_iterator x = s.begin(); x != s.end(); ++x) /* ++x not x++, as its faster */
t = 5 * t + national_case_insensitive_map[(unsigned char)*x];
return t;
@ -196,7 +196,7 @@ size_t irc::insensitive::operator()(const std::string &s) const
* only with *x replaced with national_case_insensitive_map[*x].
* This avoids a copy to use hash<const char*>
*/
register size_t t = 0;
size_t t = 0;
for (std::string::const_iterator x = s.begin(); x != s.end(); ++x) /* ++x not x++, as its faster */
t = 5 * t + national_case_insensitive_map[(unsigned char)*x];
return t;

View File

@ -31,7 +31,10 @@ bool ModuleManager::Load(const std::string& filename, bool defer)
{
/* Don't allow people to specify paths for modules, it doesn't work as expected */
if (filename.find('/') != std::string::npos)
{
LastModuleError = "You can't load modules with a path: " + filename;
return false;
}
const std::string moduleFile = ServerInstance->Config->Paths.PrependModule(filename);

View File

@ -67,7 +67,7 @@ class ModuleAbbreviation : public Module
/* Ambiguous command, list the matches */
if (!matchlist.empty())
{
user->WriteNumeric(420, ":Ambiguous abbreviation, posssible matches: %s%s", foundcommand.c_str(), matchlist.c_str());
user->WriteNumeric(420, ":Ambiguous abbreviation, possible matches: %s%s", foundcommand.c_str(), matchlist.c_str());
return MOD_RES_DENY;
}

View File

@ -73,8 +73,10 @@ class CommandCheck : public Command
{
char timebuf[60];
struct tm *mytime = gmtime(&time);
strftime(timebuf, 59, "%Y-%m-%d %H:%M:%S UTC (%s)", mytime);
return std::string(timebuf);
strftime(timebuf, 59, "%Y-%m-%d %H:%M:%S UTC (", mytime);
std::string ret(timebuf);
ret.append(ConvToStr(time)).push_back(')');
return ret;
}
void dumpExt(User* user, const std::string& checkstr, Extensible* ext)

View File

@ -318,6 +318,9 @@ class ModuleDCCAllow : public Module
while (ss >> buf)
tokens.push_back(buf);
if (tokens.size() < 2)
return MOD_RES_PASSTHRU;
irc::string type = tokens[1].c_str();
ConfigTag* conftag = ServerInstance->Config->ConfValue("dccallow");
@ -325,6 +328,9 @@ class ModuleDCCAllow : public Module
if (type == "SEND")
{
if (tokens.size() < 3)
return MOD_RES_PASSTHRU;
std::string defaultaction = conftag->getString("action");
std::string filename = tokens[2];

View File

@ -155,7 +155,7 @@ class CommandGreloadmodule : public Command
if (m)
{
GReloadModuleWorker* worker = NULL;
if (m != creator)
if ((m != creator) && (!creator->dying))
worker = new GReloadModuleWorker(user->nick, user->uuid, parameters[0]);
ServerInstance->Modules->Reload(m, worker);
}

View File

@ -68,7 +68,11 @@ class ModuleHideOper : public Module
if (user->IsModeSet(hm) && !source->HasPrivPermission("users/auspex"))
{
// hide the "*" that marks the user as an oper from the /WHO line
std::string::size_type pos = line.find("*");
std::string::size_type spcolon = line.find(" :");
if (spcolon == std::string::npos)
return; // Another module hid the user completely
std::string::size_type sp = line.rfind(' ', spcolon-1);
std::string::size_type pos = line.find('*', sp);
if (pos != std::string::npos)
line.erase(pos, 1);
// hide the line completely if doing a "/who * o" query

View File

@ -407,6 +407,20 @@ class ModuleHttpServer : public Module
return MOD_RES_ALLOW;
}
void OnUnloadModule(Module* mod)
{
for (insp::intrusive_list<HttpServerSocket>::const_iterator i = sockets.begin(); i != sockets.end(); ++i)
{
HttpServerSocket* sock = *i;
++i;
if (sock->GetIOHook() && sock->GetIOHook()->prov->creator == mod)
{
sock->cull();
delete sock;
}
}
}
CullResult cull() CXX11_OVERRIDE
{
for (insp::intrusive_list<HttpServerSocket>::const_iterator i = sockets.begin(); i != sockets.end(); ++i)

View File

@ -154,7 +154,7 @@ class MD5Provider : public HashProvider
void MD5Transform(word32 buf[4], word32 const in[16])
{
register word32 a, b, c, d;
word32 a, b, c, d;
a = buf[0];
b = buf[1];

View File

@ -72,6 +72,20 @@ class ModuleOperPrefixMode : public Module
return MOD_RES_PASSTHRU;
}
void OnPostJoin(Membership* memb)
{
if ((!IS_LOCAL(memb->user)) || (!memb->user->IsOper()) || (memb->user->IsModeSet(hideopermode)))
return;
if (memb->hasMode(opm.GetModeChar()))
return;
// The user was force joined and OnUserPreJoin() did not run. Set the operprefix now.
Modes::ChangeList changelist;
changelist.push_add(&opm, memb->user->nick);
ServerInstance->Modes.Process(ServerInstance->FakeClient, memb->chan, NULL, changelist);
}
void SetOperPrefix(User* user, bool add)
{
Modes::ChangeList changelist;

View File

@ -96,6 +96,9 @@ class SaslAuthenticator
if (msg[0] != this->agent)
return this->state;
if (msg.size() < 4)
return this->state;
if (msg[2] == "C")
this->user->Write("AUTHENTICATE %s", msg[3].c_str());
else if (msg[2] == "D")
@ -285,7 +288,7 @@ class ModuleSASL : public Module
Version GetVersion() CXX11_OVERRIDE
{
return Version("Provides support for IRC Authentication Layer (aka: atheme SASL) via AUTHENTICATE.",VF_VENDOR);
return Version("Provides support for IRC Authentication Layer (aka: SASL) via AUTHENTICATE.", VF_VENDOR);
}
};

View File

@ -129,8 +129,8 @@ CmdResult CommandFJoin::Handle(User* srcuser, std::vector<std::string>& params)
time_t ourTS = chan->age;
if (TS != ourTS)
{
ServerInstance->SNO->WriteToSnoMask('d', "Merge FJOIN received for %s, ourTS: %lu, TS: %lu, difference: %lu",
chan->name.c_str(), (unsigned long)ourTS, (unsigned long)TS, (unsigned long)(ourTS - TS));
ServerInstance->SNO->WriteToSnoMask('d', "Merge FJOIN received for %s, ourTS: %lu, TS: %lu, difference: %ld",
chan->name.c_str(), (unsigned long)ourTS, (unsigned long)TS, (long)(ourTS - TS));
/* If our TS is less than theirs, we dont accept their modes */
if (ourTS < TS)
{

View File

@ -40,7 +40,7 @@ TreeServer::TreeServer()
, Socket(NULL), sid(ServerInstance->Config->GetSID()), behind_bursting(0), isdead(false)
, pingtimer(this)
, ServerUser(ServerInstance->FakeClient)
, age(ServerInstance->Time()), UserCount(ServerInstance->Users.GetLocalUsers().size())
, age(ServerInstance->Time()), UserCount(ServerInstance->Users.LocalUserCount())
, OperCount(0), rtt(0), StartBurst(0), Hidden(false)
{
AddHashEntry();

View File

@ -21,6 +21,7 @@
#include "inspircd.h"
#include "listmode.h"
/** Holds a timed ban
*/
@ -30,6 +31,7 @@ class TimedBan
std::string channel;
std::string mask;
time_t expire;
Channel* chan;
};
typedef std::vector<TimedBan> timedbans;
@ -39,8 +41,28 @@ timedbans TimedBanList;
*/
class CommandTban : public Command
{
ChanModeReference banmode;
bool IsBanSet(Channel* chan, const std::string& mask)
{
ListModeBase* banlm = static_cast<ListModeBase*>(*banmode);
const ListModeBase::ModeList* bans = banlm->GetList(chan);
if (bans)
{
for (ListModeBase::ModeList::const_iterator i = bans->begin(); i != bans->end(); ++i)
{
const ListModeBase::ListItem& ban = *i;
if (!strcasecmp(ban.mask.c_str(), mask.c_str()))
return true;
}
}
return false;
}
public:
CommandTban(Module* Creator) : Command(Creator,"TBAN", 3)
, banmode(Creator, "ban")
{
syntax = "<channel> <duration> <banmask>";
}
@ -75,6 +97,12 @@ class CommandTban : public Command
if (!isextban && !InspIRCd::IsValidMask(mask))
mask.append("!*@*");
if (IsBanSet(channel, mask))
{
user->WriteNotice("Ban already set");
return CMD_FAILURE;
}
Modes::ChangeList setban;
setban.push_add(ServerInstance->Modes->FindMode('b', MODETYPE_CHANNEL), mask);
// Pass the user (instead of ServerInstance->FakeClient) to ModeHandler::Process() to
@ -90,6 +118,7 @@ class CommandTban : public Command
T.channel = channelname;
T.mask = mask;
T.expire = expire + (IS_REMOTE(user) ? 5 : 0);
T.chan = channel;
TimedBanList.push_back(T);
// If halfop is loaded, send notice to halfops and above, otherwise send to ops and above
@ -134,6 +163,22 @@ class BanWatcher : public ModeWatcher
}
};
class ChannelMatcher
{
Channel* const chan;
public:
ChannelMatcher(Channel* ch)
: chan(ch)
{
}
bool operator()(const TimedBan& tb) const
{
return (tb.chan == chan);
}
};
class ModuleTimedBans : public Module
{
CommandTban cmd;
@ -179,6 +224,12 @@ class ModuleTimedBans : public Module
}
}
void OnChannelDelete(Channel* chan)
{
// Remove all timed bans affecting the channel from internal bookkeeping
TimedBanList.erase(std::remove_if(TimedBanList.begin(), TimedBanList.end(), ChannelMatcher(chan)), TimedBanList.end());
}
Version GetVersion() CXX11_OVERRIDE
{
return Version("Adds timed bans", VF_COMMON | VF_VENDOR);

View File

@ -95,7 +95,7 @@ SocketThread::SocketThread()
signal.sock = NULL;
int fd = eventfd(0, EFD_NONBLOCK);
if (fd < 0)
throw new CoreException("Could not create pipe " + std::string(strerror(errno)));
throw CoreException("Could not create pipe " + std::string(strerror(errno)));
signal.sock = new ThreadSignalSocket(this, fd);
}
#else
@ -148,7 +148,7 @@ SocketThread::SocketThread()
signal.sock = NULL;
int fds[2];
if (pipe(fds))
throw new CoreException("Could not create pipe " + std::string(strerror(errno)));
throw CoreException("Could not create pipe " + std::string(strerror(errno)));
signal.sock = new ThreadSignalSocket(this, fds[0], fds[1]);
}
#endif

View File

@ -93,7 +93,7 @@ void UserManager::AddUser(int socket, ListenSocket* via, irc::sockets::sockaddrs
this->clientlist[New->nick] = New;
New->registered = REG_NONE;
New->signon = ServerInstance->Time() + ServerInstance->Config->dns_timeout;
New->signon = ServerInstance->Time();
New->lastping = 1;
this->AddClone(New);
@ -254,6 +254,18 @@ void UserManager::RemoveCloneCounts(User *user)
}
}
void UserManager::RehashCloneCounts()
{
clonemap.clear();
const user_hash& hash = ServerInstance->Users.GetUsers();
for (user_hash::const_iterator i = hash.begin(); i != hash.end(); ++i)
{
User* u = i->second;
AddClone(u);
}
}
const UserManager::CloneCounts& UserManager::GetCloneCounts(User* user) const
{
CloneMap::const_iterator it = clonemap.find(user->GetCIDRMask());
@ -348,10 +360,15 @@ void UserManager::DoBackgroundUserStuff()
curr->FullConnect();
continue;
}
// If the user has been quit in OnCheckReady then we shouldn't
// quit them again for having a registration timeout.
if (curr->quitting)
continue;
break;
}
if (curr->registered != REG_ALL && (ServerInstance->Time() > (curr->age + curr->MyClass->GetRegTimeout())))
if (curr->registered != REG_ALL && curr->MyClass && (ServerInstance->Time() > (curr->signon + curr->MyClass->GetRegTimeout())))
{
/*
* registration timeout -- didnt send USER/NICK/HOST

View File

@ -22,7 +22,7 @@ BEGIN
VALUE "FileDescription", "InspIRCd"
VALUE "FileVersion", "@FULL_VERSION@"
VALUE "InternalName", "InspIRCd"
VALUE "LegalCopyright", "Copyright (c) 2014 InspIRCd Development Team"
VALUE "LegalCopyright", "Copyright (c) 2015 InspIRCd Development Team"
VALUE "OriginalFilename", "inspircd.exe"
VALUE "ProductName", "InspIRCd - Internet Relay Chat Daemon"
VALUE "ProductVersion", "@FULL_VERSION@"