diff --git a/docs/conf/aliases/anope.conf.example b/docs/conf/aliases/anope.conf.example index 406adc29a..4d1441473 100644 --- a/docs/conf/aliases/anope.conf.example +++ b/docs/conf/aliases/anope.conf.example @@ -6,9 +6,6 @@ -# Note: We can't have a shorthand version of this, it conflicts with HS for helpserv - - # Shorthand aliases for nickserv, chanserv, operserv, memoserv, hostserv, botserv @@ -17,11 +14,7 @@ - -# /id [channel] -# Identify for a channel or nickname - - - - - +# /id [account] +# Identify for a nickname + + diff --git a/docs/conf/helpop-full.conf.example b/docs/conf/helpop-full.conf.example index bd907cf69..353270c33 100644 --- a/docs/conf/helpop-full.conf.example +++ b/docs/conf/helpop-full.conf.example @@ -43,16 +43,16 @@ USER PASS PING PONG QUIT OPER"> - - - - +Duration is optional, and may be specified in seconds or in the +form of 1m2h3d4w5y."> - +private message you when you have usermode +g set."> - - - -Adds or deletes a user from the watch list. C clears the list -and S queries the status."> - - - Removes listmodes from a channel. E.g. /RMODE #Chan b m:* will remove all mute extbans."> - - - +/SILENCE without a parameter will list the masks that you have silenced."> - - - +Change your nickname to ."> - @@ -158,47 +171,51 @@ Quit from IRC and end your current session."> Returns the server's version information."> - - - - +Sends a message to a user or channel specified in ."> - +Sends a notice to a user or channel specified in ."> - - - - - - - - - - +, e.g. *chat* or bot*."> - - - - - - @@ -331,24 +348,24 @@ Shows a graphical representation of all users and servers on the network, and the links between them, as a tree from the perspective of your server."> - - - - @@ -379,14 +396,14 @@ CONNECT SQUIT RCONNECT RSQUIT DIE RESTART REHASH CLEARCACHE LOADMODULE UNLOADMODULE RELOADMODULE GLOADMODULE GUNLOADMODULE -GRELOADMODULE RELOAD CLOSE -LOCKSERV UNLOCKSERV JUMPSERVER"> +GRELOADMODULE CLOSE JUMPSERVER +LOCKSERV UNLOCKSERV"> - - Opens the server up again for new connections."> - - - - - Shows the time on all servers on the network."> - +The server matching will try to connect to the first +server in the config file matching ."> - +Causes a remote server matching to be disconnected from +the network."> - - Forces the user to part the channel(s)."> - - - + + + + - - - - - @@ -565,28 +589,28 @@ the result."> Displays the Oper MOTD."> - - - - - - - - Shows all currently available commands."> - - - - @@ -637,35 +661,35 @@ Disconnects the server matching the given server mask from this server."> Lists currently loaded modules, their memory offsets, version numbers, and flags. If you are not an operator, you will see reduced detail."> - - - - - - - - - - - - - - - - - - - @@ -787,7 +799,7 @@ When used, the victims won't see each other getting kicked or quitting."> having op modes removed from them (services only, requires servprotect module). o Marks as a IRC operator. - s [mask] Receives server notices specified by [mask] + s Receives server notices specified by (IRCop only). r Marks as a having a registered nickname (requires services account module). @@ -810,40 +822,40 @@ When used, the victims won't see each other getting kicked or quitting."> see themselves or themselves and the operators, while operators see all the users (requires auditorium module). - w [flag]:[banmask] Adds basic channel access controls of [flag] to - [banmask], via the +w listmode. + w : Adds basic channel access controls of to + , via the +w listmode. For example, +w o:R:Brain will op anyone identified to the account 'Brain' on join. (requires autoop module) @@ -880,16 +892,16 @@ When used, the victims won't see each other getting kicked or quitting."> E [~*][lines]:[sec]{[:difference]}{[:backlog]} Allows blocking of similiar messages. Kicks as default, blocks with ~ and bans with * The last two parameters are optional. - F [changes]:[sec] Blocks nick changes when they equal or exceed the + F : Blocks nick changes when they equal or exceed the specified rate (requires nickflood module). G Censors messages to the channel based on the network configuration (requires censor module). - J [seconds] Prevents rejoin after kick for the specified + J Prevents rejoin after kick for the specified number of seconds. This prevents auto-rejoin (requires kicknorejoin module). K Blocks /KNOCK on the channel. - L [channel] If the channel reaches its limit set by +l, - redirect users to [channel] (requires redirect + L If the channel reaches its limit set by +l, + redirect users to (requires redirect module). M Blocks unregistered users from speaking (requires services account module). @@ -906,13 +918,13 @@ When used, the victims won't see each other getting kicked or quitting."> R Blocks unregistered users from joining (requires services account module). S Strips mIRC color codes from messages to the - channel (requirs stripcolor module). + channel (requires stripcolor module). T Blocks /NOTICEs to the channel from users who are not at least halfop (requires nonotice module). - g [mask] Blocks messages matching the given blob mask + g Blocks messages matching the given glob mask (requires chanfilter module). - X [mode] Makes channel operators immune to the specified + X Makes channel operators immune to the specified restrictive mode (requires exemptchanops module). ------------- @@ -925,7 +937,7 @@ help channel if you have any questions."> # Stats Symbols # ###################### - +GRELOADMODULE CLOSE JUMPSERVER +LOCKSERV UNLOCKSERV"> commonchans module). d Deaf mode. User will not receive any messages or notices from channels they are in (requires deaf module). - g In combination with /allow, provides for server side + g In combination with /ACCEPT, provides for server side ignore (requires callerid module). h Marks as 'available for help' in WHOIS (IRCop only, requires helpop module). @@ -89,7 +89,7 @@ LOCKSERV UNLOCKSERV JUMPSERVER"> having op modes removed from them (services only, requires servprotect module). o Marks as a IRC operator. - s [mask] Receives server notices specified by [mask] + s Receives server notices specified by (IRCop only). r Marks as a having a registered nickname (requires services account module). @@ -112,48 +112,49 @@ LOCKSERV UNLOCKSERV JUMPSERVER"> see themselves or themselves and the operators, while operators see all the users (requires auditorium module). - w [flag]:[banmask] Adds basic channel access controls of [flag] to - [banmask], via the +w listmode. + w : Adds basic channel access controls of to + , via the +w listmode. For example, +w o:R:Brain will op anyone identified to the account 'Brain' on join. (requires autoop module) @@ -181,16 +182,16 @@ LOCKSERV UNLOCKSERV JUMPSERVER"> E [~*][lines]:[sec]{[:difference]}{[:backlog]} Allows blocking of similiar messages. Kicks as default, blocks with ~ and bans with * The last two parameters are optional. - F [changes]:[sec] Blocks nick changes when they equal or exceed the + F : Blocks nick changes when they equal or exceed the specified rate (requires nickflood module). G Censors messages to the channel based on the network configuration (requires censor module). - J [seconds] Prevents rejoin after kick for the specified + J Prevents rejoin after kick for the specified number of seconds. This prevents auto-rejoin (requires kicknorejoin module). K Blocks /KNOCK on the channel. - L [channel] If the channel reaches its limit set by +l, - redirect users to [channel] (requires redirect + L If the channel reaches its limit set by +l, + redirect users to (requires redirect module). M Blocks unregistered users from speaking (requires services account module). @@ -207,10 +208,15 @@ LOCKSERV UNLOCKSERV JUMPSERVER"> R Blocks unregistered users from joining (requires services account module). S Strips mIRC color codes from messages to the - channel (requirs stripcolor module). + channel (requires stripcolor module). T Blocks /NOTICEs to the channel from users who are not at least halfop (requires nonotice module). + g Blocks messages matching the given glob mask + (requires chanfilter module). + X Makes channel operators immune to the specified + restrictive mode (requires exemptchanops module). + ------------- NOTE: A large number of these modes are dependent upon server-side modules being loaded by a server/network administrator. The actual modes available @@ -253,50 +259,64 @@ help channel if you have any questions."> + j: Matches anyone in the given channel. Does not support + wildcards (requires channelban module). + r: Matches users with a matching realname (requires gecosban + module). + s: Matches users on a matching server (requires serverban + module). + z: Matches users having the given SSL certificate + fingerprint (requires sslmodes module). + O: Matches IRCops of a matching type, mostly useful as an + an invite exception (requires operchans module). + R: Matches users logged into a matching account (requires + services account module). + +Acting extbans: + + c: Blocks any messages that contain color codes from + matching users (requires blockcolor module). + m: Blocks messages from matching users (requires muteban + module). Users with +v or above are not affected. + p: Blocks part messages from matching users (requires + nopartmsg module). + A: Blocks invites by matching users even when +A is set + (requires allowinvite module). + B: Blocks all capital or nearly all capital messages from + matching users (requires blockcaps module). + C: Blocks CTCPs from matching users (requires noctcp + module). + M: Blocks messages from users logged into a matching + account (requires services account module). + N: Blocks nick changes from matching users (requires + nonicks module). + Q: Blocks kicks by matching users (requires nokicks + module). + S: Strips color/bold/underline from messages from matching + users (requires stripcolor module). + T: Blocks notices from matching users (requires nonotice + module). + U: Blocks unregistered users matching the given banmask. + (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. + +There is an additional special type of extended ban, a redirect ban: + + Redirect n!u@h#channel will redirect the banned user to #channel + when they try to join (requires banredirect module)."> diff --git a/docs/conf/inspircd.conf.example b/docs/conf/inspircd.conf.example index 6ef9c9d11..254e6a355 100644 --- a/docs/conf/inspircd.conf.example +++ b/docs/conf/inspircd.conf.example @@ -14,7 +14,7 @@ # |___/ # # # ##################################||#################################### - #||# + #||# ##################################||#################################### # # # This is an example of the config file for InspIRCd. # @@ -152,10 +152,10 @@ # to this bind section. type="clients" - # ssl: If you want this bind section to use SSL, define either - # gnutls or openssl here. The appropriate SSL modules must be loaded - # for ssl to work. If you do not want this bind section to support ssl, - # just remove or comment out this option. + # ssl: If you want the port(s) in this bind tag to use SSL, set this + # to either "gnutls" or "openssl". The appropriate SSL module must be + # loaded for SSL to work. If you do not want the port(s) in this bind + # tag to support SSL, just remove or comment out this option. ssl="gnutls" # defer: When this is non-zero, connections will not be handed over to @@ -175,8 +175,8 @@ # When linking servers, the OpenSSL and GnuTLS implementations are completely # link-compatible and can be used alongside each other # on each end of the link without any significant issues. -# Supported ssl types are: "openssl" and "gnutls". -# You must load, m_ssl_openssl for OpenSSL or m_ssl_gnutls for GnuTLS. +# Supported SSL types are: "openssl" and "gnutls". +# You must load m_ssl_openssl for OpenSSL or m_ssl_gnutls for GnuTLS. @@ -462,7 +462,7 @@ # server: DNS server to use to attempt to resolve IP's to hostnames. # in most cases, you won't need to change this, as inspircd will # automatically detect the nameserver depending on /etc/resolv.conf - # (or, on windows, your set nameservers in the registry.) + # (or, on Windows, your set nameservers in the registry.) # Note that this must be an IP address and not a hostname, because # there is no resolver to resolve the name until this is defined! # @@ -630,7 +630,7 @@ # somaxconn: The maximum number of connections that may be waiting # in the accept queue. This is *NOT* the total maximum number of # connections per server. Some systems may only allow this to be up - # to 5, while others (such as linux and *BSD) default to 128. + # to 5, while others (such as Linux and *BSD) default to 128. # Setting this above the limit imposed by your OS can have undesired # effects. somaxconn="128" diff --git a/docs/conf/links.conf.example b/docs/conf/links.conf.example index 7f27affb9..13754edbd 100644 --- a/docs/conf/links.conf.example +++ b/docs/conf/links.conf.example @@ -55,11 +55,11 @@ bind="1.2.3.4" # statshidden: Defines if IP is shown to opers when - # /stats c is invoked. + # /STATS c is invoked. statshidden="no" # hidden: If this is set to yes, this server and its "child" - # servers will not be shown when users do a /map or /links + # servers will not be shown when users do a /MAP or /LINKS. hidden="no" # passwords: the passwords we send and receive. diff --git a/docs/conf/modules.conf.example b/docs/conf/modules.conf.example index d36c0beaa..d60c9ec06 100644 --- a/docs/conf/modules.conf.example +++ b/docs/conf/modules.conf.example @@ -243,7 +243,7 @@ # #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# -# Block CAPS module: Blocking all-CAPS messages with channel mode +B. +# Block CAPS module: Adds channel mode +B, blocks all-CAPS messages. # # #-#-#-#-#-#-#-#-#-#-#- BLOCKCAPS CONFIGURATION -#-#-#-#-#-#-#-#-#-#-# @@ -254,10 +254,10 @@ # minlen - The minimum length a line must be for the block # # percent to have any effect. # # # -# capsmap - A list of chars to be considered CAPS, this was # -# you can add CAPS for your language. Also you can # -# add things like ! and space to further lock down # -# on caps usage. # +# capsmap - A list of chars to be considered CAPS. Can be used # +# to add CAPS characters for your language. Also you # +# can add things like ! and space to further lock # +# down on caps usage. # # @@ -273,12 +273,12 @@ #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# # CallerID module: Adds usermode +g which activates hybrid-style -# callerid: block all private messages unless you /accept first +# callerid: block all private messages unless you /ACCEPT first. # # #-#-#-#-#-#-#-#-#-#-#- CALLERID CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#-# # maxaccepts - Maximum number of entries a user can add to his # -# /accept list. Default is 16 entries. # +# /ACCEPT list. Default is 16 entries. # # operoverride - Can opers (note: ALL opers) override callerid? # # Default is no. # # tracknick - Preserve /accept entries when a user changes nick? # @@ -299,7 +299,7 @@ #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# # CBAN module: Lets you disallow channels from being used at runtime. -# This module is oper-only and provides /cban. +# This module is oper-only and provides /CBAN. # To use, CBAN must be in one of your oper class blocks. # @@ -449,7 +449,7 @@ # #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# -# CHGNAME module: Adds the /CHGNAME command +# CHGNAME module: Adds the /CHGNAME command. # This module is oper-only. # To use, CHGNAME must be in one of your oper class blocks. # @@ -462,8 +462,9 @@ #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# # Cloaking module: Adds usermode +x and cloaking support. # Relies on the module m_md5.so being loaded. -# To use, you should enable m_conn_umodes and add +x as -# an enabled mode. See the m_conn_umodes module for more information. +# To cloak users when they connect, load m_conn_umodes and set +# to include the +x mode. The example tag +# shows this. See the m_conn_umodes module for more information. # # #-#-#-#-#-#-#-#-#-#-#- CLOAKING CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#-# @@ -725,11 +726,13 @@ # # # Valid engines are: # # # -# glob - Glob patterns, provided via m_regex_glob.so # -# pcre - PCRE regexps, provided via m_regex_pcre.so, needs libpcre # -# tre - TRE regexps, provided via m_regex_tre.so, requires libtre # -# posix - POSIX regexps, provided via m_regex_posix.so, not availale # -# on windows, no dependencies on other operating systems. # +# glob - Glob patterns, provided via m_regex_glob. # +# pcre - PCRE regexps, provided via m_regex_pcre, needs libpcre. # +# tre - TRE regexps, provided via m_regex_tre, requires libtre. # +# posix - POSIX regexps, provided via m_regex_posix, not available # +# on Windows, no dependencies on other operating systems. # +# stdlib - stdlib regexps, provided via m_regex_stdlib, see comment # +# at the tag for info on availability. # # # # # # # @@ -791,8 +794,8 @@ #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# # Global load module: Allows loading and unloading of modules network- # wide (USE WITH EXTREME CAUTION!) -# This module is oper-only and provides /gloadmodule, /gunloadmodule -# and /greloadmodule. +# This module is oper-only and provides /GLOADMODULE, /GUNLOADMODULE +# and /GRELOADMODULE. # To use, GLOADMODULE, GUNLOADMODULE and GRELOADMODULE # must be in one of your oper class blocks. # @@ -1144,7 +1147,7 @@ #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# # Nicklock module: Let opers change a user's nick and then stop that -# user from changing their nick again. +# user from changing their nick again until unlocked. # This module is oper-only. # To use, NICKLOCK and NICKUNLOCK must be in one of your oper class blocks. # @@ -1231,8 +1234,13 @@ # #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# -# Oper prefixing module: Gives server operators a prefix status -# character on all channels they are in. +# Oper prefixing module: Adds a channel prefix mode +y which is given +# to all IRC operators automatically on all channels they are in. +# This prefix mode is more powerful than channel op and other regular +# prefix modes. +# +# Load this module if you want all your IRC operators to have channel +# operator powers. # # # You may additionally customise the prefix character. @@ -1439,7 +1447,7 @@ #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# # Regular expression provider for TRE regular expressions. # This is the same regular expression engine used by UnrealIRCd, so -# if you are most familiar with the syntax of /spamfilter from there, +# if you are most familiar with the syntax of /SPAMFILTER from there, # this is the provider you want. You need libtre installed in order # to compile and load this module. # @@ -1643,7 +1651,7 @@ # Sethost module: Adds the /SETHOST command. # This module is oper-only. # To use, SETHOST must be in one of your oper class blocks. -# See m_chghost for how to customise valid chars for hostnames +# See m_chghost for how to customise valid chars for hostnames. # #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# diff --git a/docs/conf/modules/charybdis.conf.example b/docs/conf/modules/charybdis.conf.example index 35f55e074..4143a378f 100644 --- a/docs/conf/modules/charybdis.conf.example +++ b/docs/conf/modules/charybdis.conf.example @@ -164,7 +164,7 @@ # quitmsg="Throttled" bootwait="10"> - + @@ -246,8 +246,8 @@ #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# -# SSL channel mode module: Adds support for SSL-only channels via -# channel mode +z and the 'z' extban which matches SSL client +# SSL channel mode module: Adds support for SSL-only channels via +# channel mode +z and the 'z' extban which matches SSL client # certificate fingerprints. # Does not do anything useful without a working SSL module (see below). # @@ -268,7 +268,7 @@ # SSL Info module: Allows users to retrieve information about other # user's peer SSL certificates and keys. This can be used by client # scripts to validate users. For this to work, one of m_ssl_gnutls.so -# or m_ssl_openssl.so must be loaded. This module also adds the +# or m_ssl_openssl.so must be loaded. This module also adds the # "* is using a secure connection" whois line, the ability for # opers to use SSL cert fingerprints to verify their identity and the # ability to force opers to use SSL connections in order to oper up. diff --git a/docs/conf/modules/unrealircd.conf.example b/docs/conf/modules/unrealircd.conf.example index 1ed7b33b2..ec3a5f8d1 100644 --- a/docs/conf/modules/unrealircd.conf.example +++ b/docs/conf/modules/unrealircd.conf.example @@ -181,13 +181,15 @@ # # # Valid engines are: # # # -# glob - Glob patterns, provided via m_regex_glob.so # -# pcre - PCRE regexps, provided via m_regex_pcre.so, needs libpcre # -# tre - TRE regexps, provided via m_regex_tre.so, requires libtre # -# posix - POSIX regexps, provided via m_regex_posix.so, not availale # -# on windows, no dependencies on other operating systems. # +# glob - Glob patterns, provided via m_regex_glob. # +# pcre - PCRE regexps, provided via m_regex_pcre, needs libpcre. # +# tre - TRE regexps, provided via m_regex_tre, requires libtre. # +# posix - POSIX regexps, provided via m_regex_posix, not available # +# on Windows, no dependencies on other operating systems. # +# stdlib - stdlib regexps, provided via m_regex_stdlib, see comment # +# at the tag for info on availability. # # # - + # # # Your choice of regex engine must match on all servers network-wide. # @@ -355,7 +357,7 @@ # GnuTLS SSL module: Adds support for SSL connections using GnuTLS, # if enabled. You must answer 'yes' in ./configure when asked or symlink # the source for this module from the directory src/modules/extra, if -# you want to enable this, or it will not load. +# you want to enable this, or it will not load. # # #-#-#-#-#-#-#-#-#-#-#- GNUTLS CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#-# diff --git a/docs/conf/motd.txt.example b/docs/conf/motd.txt.example index 66fddd344..04f7b11b2 100644 --- a/docs/conf/motd.txt.example +++ b/docs/conf/motd.txt.example @@ -10,11 +10,11 @@ Putting the ricer in IRCer since 2007 - //\ + //\ V \ WELCOME TO AN INSPIRCD NETWORK \ \_ If you see this, I am probably new. \,'.`-. If I'm not new, my owner is lazy. - |\ `. `. + |\ `. `. ( \ `. `-. _,.-:\ \ \ `. `-._ __..--' ,-';/ \ `. `-. `-..___..---' _.--' ,'/ @@ -23,7 +23,7 @@ `-_ `-.___ __,--' ,' `-.__ `----""" __.-' `--..____..--' - + ---- To change, see motd.txt.example ----- / \ / * Web: http://www.inspircd.org \ diff --git a/docs/conf/opermotd.txt.example b/docs/conf/opermotd.txt.example index 110cba8e4..0ac4cfea1 100644 --- a/docs/conf/opermotd.txt.example +++ b/docs/conf/opermotd.txt.example @@ -10,11 +10,11 @@ Putting the ricer in IRCer since 2007 - //\ + //\ V \ WELCOME TO AN INSPIRCD NETWORK \ \_ If you see this, I am probably new. \,'.`-. If I'm not new, my owner is lazy. - |\ `. `. + |\ `. `. ( \ `. `-. _,.-:\ \ \ `. `-._ __..--' ,-';/ \ `. `-. `-..___..---' _.--' ,'/ @@ -23,7 +23,7 @@ `-_ `-.___ __,--' ,' `-.__ `----""" __.-' `--..____..--' - + -- To change, see opermotd.txt.example --- / \ / * Web: http://www.inspircd.org \ diff --git a/include/caller.h b/include/caller.h index c3a29e8c2..47f896ef6 100644 --- a/include/caller.h +++ b/include/caller.h @@ -189,7 +189,7 @@ template class CoreExport caller +template class caller { public: HandlerType* target; @@ -201,118 +201,118 @@ template class CoreExport caller virtual ~caller() { } }; -template class CoreExport caller0 : public caller< HandlerBase0 > +template class caller0 : public caller< HandlerBase0 > { public: caller0(HandlerBase0* initial) : caller< HandlerBase0 >::caller(initial) { } - virtual ReturnType operator() () + ReturnType operator() () { return this->target->Call(); } }; -template class CoreExport caller1 : public caller< HandlerBase1 > +template class caller1 : public caller< HandlerBase1 > { public: caller1(HandlerBase1* initial) : caller< HandlerBase1 >(initial) { } - virtual ReturnType operator() (Param1 param1) + ReturnType operator() (Param1 param1) { return this->target->Call(param1); } }; -template class CoreExport caller2 : public caller< HandlerBase2 > +template class caller2 : public caller< HandlerBase2 > { public: caller2(HandlerBase2* initial) : caller< HandlerBase2 >(initial) { } - virtual ReturnType operator() (Param1 param1, Param2 param2) + ReturnType operator() (Param1 param1, Param2 param2) { return this->target->Call(param1, param2); } }; -template class CoreExport caller3 : public caller< HandlerBase3 > +template class caller3 : public caller< HandlerBase3 > { public: caller3(HandlerBase3* initial) : caller< HandlerBase3 >(initial) { } - virtual ReturnType operator() (Param1 param1, Param2 param2, Param3 param3) + ReturnType operator() (Param1 param1, Param2 param2, Param3 param3) { return this->target->Call(param1, param2, param3); } }; -template class CoreExport caller4 : public caller< HandlerBase4 > +template class caller4 : public caller< HandlerBase4 > { public: caller4(HandlerBase4* initial) : caller< HandlerBase4 >(initial) { } - virtual ReturnType operator() (Param1 param1, Param2 param2, Param3 param3, Param4 param4) + ReturnType operator() (Param1 param1, Param2 param2, Param3 param3, Param4 param4) { return this->target->Call(param1, param2, param3, param4); } }; -template class CoreExport caller5 : public caller< HandlerBase5 > +template class caller5 : public caller< HandlerBase5 > { public: caller5(HandlerBase5* initial) : caller< HandlerBase5 >(initial) { } - virtual ReturnType operator() (Param1 param1, Param2 param2, Param3 param3, Param4 param4, Param5 param5) + ReturnType operator() (Param1 param1, Param2 param2, Param3 param3, Param4 param4, Param5 param5) { return this->target->Call(param1, param2, param3, param4, param5); } }; -template class CoreExport caller6 : public caller< HandlerBase6 > +template class caller6 : public caller< HandlerBase6 > { public: caller6(HandlerBase6* initial) : caller< HandlerBase6 >(initial) { } - virtual ReturnType operator() (Param1 param1, Param2 param2, Param3 param3, Param4 param4, Param5 param5, Param6 param6) + ReturnType operator() (Param1 param1, Param2 param2, Param3 param3, Param4 param4, Param5 param5, Param6 param6) { return this->target->Call(param1, param2, param3, param4, param5, param6); } }; -template class CoreExport caller7 : public caller< HandlerBase7 > +template class caller7 : public caller< HandlerBase7 > { public: caller7(HandlerBase7* initial) : caller< HandlerBase7 >(initial) { } - virtual ReturnType operator() (Param1 param1, Param2 param2, Param3 param3, Param4 param4, Param5 param5, Param6 param6, Param7 param7) + ReturnType operator() (Param1 param1, Param2 param2, Param3 param3, Param4 param4, Param5 param5, Param6 param6, Param7 param7) { return this->target->Call(param1, param2, param3, param4, param5, param6, param7); } }; -template class CoreExport caller8 : public caller< HandlerBase8 > +template class caller8 : public caller< HandlerBase8 > { public: caller8(HandlerBase8* initial) : caller< HandlerBase8 >(initial) { } - virtual ReturnType operator() (Param1 param1, Param2 param2, Param3 param3, Param4 param4, Param5 param5, Param6 param6, Param7 param7, Param8 param8) + ReturnType operator() (Param1 param1, Param2 param2, Param3 param3, Param4 param4, Param5 param5, Param6 param6, Param7 param7, Param8 param8) { return this->target->Call(param1, param2, param3, param4, param5, param6, param7, param8); } diff --git a/make/template/org.inspircd.plist b/make/template/org.inspircd.plist index ef5ef199b..4bcb3e7c3 100644 --- a/make/template/org.inspircd.plist +++ b/make/template/org.inspircd.plist @@ -5,14 +5,14 @@ Iterations 3 + KeepAlive + Label org.inspircd LowPriorityIO Nice 1 - OnDemand - Program @BINARY_DIR@/inspircd ProgramArguments diff --git a/make/utilities.pm b/make/utilities.pm index 404243966..7db557d11 100644 --- a/make/utilities.pm +++ b/make/utilities.pm @@ -162,6 +162,7 @@ sub promptstring($$$$$) sub make_rpath($;$) { my ($executable, $module) = @_; + return "" if defined $ENV{DISABLE_RPATH}; chomp(my $data = `$executable`); my $output = ""; while ($data =~ /-L(\S+)/) @@ -169,10 +170,10 @@ sub make_rpath($;$) my $libpath = $1; if (!exists $already_added{$libpath}) { - print "Adding extra library path to \e[1;32m$module\e[0m ... \e[1;32m$libpath\e[0m\n"; + print "Adding runtime library path to \e[1;32m$module\e[0m ... \e[1;32m$libpath\e[0m\n"; $already_added{$libpath} = 1; } - $output .= "-Wl,-rpath -Wl,$libpath -L$libpath " unless defined $main::opt_disablerpath; + $output .= "-Wl,-rpath -Wl,$libpath -L$libpath "; $data =~ s/-L(\S+)//; } return $output; @@ -458,6 +459,7 @@ sub translate_functions($$) close TF; my $replace = `perl $tmpfile`; chomp($replace); + unlink($tmpfile); $line =~ s/eval\("(.+?)"\)/$replace/; } while ($line =~ /pkgconflibs\("(.+?)","(.+?)","(.+?)"\)/) @@ -503,7 +505,7 @@ sub translate_functions($$) print "\nMake sure you have pkg-config installed\n"; print "\nIn the case of gnutls configuration errors on debian,\n"; print "Ubuntu, etc, you should ensure that you have installed\n"; - print "gnutls-bin as well as gnutls-dev and gnutls.\n"; + print "gnutls-bin as well as libgnutls-dev and libgnutls.\n"; exit; } else diff --git a/src/cidr.cpp b/src/cidr.cpp index 875b95304..8d199353d 100644 --- a/src/cidr.cpp +++ b/src/cidr.cpp @@ -66,7 +66,7 @@ bool irc::sockets::MatchCIDR(const std::string &address, const std::string &cidr const std::string::size_type per_pos = cidr_copy.rfind('/'); if ((per_pos == std::string::npos) || (per_pos == cidr_copy.length()-1) || (cidr_copy.find_first_not_of("0123456789", per_pos+1) != std::string::npos) - || (cidr_copy.find_first_not_of("0123456789abcdef.:") < per_pos)) + || (cidr_copy.find_first_not_of("0123456789abcdefABCDEF.:") < per_pos)) { // The CIDR mask is invalid return false; diff --git a/src/coremods/core_stats.cpp b/src/coremods/core_stats.cpp index 1192b1be9..997dd3afe 100644 --- a/src/coremods/core_stats.cpp +++ b/src/coremods/core_stats.cpp @@ -335,7 +335,7 @@ void CommandStats::DoStats(char statschar, User* user, string_list &results) tag->init(); std::string umodes; std::string cmodes; - for(char c='A'; c < 'z'; c++) + for(char c='A'; c <= 'z'; c++) { ModeHandler* mh = ServerInstance->Modes->FindMode(c, MODETYPE_USER); if (mh && mh->NeedsOper() && tag->AllowedUserModes[c - 'A']) diff --git a/src/coremods/core_stub.cpp b/src/coremods/core_stub.cpp index 30c7ce752..bb6590261 100644 --- a/src/coremods/core_stub.cpp +++ b/src/coremods/core_stub.cpp @@ -33,7 +33,7 @@ class CommandConnect : public Command : Command(parent, "CONNECT", 1) { flags_needed = 'o'; - syntax = " []"; + syntax = ""; } /** Handle command. @@ -119,7 +119,7 @@ class CommandSquit : public Command : Command(parent, "SQUIT", 1, 2) { flags_needed = 'o'; - syntax = " []"; + syntax = ""; } /** Handle command. diff --git a/src/coremods/core_userhost.cpp b/src/coremods/core_userhost.cpp index 1b34addb5..a67824194 100644 --- a/src/coremods/core_userhost.cpp +++ b/src/coremods/core_userhost.cpp @@ -28,7 +28,7 @@ class CommandUserhost : public Command /** Constructor for userhost. */ CommandUserhost ( Module* parent) : Command(parent,"USERHOST", 1, 5) { - syntax = " {}"; + syntax = " [ ...]"; } /** Handle command. * @param parameters The parameters to the command diff --git a/src/dynamic.cpp b/src/dynamic.cpp index 2fb5211fb..9984f4dbe 100644 --- a/src/dynamic.cpp +++ b/src/dynamic.cpp @@ -97,9 +97,15 @@ std::string DLLManager::GetVersion() #ifdef _WIN32 void DLLManager::RetrieveLastError() { - CHAR errmsg[100]; - FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, 0, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), errmsg, 100, 0); + char errmsg[500]; + DWORD dwErrorCode = GetLastError(); + if (FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, dwErrorCode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPSTR)errmsg, _countof(errmsg), NULL) == 0) + sprintf_s(errmsg, _countof(errmsg), "Error code: %u", dwErrorCode); SetLastError(ERROR_SUCCESS); err = errmsg; + + std::string::size_type p; + while ((p = err.find_last_of("\r\n")) != std::string::npos) + err.erase(p, 1); } #endif diff --git a/src/modules.cpp b/src/modules.cpp index 9a61a7226..42a9e8010 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -515,7 +515,7 @@ void ModuleManager::Reload(Module* mod, HandlerBase1* callback) { if (CanUnload(mod)) ServerInstance->AtomicActions.AddAction(new ReloadAction(mod, callback)); - else + else if (callback) callback->Call(false); } diff --git a/src/modules/extra/m_ldap.cpp b/src/modules/extra/m_ldap.cpp index 4666a86a2..9f8d68427 100644 --- a/src/modules/extra/m_ldap.cpp +++ b/src/modules/extra/m_ldap.cpp @@ -23,8 +23,8 @@ #include #ifdef _WIN32 -# pragma comment(lib, "ldap.lib") -# pragma comment(lib, "lber.lib") +# pragma comment(lib, "libldap.lib") +# pragma comment(lib, "liblber.lib") #endif /* $LinkerFlags: -lldap */ diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp index fd1a83112..1002a98ba 100644 --- a/src/modules/extra/m_mysql.cpp +++ b/src/modules/extra/m_mysql.cpp @@ -28,9 +28,7 @@ #include "modules/sql.h" #ifdef _WIN32 -# pragma comment(lib, "mysqlclient.lib") -# pragma comment(lib, "advapi32.lib") -# pragma comment(linker, "/NODEFAULTLIB:LIBCMT") +# pragma comment(lib, "libmysql.lib") #endif /* VERSION 3 API: With nonblocking (threaded) requests */ diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index 718bdd1ea..e6efb9771 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -47,14 +47,7 @@ #endif #ifdef _WIN32 -# pragma comment(lib, "libgnutls.lib") -# pragma comment(lib, "libgcrypt.lib") -# pragma comment(lib, "libgpg-error.lib") -# pragma comment(lib, "user32.lib") -# pragma comment(lib, "advapi32.lib") -# pragma comment(lib, "libgcc.lib") -# pragma comment(lib, "libmingwex.lib") -# pragma comment(lib, "gdi32.lib") +# pragma comment(lib, "libgnutls-28.lib") #endif /* $CompileFlags: pkgconfincludes("gnutls","/gnutls/gnutls.h","") eval("print `libgcrypt-config --cflags | tr -d \r` if `pkg-config --modversion gnutls 2>/dev/null | tr -d \r` lt '2.12'") */ @@ -693,11 +686,23 @@ class GnuTLSIOHook : public SSLIOHook goto info_done_dealloc; } - gnutls_x509_crt_get_dn(cert, str, &name_size); - certinfo->dn = str; + if (gnutls_x509_crt_get_dn(cert, str, &name_size) == 0) + { + std::string& dn = certinfo->dn; + dn = str; + // Make sure there are no chars in the string that we consider invalid + if (dn.find_first_of("\r\n") != std::string::npos) + dn.clear(); + } - gnutls_x509_crt_get_issuer_dn(cert, str, &name_size); - certinfo->issuer = str; + name_size = sizeof(str); + if (gnutls_x509_crt_get_issuer_dn(cert, str, &name_size) == 0) + { + std::string& issuer = certinfo->issuer; + issuer = str; + if (issuer.find_first_of("\r\n") != std::string::npos) + issuer.clear(); + } if ((ret = gnutls_x509_crt_get_fingerprint(cert, profile->GetHash(), digest, &digest_size)) < 0) { diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index 9101ecd55..afead64d8 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -35,13 +35,8 @@ #include #ifdef _WIN32 -# pragma comment(lib, "libcrypto.lib") -# pragma comment(lib, "libssl.lib") -# pragma comment(lib, "user32.lib") -# pragma comment(lib, "advapi32.lib") -# pragma comment(lib, "libgcc.lib") -# pragma comment(lib, "libmingwex.lib") -# pragma comment(lib, "gdi32.lib") +# pragma comment(lib, "ssleay32.lib") +# pragma comment(lib, "libeay32.lib") #endif /* $CompileFlags: pkgconfversion("openssl","0.9.7") pkgconfincludes("openssl","/openssl/ssl.h","") */ @@ -74,12 +69,21 @@ namespace OpenSSL public: DHParams(const std::string& filename) { +#ifdef _WIN32 + BIO* dhpfile = BIO_new_file(filename.c_str(), "r"); +#else FILE* dhpfile = fopen(filename.c_str(), "r"); +#endif if (dhpfile == NULL) throw Exception("Couldn't open DH file " + filename + ": " + strerror(errno)); +#ifdef _WIN32 + dh = PEM_read_bio_DHparams(dhpfile, NULL, NULL, NULL); + BIO_free(dhpfile); +#else dh = PEM_read_DHparams(dhpfile, NULL, NULL, NULL); fclose(dhpfile); +#endif if (!dh) throw Exception("Couldn't read DH params from file " + filename); } @@ -357,8 +361,14 @@ class OpenSSLIOHook : public SSLIOHook char buf[512]; X509_NAME_oneline(X509_get_subject_name(cert), buf, sizeof(buf)); certinfo->dn = buf; + // Make sure there are no chars in the string that we consider invalid + if (certinfo->dn.find_first_of("\r\n") != std::string::npos) + certinfo->dn.clear(); + X509_NAME_oneline(X509_get_issuer_name(cert), buf, sizeof(buf)); certinfo->issuer = buf; + if (certinfo->issuer.find_first_of("\r\n") != std::string::npos) + certinfo->issuer.clear(); if (!X509_digest(cert, profile->GetDigest(), md, &n)) { diff --git a/src/modules/m_callerid.cpp b/src/modules/m_callerid.cpp index 6f2c67300..f15760dca 100644 --- a/src/modules/m_callerid.cpp +++ b/src/modules/m_callerid.cpp @@ -183,7 +183,7 @@ public: extInfo(Creator) { allow_empty_last_param = false; - syntax = "{[+|-]}|*}"; + syntax = "*|(+|-)[,(+|-) ...]"; TRANSLATE1(TR_CUSTOM); } diff --git a/src/modules/m_cgiirc.cpp b/src/modules/m_cgiirc.cpp index 23dc90ef8..791045780 100644 --- a/src/modules/m_cgiirc.cpp +++ b/src/modules/m_cgiirc.cpp @@ -104,6 +104,7 @@ class CommandWebirc : public Command ChangeIP(user, parameters[3]); // And follow this up by changing their host user->host = user->dhost = newhost; + user->InvalidateCache(); return CMD_SUCCESS; } diff --git a/src/modules/m_check.cpp b/src/modules/m_check.cpp index cbdb1d528..92f003a84 100644 --- a/src/modules/m_check.cpp +++ b/src/modules/m_check.cpp @@ -149,7 +149,7 @@ class CommandCheck : public Command { std::string umodes; std::string cmodes; - for(char c='A'; c < 'z'; c++) + for(char c='A'; c <= 'z'; c++) { ModeHandler* mh = ServerInstance->Modes->FindMode(c, MODETYPE_USER); if (mh && mh->NeedsOper() && loctarg->HasModePermission(c, MODETYPE_USER)) diff --git a/src/modules/m_chghost.cpp b/src/modules/m_chghost.cpp index 3a637f9d0..43b2a323b 100644 --- a/src/modules/m_chghost.cpp +++ b/src/modules/m_chghost.cpp @@ -56,7 +56,8 @@ class CommandChghost : public Command User* dest = ServerInstance->FindNick(parameters[0]); - if ((!dest) || (dest->registered != REG_ALL)) + // Allow services to change the host of unregistered users + if ((!dest) || ((dest->registered != REG_ALL) && (!user->server->IsULine()))) { user->WriteNumeric(ERR_NOSUCHNICK, "%s :No such nick/channel", parameters[0].c_str()); return CMD_FAILURE; diff --git a/src/modules/m_dccallow.cpp b/src/modules/m_dccallow.cpp index 7332402ba..cc7fbd323 100644 --- a/src/modules/m_dccallow.cpp +++ b/src/modules/m_dccallow.cpp @@ -62,7 +62,7 @@ class CommandDccallow : public Command : Command(parent, "DCCALLOW", 0) , ext(Ext) { - syntax = "{[+|-]