From: Peter Powell Date: Sat, 21 Apr 2018 11:04:43 +0000 (+0100) Subject: Merge tag 'v2.0.26' into master. X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=35b70631f0532a5828b04a8e0c02092a285f331a;hp=46e71e2f509eb38166fafcc69931117f0f9b7798;p=user%2Fhenk%2Fcode%2Finspircd.git Merge tag 'v2.0.26' into master. --- diff --git a/docs/conf/helpop-full.conf.example b/docs/conf/helpop-full.conf.example index aa63b6ebb..20e03d64a 100644 --- a/docs/conf/helpop-full.conf.example +++ b/docs/conf/helpop-full.conf.example @@ -2,6 +2,8 @@ # Helpop Standard # ##################### + + Returns the ip and nickname of the given users."> - +(by IP address or by hostname). Mask should be given as either a +nick!user@host or user@IP (wildcards acceptable)."> ---------- c Blocks private messages and notices from users who do - not share a common channel with you (requires + not share a common channel with you (requires the commonchans module). d Deaf mode. User will not receive any messages or notices - from channels they are in (requires deaf module). + from channels they are in (requires the deaf module). g In combination with /ACCEPT, provides for server side - ignore (requires callerid module). + ignore (requires the callerid module). h Marks as 'available for help' in WHOIS (IRCop only, - requires helpop module). + requires the helpop module). i Makes invisible to /WHO if the user using /WHO is not in a common channel. k Prevents the user from being kicked from channels, or having op modes removed from them (services only, - requires servprotect module). + requires the servprotect module). o Marks as a IRC operator. s Receives server notices specified by (IRCop only). r Marks as a having a registered nickname - (requires services account module). + (requires the services account module). w Receives wallops messages. - x Gives a cloaked hostname (requires cloaking module). - z Only allow private messages from SSL users (requires + x Gives a cloaked hostname (requires the cloaking module). + z Only allow private messages from SSL users (requires the sslmode module). - B Marks as a bot (requires botmode module). + B Marks as a bot (requires the botmode module). G Censors messages sent to the user based on filters - configured for the network (requires censor module). - H Hides an oper's oper status from WHOIS (requires + configured for the network (requires the censor module). + H Hides an oper's oper status from WHOIS (requires the hideoper module). I Hides a user's entire channel list in WHOIS from - non-IRCops (requires hidechans module). + non-IRCops (requires the hidechans module). L Stops redirections done by m_redirect (mode must be enabled in the config). R Blocks private messages from unregistered users - (requires services account module). - S Strips mIRC color/bold/underline codes out of private - messages to the user (requires stripcolor module). + (requires the services account module). + S Strips formatting codes out of private messages + to the user (requires the stripcolor module). W Receives notification when a user uses WHOIS on them - (IRCop only, requires showwhois module)."> + (IRCop only, requires the showwhois module)."> p Make channel private, hiding it in users' whoises and replacing it with * in /LIST. r Marks the channel as registered with Services - (requires services account module). + (requires the services account module). s Make channel secret, hiding it in users' whoises and /LIST. t Prevents users without +h or +o from changing the topic. u Makes the channel an auditorium; normal users only see themselves or themselves and the operators, - while operators see all the users (requires + while operators see all the users (requires the auditorium module). 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) + (requires the autoop module) z Blocks non-SSL clients from joining the channel. A Allows anyone to invite users to the channel (normally only chanops can invite, requires - allowinvite module). + the allowinvite module). B Blocks messages with too many capital letters, as determined by the network configuration - (requires blockcaps module). - C Blocks any CTCPs to the channel (requires noctcp - module). - D Delays join messages from users until they - message the channel (requires delayjoin module). + (requires the blockcaps module). + C Blocks any CTCPs to the channel (requires the + noctcp module). + D Delays join messages from users until they message + the channel (requires the delayjoin module). E [~*][lines]:[sec]{[:difference]}{[:backlog]} Allows blocking of similar messages. Kicks as default, blocks with ~ and bans with * The last two parameters are optional. F : Blocks nick changes when they equal or exceed the - specified rate (requires nickflood module). + specified rate (requires the nickflood module). G Censors messages to the channel based on the - network configuration (requires censor module). + network configuration (requires the censor module). H : Displays the last lines of chat to joining users. is the maximum time to keep - lines in the history buffer (requires chanhistory - module). + lines in the history buffer (requires the + chanhistory module). J Prevents rejoin after kick for the specified number of seconds. This prevents auto-rejoin - (requires kicknorejoin module). + (requires the kicknorejoin module). K Blocks /KNOCK on the channel. L If the channel reaches its limit set by +l, - redirect users to (requires redirect - module). + redirect users to (requires the + redirect module). M Blocks unregistered users from speaking (requires - services account module). + the services account module). N Prevents users on the channel from changing nick - (requires nonicks module). + (requires the nonicks module). O Channel is IRCops only (can only be set by IRCops, - requires operchans module). + requires the operchans module). P Makes the channel permanent; Bans, invites, the topic, modes, and such will not be lost when it empties (can only be set by IRCops, requires - permchannels module). + the permchannels module). Q Only ulined servers and their users can kick - (requires nokicks module) + (requires the nokicks module) R Blocks unregistered users from joining (requires - services account module). - S Strips mIRC color codes from messages to the - channel (requires stripcolor module). + the services account module). + S Strips formatting codes from messages to the + channel (requires the 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). + not at least halfop (requires the nonotice module). + X : Makes users of or higher exempt to the + specified restriction . For example: flood:h + (requires the exemptchanops module). + Possible restriction types to exempt with +X are: + + auditorium-see Permission required to see the full user list of + a +u channel (requires the auditorium module). + auditorium-vis Permission required to be visible in a +u channel + (requires the auditorium module). + blockcaps Channel mode +B + blockcolor Channel mode +c + censor Channel mode +G + filter Channel mode +g + flood Channel mode +f + nickflood Channel mode +F + noctcp Channel mode +C + nonick Channel mode +N + nonotice Channel mode +T + regmoderated Channel mode +M + stripcolor Channel mode +S + topiclock Channel mode +t ------------- NOTE: A large number of these modes are dependent upon server-side modules @@ -991,30 +1012,25 @@ Note that all /STATS use is broadcast to online IRC operators."> A Allows receipt of remote announcement messages. c Allows receipt of local connect messages. C Allows receipt of remote connect messages. - d Allows receipt of general (and sometimes random) debug - messages. + d Allows receipt of general (and sometimes random) debug messages. f Allows receipt of flooding notices. - g Allows receipt of globops (requires globops module). - j Allows receipt of channel creation notices (requires - chancreate module). - J Allows receipt of remote channel creation notices (requires - chancreate module). + g Allows receipt of globops (requires the globops module). + j Allows receipt of channel creation notices (requires the chancreate module). + J Allows receipt of remote channel creation notices (requires the chancreate module). k Allows receipt of local kill messages. K Allows receipt of remote kill messages. - l Allows receipt of local linking related - messages. - L Allows receipt of remote linking related - messages. - n See local nickname changes (requires seenicks module). - N See remote nickname changes (requires seenicks modules). - o Allows receipt of oper-up, oper-down, and oper-failure - messages. - O Allows receipt of remote oper-up, oper-down, and oper-failure - messages. + l Allows receipt of local linking related messages. + L Allows receipt of remote linking related messages. + n See local nickname changes (requires the seenicks module). + N See remote nickname changes (requires the seenicks modules). + o Allows receipt of oper-up, oper-down, and oper-failure messages. + O Allows receipt of remote oper-up, oper-down, and oper-failure messages. q Allows receipt of local quit messages. Q Allows receipt of remote quit messages. + r Allows receipt of local oper commands (requires the operlog module). + R Allows receipt of remote oper commands (requires the operlog module). t Allows receipt of attempts to use /STATS (local and remote). - v Allows receipt of oper-override notices (requires override module). + v Allows receipt of oper-override notices (requires the override module). x Allows receipt of local Xline notices (g/Z/q/k/e/R/shuns). X Allows receipt of remote Xline notices (g/Z/q/k/e/R/shuns)."> @@ -1039,44 +1055,44 @@ setting +I . Matching extbans: j: Matches anyone in the given channel. Does not support - wildcards (requires channelban module). - n: Matches users in a matching connect class (requires + wildcards (requires the channelban module). + n: Matches users in a matching connect class (requires the classban module). - r: Matches users with a matching real name (requires + r: Matches users with a matching real name (requires the gecosban module). - s: Matches users on a matching server (requires serverban - module). - z: Matches users with a matching SSL certificate fingerprint - (requires sslmodes module) + s: Matches users on a matching server (requires the + serverban module). + z: Matches users having the given SSL certificate + fingerprint (requires the sslmodes module). O: Matches IRCops of a matching type, mostly useful as an - an invite exception (requires operchans module). + an invite exception (requires the operchans module). R: Matches users logged into a matching account (requires - services account module). + the services account module). U: Matches unregistered users matching the given banmask. - (requires services account module). + (requires the 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 + c: Blocks any messages that contain formatting codes from + matching users (requires the blockcolor module). + m: Blocks messages from matching users (requires the muteban module). Users with +v or above are not affected. p: Blocks part messages from matching users (requires - nopartmsg module). + the nopartmsg module). A: Blocks invites by matching users even when +A is set - (requires allowinvite module). + (requires the 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 + matching users (requires the blockcaps module). + C: Blocks CTCPs from matching users (requires the noctcp 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 + the nonicks module). + Q: Blocks kicks by matching users (requires the nokicks module). + S: Strips formatting codes from messages from matching + users (requires the stripcolor module). + T: Blocks notices from matching users (requires the + nonotice module). A ban given to an Acting extban may either be a nick!user@host mask (unless stated otherwise), matched against users as for a normal ban, @@ -1085,4 +1101,4 @@ 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)."> + when they try to join (requires the banredirect module)."> diff --git a/docs/conf/helpop.conf.example b/docs/conf/helpop.conf.example index b38e4130e..25253c139 100644 --- a/docs/conf/helpop.conf.example +++ b/docs/conf/helpop.conf.example @@ -74,79 +74,81 @@ LOCKSERV UNLOCKSERV"> ---------- c Blocks private messages and notices from users who do - not share a common channel with you (requires + not share a common channel with you (requires the commonchans module). d Deaf mode. User will not receive any messages or notices - from channels they are in (requires deaf module). + from channels they are in (requires the deaf module). g In combination with /ACCEPT, provides for server side - ignore (requires callerid module). + ignore (requires the callerid module). h Marks as 'available for help' in WHOIS (IRCop only, - requires helpop module). + requires the helpop module). i Makes invisible to /WHO if the user using /WHO is not in a common channel. k Prevents the user from being kicked from channels, or having op modes removed from them (services only, - requires servprotect module). + requires the servprotect module). o Marks as a IRC operator. s Receives server notices specified by (IRCop only). r Marks as a having a registered nickname - (requires services account module). + (requires the services account module). w Receives wallops messages. - x Gives a cloaked hostname (requires cloaking module). - z Only allow private messages from SSL users (requires + x Gives a cloaked hostname (requires the cloaking module). + z Only allow private messages from SSL users (requires the sslmode module). - B Marks as a bot (requires botmode module). + B Marks as a bot (requires the botmode module). G Censors messages sent to the user based on filters - configured for the network (requires censor module). - H Hides an oper's oper status from WHOIS (requires + configured for the network (requires the censor module). + H Hides an oper's oper status from WHOIS (requires the hideoper module). I Hides a user's entire channel list in WHOIS from - non-IRCops (requires hidechans module). + non-IRCops (requires the hidechans module). L Stops redirections done by m_redirect (mode must be enabled in the config). R Blocks private messages from unregistered users - (requires services account module). - S Strips mIRC color/bold/underline codes out of private - messages to the user (requires stripcolor module). + (requires the services account module). + S Strips formatting codes out of private messages + to the user (requires the stripcolor module). W Receives notification when a user uses WHOIS on them - (IRCop only, requires showwhois module)."> + (IRCop only, requires the showwhois module)."> p Make channel private, hiding it in users' whoises and replacing it with * in /LIST. r Marks the channel as registered with Services - (requires services account module). + (requires the services account module). s Make channel secret, hiding it in users' whoises and /LIST. t Prevents users without +h or +o from changing the topic. u Makes the channel an auditorium; normal users only see themselves or themselves and the operators, - while operators see all the users (requires + while operators see all the users (requires the auditorium module). 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) + (requires the autoop module) z Blocks non-SSL clients from joining the channel. A Allows anyone to invite users to the channel (normally only chanops can invite, requires - allowinvite module). + the allowinvite module). B Blocks messages with too many capital letters, as determined by the network configuration - (requires blockcaps module). - C Blocks any CTCPs to the channel (requires noctcp - module). - D Delays join messages from users until they - message the channel (requires delayjoin module). + (requires the blockcaps module). + C Blocks any CTCPs to the channel (requires the + noctcp module). + D Delays join messages from users until they message + the channel (requires the delayjoin module). E [~*][lines]:[sec]{[:difference]}{[:backlog]} Allows blocking of similar messages. Kicks as default, blocks with ~ and bans with * The last two parameters are optional. + F : Blocks nick changes when they equal or exceed the - specified rate (requires nickflood module). + specified rate (requires the nickflood module). G Censors messages to the channel based on the - network configuration (requires censor module). + network configuration (requires the censor module). H : Displays the last lines of chat to joining users. is the maximum time to keep - lines in the history buffer (requires chanhistory - module). + lines in the history buffer (requires the + chanhistory module). J Prevents rejoin after kick for the specified number of seconds. This prevents auto-rejoin - (requires kicknorejoin module). + (requires the kicknorejoin module). K Blocks /KNOCK on the channel. L If the channel reaches its limit set by +l, - redirect users to (requires redirect - module). + redirect users to (requires the + redirect module). M Blocks unregistered users from speaking (requires - services account module). + the services account module). N Prevents users on the channel from changing nick - (requires nonicks module). + (requires the nonicks module). O Channel is IRCops only (can only be set by IRCops, - requires operchans module). + requires the operchans module). P Makes the channel permanent; Bans, invites, the topic, modes, and such will not be lost when it empties (can only be set by IRCops, requires - permchannels module). + the permchannels module). Q Only ulined servers and their users can kick - (requires nokicks module) + (requires the nokicks module) R Blocks unregistered users from joining (requires - services account module). - S Strips mIRC color codes from messages to the - channel (requires stripcolor module). + the services account module). + S Strips formatting codes from messages to the + channel (requires the 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). + not at least halfop (requires the nonotice module). + X : Makes users of or higher exempt to the + specified restriction . For example: flood:h + (requires the exemptchanops module). ------------- NOTE: A large number of these modes are dependent upon server-side modules @@ -236,30 +237,25 @@ help channel if you have any questions."> A Allows receipt of remote announcement messages. c Allows receipt of local connect messages. C Allows receipt of remote connect messages. - d Allows receipt of general (and sometimes random) debug - messages. + d Allows receipt of general (and sometimes random) debug messages. f Allows receipt of flooding notices. - g Allows receipt of globops (requires globops module). - j Allows receipt of channel creation notices (requires - chancreate module). - J Allows receipt of remote channel creation notices (requires - chancreate module). + g Allows receipt of globops (requires the globops module). + j Allows receipt of channel creation notices (requires the chancreate module). + J Allows receipt of remote channel creation notices (requires the chancreate module). k Allows receipt of local kill messages. K Allows receipt of remote kill messages. - l Allows receipt of local linking related - messages. - L Allows receipt of remote linking related - messages. - n See local nickname changes (requires seenicks module). - N See remote nickname changes (requires seenicks modules). - o Allows receipt of oper-up, oper-down, and oper-failure - messages. - O Allows receipt of remote oper-up, oper-down, and oper-failure - messages. + l Allows receipt of local linking related messages. + L Allows receipt of remote linking related messages. + n See local nickname changes (requires the seenicks module). + N See remote nickname changes (requires the seenicks modules). + o Allows receipt of oper-up, oper-down, and oper-failure messages. + O Allows receipt of remote oper-up, oper-down, and oper-failure messages. q Allows receipt of local quit messages. Q Allows receipt of remote quit messages. + r Allows receipt of local oper commands (requires the operlog module). + R Allows receipt of remote oper commands (requires the operlog module). t Allows receipt of attempts to use /STATS (local and remote). - v Allows receipt of oper-override notices (requires override module). + v Allows receipt of oper-override notices (requires the override module). x Allows receipt of local Xline notices (g/Z/q/k/e/R/shuns). X Allows receipt of remote Xline notices (g/Z/q/k/e/R/shuns)."> @@ -280,44 +276,44 @@ setting +I . Matching extbans: j: Matches anyone in the given channel. Does not support - wildcards (requires channelban module). + wildcards (requires the channelban module). n: Matches users in a matching connect class (requires - classban module). - r: Matches users with a matching real name (requires + the classban module). + r: Matches users with a matching real name (requires the gecosban module). - s: Matches users on a matching server (requires serverban - module). + s: Matches users on a matching server (requires the + serverban module). z: Matches users having the given SSL certificate - fingerprint (requires sslmodes module). + fingerprint (requires the sslmodes module). O: Matches IRCops of a matching type, mostly useful as an - an invite exception (requires operchans module). + an invite exception (requires the operchans module). R: Matches users logged into a matching account (requires - services account module). + the services account module). U: Matches unregistered users matching the given banmask. - (requires services account module). + (requires the 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 + c: Blocks any messages that contain formatting codes from + matching users (requires the blockcolor module). + m: Blocks messages from matching users (requires the muteban module). Users with +v or above are not affected. p: Blocks part messages from matching users (requires - nopartmsg module). + the nopartmsg module). A: Blocks invites by matching users even when +A is set - (requires allowinvite module). + (requires the 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 + matching users (requires the blockcaps module). + C: Blocks CTCPs from matching users (requires the noctcp 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 + the nonicks module). + Q: Blocks kicks by matching users (requires the nokicks module). + S: Strips formatting codes from messages from matching + users (requires the stripcolor module). + T: Blocks notices from matching users (requires the + nonotice module). A ban given to an Acting extban may either be a nick!user@host mask (unless stated otherwise), matched against users as for a normal ban, @@ -326,4 +322,4 @@ 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)."> + when they try to join (requires the banredirect module)."> diff --git a/docs/conf/inspircd.conf.example b/docs/conf/inspircd.conf.example index abb8830a9..6a9b960e0 100644 --- a/docs/conf/inspircd.conf.example +++ b/docs/conf/inspircd.conf.example @@ -62,7 +62,7 @@ # # # # # Executable include example: # -# +# # # @@ -241,7 +241,9 @@ # you only want to adjust sendq and a password parent="main" - # allow: What IP addresses/hosts to allow for this block. + # allow: The IP address or hostname of clients that can use this + # class. You can specify either an exact match, a glob match, or + # a CIDR range here. allow="203.0.113.*" # hash: the hash function this password is hashed with. Requires the @@ -330,7 +332,9 @@ # connect class inheriting. name="main" - # allow: What IP addresses/hosts to allow for this block. + # allow: The IP address or hostname of clients that can use this + # class. You can specify either an exact match, a glob match, or + # a CIDR range here. allow="*" # maxchans: Maximum number of channels a user in this class @@ -452,7 +456,7 @@ # Example of an executable file include. Note this will be read on rehash, # not when the command is run. -# +# #-#-#-#-#-#-#-#-#-#-#-#-#-#-# DNS SERVER -#-#-#-#-#-#-#-#-#-#-#-#-#-#-# # If these values are not defined, InspIRCd uses the default DNS resolver @@ -622,8 +626,38 @@ # link with servers running 2.0. Defaults to yes. allowzerolimit="no" - # exemptchanops: exemptions for channel access restrictions based on prefix. - exemptchanops="nonick:v flood:o" + # exemptchanops: Allows users with with a status mode to be exempt + # from various channel restrictions. Possible restrictions are: + # - auditorium-see Permission required to see the full user list of + # a +u channel (requires the auditorium module). + # - auditorium-vis Permission required to be visible in a +u channel + # (requires the auditorium module). + # - blockcaps Channel mode +B - blocks messages with too many capital + # letters (requires the blockcaps module). + # - blockcolor Channel mode +c - blocks messages with formatting codes + # (requires the blockcolor module). + # - censor Channel mode +G - censors messages based on the network + # configuration (requires the censor module). + # - filter Channel mode +g - blocks messages containing the given + # glob mask (requires the chanfilter module). + # - flood Channel mode +f - kicks (and bans) on text flood of a + # specified rate (requires the messageflood module). + # - nickflood Channel mode +F - blocks nick changes after a specified + # rate (requires the nickflood module). + # - noctcp Channel mode +C - blocks any CTCPs to the channel + # (requires the noctcp module). + # - nonick Channel mode +N - prevents users on the channel from + # changing nicks (requires the nonicks module). + # - nonotice Channel mode +T - blocks /NOTICEs to the channel + # (requires the nonotice module). + # - regmoderated Channel mode +M - blocks unregistered users from + # speaking (requires the services account module). + # - stripcolor Channel mode +S - strips formatting codes from + # messages (requires the stripcolor module). + # - topiclock Channel mode +t - limits changing the topic to (half)ops + # You can also configure this on a per-channel basis with a channel mode. + # See m_exemptchanops in modules.conf.example for more details. + exemptchanops="censor:o filter:o nickflood:o nonick:v regmoderated:o" # invitebypassmodes: This allows /invite to bypass other channel modes. # (Such as +k, +j, +l, etc.) diff --git a/docs/conf/modules.conf.example b/docs/conf/modules.conf.example index da72775e9..6955b2d74 100644 --- a/docs/conf/modules.conf.example +++ b/docs/conf/modules.conf.example @@ -438,14 +438,14 @@ # that looks like the name of another channel on the network. # - + #allowrange=""> #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# # Channelban: Implements extended ban j:, which stops anyone already @@ -765,9 +765,13 @@ #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# # Exempt channel operators module: Provides support for allowing # -# channel operators to be exempt from some channel modes. Supported # -# modes are blockcaps, noctcp, blockcolor, nickflood, flood, censor, # -# filter, regmoderated, nonick, nonotice, and stripcolor. # +# users of a specified channel status to be exempt from some channel # +# restriction modes. Supported restrictions are # +# blockcaps, blockcolor, censor, filter, flood, nickflood, noctcp, # +# nonick, nonotice, regmoderated, stripcolor, and topiclock. # +# See in inspircd.conf.example for a more # +# detailed list of the restriction modes that can be exempted. # +# These are settable using /mode #chan +X : # # # #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# @@ -869,7 +873,7 @@ # If you specify to use the helpop module, then specify below the # # path to the helpop.conf file. # # # -# +# #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# # Hide chans module: Allows users to hide their channels list from non- diff --git a/include/modules.h b/include/modules.h index 11bf6d55a..082079cd9 100644 --- a/include/modules.h +++ b/include/modules.h @@ -221,7 +221,7 @@ enum Implementation I_OnUnloadModule, I_OnBackgroundTimer, I_OnPreCommand, I_OnCheckReady, I_OnCheckInvite, I_OnRawMode, I_OnCheckKey, I_OnCheckLimit, I_OnCheckBan, I_OnCheckChannelBan, I_OnExtBanCheck, I_OnChangeLocalUserHost, I_OnPreTopicChange, - I_OnPostTopicChange, I_OnPostConnect, + I_OnPostTopicChange, I_OnPostConnect, I_OnPostDeoper, I_OnChangeLocalUserGECOS, I_OnUserRegister, I_OnChannelPreDelete, I_OnChannelDelete, I_OnPostOper, I_OnSetAway, I_OnPostCommand, I_OnPostJoin, I_OnBuildNeighborList, I_OnGarbageCollect, I_OnSetConnectClass, @@ -448,6 +448,11 @@ class CoreExport Module : public classbase, public usecountbase */ virtual void OnPostOper(User* user, const std::string &opername, const std::string &opertype); + /** Called after a user deopers locally. + * @param user The user who has deopered. + */ + virtual void OnPostDeoper(User* user); + /** Called whenever a user types /INFO. * The User will contain the information of the user who typed the command. Modules may use this * method to output their own credits in /INFO (which is the ircd's version of an about box). diff --git a/modulemanager b/modulemanager index 3e4eee9c9..50a86a7f7 100755 --- a/modulemanager +++ b/modulemanager @@ -97,7 +97,7 @@ sub parse_url { $mod->{description} = $1; } elsif (/^mask (.*)/) { $mod->{mask} = $1; - } elsif (m#^source (http://\S+)#) { + } elsif (/^source (\S+)/) { parse_url $1; } else { print "Unknown line in $src: $_\n"; diff --git a/src/modules.cpp b/src/modules.cpp index 9359cac37..ab10d6ae1 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -82,6 +82,7 @@ ModResult Module::OnUserPreJoin(LocalUser*, Channel*, const std::string&, std::s void Module::OnMode(User*, User*, Channel*, const Modes::ChangeList&, ModeParser::ModeProcessFlag, const std::string&) { DetachEvent(I_OnMode); } void Module::OnOper(User*, const std::string&) { DetachEvent(I_OnOper); } void Module::OnPostOper(User*, const std::string&, const std::string &) { DetachEvent(I_OnPostOper); } +void Module::OnPostDeoper(User*) { DetachEvent(I_OnPostDeoper); } void Module::OnInfo(User*) { DetachEvent(I_OnInfo); } ModResult Module::OnUserPreInvite(User*, User*, Channel*, time_t) { DetachEvent(I_OnUserPreInvite); return MOD_RES_PASSTHRU; } ModResult Module::OnUserPreMessage(User*, const MessageTarget&, MessageDetails&) { DetachEvent(I_OnUserPreMessage); return MOD_RES_PASSTHRU; } diff --git a/src/modules/extra/m_geoip.cpp b/src/modules/extra/m_geoip.cpp index 7083be6ac..0d7c2eb70 100644 --- a/src/modules/extra/m_geoip.cpp +++ b/src/modules/extra/m_geoip.cpp @@ -146,6 +146,13 @@ class ModuleGeoIP : public Module, public Stats::EventListener, public Whois::Ev return MOD_RES_DENY; } + void OnSetUserIP(LocalUser* user) CXX11_OVERRIDE + { + // If user has sent NICK/USER, re-set the ExtItem as this is likely CGI:IRC changing the IP + if (user->registered == REG_NICKUSER) + SetExt(user); + } + void OnWhois(Whois::Context& whois) CXX11_OVERRIDE { // If the extban is disabled we don't expose users location. diff --git a/src/modules/m_banredirect.cpp b/src/modules/m_banredirect.cpp index 4a4188757..5ec75f13c 100644 --- a/src/modules/m_banredirect.cpp +++ b/src/modules/m_banredirect.cpp @@ -182,6 +182,21 @@ class BanRedirect : public ModeWatcher redirects = new BanRedirectList; extItem.set(channel, redirects); } + else + { + for (BanRedirectList::iterator redir = redirects->begin(); redir != redirects->end(); ++redir) + { + // Mimic the functionality used when removing the mode + if (irc::equals(redir->targetchan, mask[CHAN]) && irc::equals(redir->banmask, param)) + { + // Make sure the +b handler will still set the right ban + param.append(mask[CHAN]); + // Silently ignore the duplicate and don't set metadata + // This still allows channel ops to set/unset a redirect ban to clear "ghost" redirects + return true; + } + } + } /* Here 'param' doesn't have the channel on it yet */ redirects->push_back(BanRedirectEntry(mask[CHAN], param)); diff --git a/src/modules/m_shun.cpp b/src/modules/m_shun.cpp index 92c0b0bd0..3e378a74c 100644 --- a/src/modules/m_shun.cpp +++ b/src/modules/m_shun.cpp @@ -230,7 +230,7 @@ class ModuleShun : public Module, public Stats::EventListener else if ((command == "PART") && (parameters.size() > 1)) { /* same for PART */ - parameters[1].clear(); + parameters.pop_back(); } /* if we're here, allow the command. */ diff --git a/src/modules/m_swhois.cpp b/src/modules/m_swhois.cpp index c7c14e30c..d42649909 100644 --- a/src/modules/m_swhois.cpp +++ b/src/modules/m_swhois.cpp @@ -37,9 +37,11 @@ enum class CommandSwhois : public Command { public: + LocalIntExt operblock; StringExtItem swhois; CommandSwhois(Module* Creator) : Command(Creator, "SWHOIS", 2, 2) + , operblock("swhois_operblock", ExtensionItem::EXT_USER, Creator) , swhois("swhois", ExtensionItem::EXT_USER, Creator) { flags_needed = 'o'; syntax = " :"; @@ -70,6 +72,7 @@ class CommandSwhois : public Command ServerInstance->SNO->WriteGlobalSno('a', "%s used SWHOIS to set %s's extra whois to '%s'", user->nick.c_str(), dest->nick.c_str(), parameters[1].c_str()); } + operblock.set(user, 0); if (parameters[1].empty()) swhois.unset(dest); else @@ -127,10 +130,32 @@ class ModuleSWhois : public Module, public Whois::LineEventListener if (!swhois.length()) return; + cmd.operblock.set(user, 1); cmd.swhois.set(user, swhois); ServerInstance->PI->SendMetaData(user, "swhois", swhois); } + void OnPostDeoper(User* user) CXX11_OVERRIDE + { + std::string* swhois = cmd.swhois.get(user); + if (!swhois) + return; + + if (!cmd.operblock.get(user)) + return; + + cmd.operblock.set(user, 0); + cmd.swhois.unset(user); + ServerInstance->PI->SendMetaData(user, "swhois", ""); + } + + void OnDecodeMetaData(Extensible* target, const std::string& extname, const std::string&) CXX11_OVERRIDE + { + User* dest = static_cast(target); + if (dest && (extname == "swhois")) + cmd.operblock.set(dest, 0); + } + Version GetVersion() CXX11_OVERRIDE { return Version("Provides the SWHOIS command which allows setting of arbitrary WHOIS lines", VF_OPTCOMMON | VF_VENDOR); diff --git a/src/modules/m_xline_db.cpp b/src/modules/m_xline_db.cpp index d220027fe..fb0c81d2f 100644 --- a/src/modules/m_xline_db.cpp +++ b/src/modules/m_xline_db.cpp @@ -114,7 +114,7 @@ class ModuleXLineDB : public Module { XLine* line = i->second; stream << "LINE " << line->type << " " << line->Displayable() << " " - << ServerInstance->Config->ServerName << " " << line->set_time << " " + << line->source << " " << line->set_time << " " << line->duration << " :" << line->reason << std::endl; } } diff --git a/src/users.cpp b/src/users.cpp index 5f31ff299..1e2554107 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -458,6 +458,7 @@ void User::UnOper() ModeHandler* opermh = ServerInstance->Modes->FindMode('o', MODETYPE_USER); this->SetMode(opermh, false); + FOREACH_MOD(OnPostDeoper, (this)); } /* diff --git a/src/xline.cpp b/src/xline.cpp index dfd7e2903..cb4f011c0 100644 --- a/src/xline.cpp +++ b/src/xline.cpp @@ -589,10 +589,6 @@ void GLine::Apply(User* u) bool ELine::Matches(User *u) { - LocalUser* lu = IS_LOCAL(u); - if (lu && lu->exempt) - return false; - if (InspIRCd::Match(u->ident, this->identmask, ascii_case_insensitive_map)) { if (InspIRCd::MatchCIDR(u->GetRealHost(), this->hostmask, ascii_case_insensitive_map) ||