diff options
48 files changed, 510 insertions, 402 deletions
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 @@ <alias text="HOSTSERV" replace="PRIVMSG HostServ :$2-" requires="HostServ" uline="yes"> <alias text="BOTSERV" replace="PRIVMSG BotServ :$2-" requires="BotServ" uline="yes"> -# Note: We can't have a shorthand version of this, it conflicts with HS for helpserv -<alias text="HELPSERV" replace="PRIVMSG HelpServ :$2-" requires="HelpServ" uline="yes"> - # Shorthand aliases for nickserv, chanserv, operserv, memoserv, hostserv, botserv <alias text="NS" replace="PRIVMSG NickServ :$2-" requires="NickServ" uline="yes"> <alias text="CS" replace="PRIVMSG ChanServ :$2-" requires="ChanServ" uline="yes"> @@ -17,11 +14,7 @@ <alias text="HS" replace="PRIVMSG HostServ :$2-" requires="HostServ" uline="yes"> <alias text="BS" replace="PRIVMSG BotServ :$2-" requires="BotServ" 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"> -<alias text="IDENTIFY" format="#*" replace="PRIVMSG ChanServ :IDENTIFY $2 $3" requires="ChanServ" uline="yes"> -<alias text="IDENTIFY" format="*" replace="PRIVMSG NickServ :IDENTIFY $2" requires="NickServ" uline="yes"> - +# /id [account] <password> +# Identify for a nickname +<alias text="ID" format="*" replace="PRIVMSG NickServ :IDENTIFY $2-" requires="NickServ" uline="yes"> +<alias text="IDENTIFY" format="*" replace="PRIVMSG NickServ :IDENTIFY $2-" requires="NickServ" uline="yes"> 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"> -<helpop key="sslinfo" value="/SSLINFO [nick] +<helpop key="sslinfo" value="/SSLINFO <nick> Displays information on the SSL connection and certificate of the target user."> -<helpop key="uninvite" value="/UNINVITE [nick] [channel] +<helpop key="uninvite" value="/UNINVITE <nick> <channel> Uninvite a user from a channel, same syntax as INVITE."> -<helpop key="tban" value="/TBAN [channel] [duration] [banmask] +<helpop key="tban" value="/TBAN <channel> <duration> <banmask> Sets a timed ban. The duration of the ban can be specified in the following format: 1w2d3h4m6s which indicates a ban of one week, two @@ -61,37 +61,48 @@ ban may just be specified as a number of seconds. All timed bans appear in the banlist as normal bans and may be safely removed before their time is up."> -<helpop key="dccallow" value="/DCCALLOW [+|-] [nick] [duration] +<helpop key="dccallow" value="/DCCALLOW - List allowed nicks +/DCCALLOW LIST - This also lists allowed nicks +/DCCALLOW +<nick> [<duration>] - Add a nick +/DCCALLOW -<nick> - Remove a nick +/DCCALLOW HELP - Display help -Adds a nickname to or deletes a nickname from your DCCALLOW list."> +Duration is optional, and may be specified in seconds or in the +form of 1m2h3d4w5y."> -<helpop key="accept" value="/ACCEPT [+-*] [nick]{ [, [+-]<nick> ] } +<helpop key="accept" value="/ACCEPT * - List accepted nicks +/ACCEPT +<nick> - Add a nick +/ACCEPT -<nick> - Remove a nick +This command accepts multiple nicks like so: +/ACCEPT +<nick1>,+<nick2>,-<nick3> Manages your accept list. This list is used to determine who can -private message you when you have usermode +g set. ACCEPT +nick adds -a nick to your accept list, ACCEPT -nick removes a nick from your -accept list, and ACCEPT * displays your accept list."> +private message you when you have usermode +g set."> -<helpop key="cycle" value="/CYCLE [channel] :[reason] +<helpop key="cycle" value="/CYCLE <channel> :[<reason>] Cycles a channel (leaving and rejoining), overrides restrictions that would stop a new user joining, such as user limits and channel keys."> -<helpop key="title" value="/TITLE [name] [password] +<helpop key="title" value="/TITLE <name> <password> Authenticate for a WHOIS title line and optionally a vhost using the specified username and password."> -<helpop key="watch" value="/WATCH [C|S|+/-[NICK]] +<helpop key="watch" value="/WATCH - List watched nicks that are online +/WATCH L - List watched nicks, online and offline +/WATCH C - Clear all watched nicks +/WATCH S - Show statistics +/WATCH +<nick> - Add a nick +/WATCH -<nick> - Remove a nick +This command accepts multiple nicks like so: +/WATCH +<nick1> +<nick2> -<nick3>"> -Adds or deletes a user from the watch list. C clears the list -and S queries the status."> - -<helpop key="vhost" value="/VHOST [username] [password] +<helpop key="vhost" value="/VHOST <username> <password> Authenticate for a vhost using the specified username and password."> -<helpop key="remove" value="/REMOVE [channel] [nick] {[reason]} +<helpop key="remove" value="/REMOVE <channel> <nick> [<reason>] Removes a user from a channel you specify. You must be at least a channel halfoperator to remove a user. A removed user will part with @@ -102,16 +113,18 @@ a message stating they were removed from the channel and by whom."> Removes listmodes from a channel. E.g. /RMODE #Chan b m:* will remove all mute extbans."> -<helpop key="fpart" value="/FPART [channel] [nick] {[reason]} +<helpop key="fpart" value="/FPART <channel> <nick> [<reason>] This behaves identically to /REMOVE. /REMOVE is a builtin mIRC command which caused trouble for some users."> -<helpop key="devoice" value="/DEVOICE [channel] +<helpop key="devoice" value="/DEVOICE <channel> Devoices yourself on the specified channel."> -<helpop key="silence" value="/SILENCE [+/-][hostmask] [p|c|i|n|t|a|x] +<helpop key="silence" value="/SILENCE - Shows a list of silenced masks +/SILENCE +<mask> [<flags>] - Add a mask +/SILENCE -<mask> - Remove a mask A serverside ignore of the given n!u@h mask. The letter(s) at the end specify what is to be ignored from this hostmask. @@ -132,13 +145,13 @@ with what you want excepted. For example, if you wanted to except everything from people with a host matching *.foo.net, you would do /SILENCE +*!*@*.foo.net xa -/SILENCE without a parameter will list the hostmasks that you have silenced."> +/SILENCE without a parameter will list the masks that you have silenced."> -<helpop key="knock" value="/KNOCK [channel] +<helpop key="knock" value="/KNOCK <channel> Sends a notice to a channel indicating you wish to join."> -<helpop key="user" value="/USER [ident] [local host] [remote host] :[GECOS] +<helpop key="user" value="/USER <ident> <local host> <remote host> :<GECOS> This command is used by your client to register your IRC session, providing your ident and GECOS to the @@ -146,11 +159,11 @@ server. You should not use it during an established connection."> -<helpop key="nick" value="/NICK [new nick] +<helpop key="nick" value="/NICK <new nick> -Change your nickname to [new nick]."> +Change your nickname to <new nick>."> -<helpop key="quit" value="/QUIT {[reason]} +<helpop key="quit" value="/QUIT [<reason>] Quit from IRC and end your current session."> @@ -158,47 +171,51 @@ Quit from IRC and end your current session."> Returns the server's version information."> -<helpop key="ping" value="/PING [server] +<helpop key="ping" value="/PING <server> Ping a server. The server will answer with a PONG."> -<helpop key="pong" value="/PONG [server] +<helpop key="pong" value="/PONG <server> Your client should send this to answer server PINGs. You should not issue this command manually."> -<helpop key="admin" value="/ADMIN [server] +<helpop key="admin" value="/ADMIN [<server>] Shows the administrative information for the given server."> -<helpop key="privmsg" value="/PRIVMSG [target] [text] +<helpop key="privmsg" value="/PRIVMSG <target> <text> -Sends a message to a user or channel specified in [target]."> +Sends a message to a user or channel specified in <target>."> -<helpop key="notice" value="/NOTICE [target] [text] +<helpop key="notice" value="/NOTICE <target> <text> -Sends a notice to a user or channel specified in [target]."> +Sends a notice to a user or channel specified in <target>."> -<helpop key="join" value="/JOIN [channel]{,[channel]} [key]{,[key]} +<helpop key="join" value="/JOIN <channel>[,<channel>] [<key>][,<key>] Joins one or more channels you provide the names for."> -<helpop key="names" value="/NAMES [channel]{,[channel]} +<helpop key="names" value="/NAMES <channel>[,<channel>] Return a list of users on the channels you provide."> -<helpop key="part" value="/PART [channel]{,[channel] [reason]} +<helpop key="part" value="/PART <channel>[,<channel>] [<reason>] Leaves one or more channels you specify."> -<helpop key="kick" value="/KICK [channel] [nick] {[reason]} +<helpop key="kick" value="/KICK <channel> <nick>[,<nick>] [<reason>] Kicks a user from a channel you specify. You must be at least a channel halfoperator to kick a user."> -<helpop key="mode" value="/MODE [target] [+|-][modes]{[+|-][modes]} {mode parameters} +<helpop key="mode" value="/MODE <target> (+|-)<modes> [<mode parameters>] - Change modes of <target>. + +/MODE <target> - Show modes of <target>. + +/MODE <channel> <list mode char> - List bans, exceptions, etc. set on <channel>. -Sets the mode for a channel or a nickname specified in [target]. +Sets the mode for a channel or a nickname specified in <target>. A user may only set modes upon themselves, and may not set the +o usermode, and a user may only change channel modes of channels where they are at least a halfoperator. @@ -206,14 +223,14 @@ channels where they are at least a halfoperator. For a list of all user and channel modes, enter /HELPOP UMODES or /HELPOP CHMODES."> -<helpop key="topic" value="/TOPIC [channel] {topic} +<helpop key="topic" value="/TOPIC <channel> [<topic>] Sets or retrieves the channel topic. If a channel topic is given in the command and either the channel is not +t, or you are at least a halfoperator, the channel topic will be changed to the new one you provide."> -<helpop key="who" value="/WHO [ [search-pattern] [ohurmaiMplf] ] +<helpop key="who" value="/WHO <search pattern> [ohurmaiMplf] Looks up the information of users matching the range you provide. You may only /WHO nicknames in channels or on servers where you @@ -257,44 +274,44 @@ The following flags after the mask have the following effects: You may combine multiple flags in one WHO command except where stated in the table above."> -<helpop key="motd" value="/MOTD [server] +<helpop key="motd" value="/MOTD [<server>] -Show the message of the day for [server]. Messages of the day often +Show the message of the day for <server>. Messages of the day often contain important server rules and notices and should be read prior to using a server."> -<helpop key="oper" value="/OPER [login] [password] +<helpop key="oper" value="/OPER <login> <password> Attempts to authenticate a user as an IRC operator. Both successful and unsuccessful oper attempts are logged, and sent to online IRC operators."> -<helpop key="list" value="/LIST [pattern] +<helpop key="list" value="/LIST [<pattern>] Creates a list of all existing channels matching the glob pattern -[pattern], e.g. *chat* or bot*."> +<pattern>, e.g. *chat* or bot*."> <helpop key="lusers" value="/LUSERS Shows a count of local and remote users, servers and channels."> -<helpop key="userhost" value="/USERHOST [nickname] +<helpop key="userhost" value="/USERHOST <nick> [<nick>] Returns the hostname and nickname of a user, and some other miscellaneous information."> -<helpop key="away" value="/AWAY {message} +<helpop key="away" value="/AWAY [<message>] If a message is given, marks you as being away, otherwise removes your away status and previous message."> -<helpop key="ison" value="/ISON [nick] {[nick]...} +<helpop key="ison" value="/ISON <nick> [<nick> ...] Returns a subset of the nicks you give, showing only those that are currently online."> -<helpop key="invite" value="/INVITE [nick] [channel] {[time]} +<helpop key="invite" value="/INVITE <nick> <channel> [<time>] Invites a user to a channel. If the channel is NOT +A, only channel halfoperators or above can invite people. If +A is set, @@ -308,7 +325,7 @@ Invited users may override bans, +k, and similar in addition to If a time is provided, the invite expires after that time and the user can no longer use it to enter the channel."> -<helpop key="pass" value="/PASS [password] +<helpop key="pass" value="/PASS <password> This command is used by your client when setting up your IRC session to submit a server password to the @@ -316,7 +333,7 @@ server. You should not use it during an established connection."> -<helpop key="whowas" value="/WHOWAS [nick] +<helpop key="whowas" value="/WHOWAS <nick> Returns a list of times the user was seen recently on IRC along with the time they were last seen and their server."> @@ -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."> -<helpop key="whois" value="/WHOIS [nick] {server} +<helpop key="whois" value="/WHOIS <nick> [<server>] Returns the WHOIS information of a user, their channels, hostname, etc. If a second nickname or server is provided, then a whois is performed from the server where the user is actually located rather than locally, showing idle and signon times."> -<helpop key="time" value="/TIME [servermask] +<helpop key="time" value="/TIME [<server>] Returns the local time of the server, or remote time of another server."> -<helpop key="info" value="/INFO +<helpop key="info" value="/INFO [<server>] Returns information on the developers and supporters who made this IRC server possible."> -<helpop key="setname" value="/SETNAME [name] +<helpop key="setname" value="/SETNAME <name> Sets your name to the specified name."> @@ -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"> -<helpop key="userip" value="/USERIP [nicknames] +<helpop key="userip" value="/USERIP <nick> [<nick>] Returns the ip and nickname of the given users."> -<helpop key="tline" value="/TLINE [host or ip mask] +<helpop key="tline" value="/TLINE <host/IP mask> This command returns the number of local and global clients matched, and the percentage of clients matched, plus how they were matched @@ -401,12 +418,12 @@ service is temporarily closed and to try again later."> Opens the server up again for new connections."> -<helpop key="jumpserver" value="/JUMPSERVER {[newserver] [newport] [+/-flags] {:[reason]}} +<helpop key="jumpserver" value="/JUMPSERVER [<newserver> <newport> <(+|-)[flags]> :[<reason>]] Sets or cancels jumpserver mode. If no parameters are given, jumpserver mode is cancelled, if it is currently set. If parameters -are given, a server address must be given for [newserver] and a -server port must be given for [newport]. Zero or more status flags +are given, a server address must be given for <newserver> and a +server port must be given for <newport>. Zero or more status flags should be given for 'flags', from the list below (if you do not wish to specify any flags just place a '+' in this field): @@ -422,7 +439,7 @@ reason parameter is optional, and if not provided defaults to 'Please use this server/port instead' (the default given in various numeric lists)"> -<helpop key="filter" value="/FILTER [filter-definition] {[action] [flags] {[gline-duration]} :[reason]} +<helpop key="filter" value="/FILTER <filter-definition> [<action> <flags> [<gline-duration>] :<reason>] This command will add a filter when more than one parameter is given, for messages of the types specified by the flags, with the given @@ -469,19 +486,19 @@ filter will be removed. Note that if you remove a configuration-defined filter, it will reappear at next rehash unless it is also removed from the config file."> -<helpop key="ojoin" value="/OJOIN [#chan] +<helpop key="ojoin" value="/OJOIN <channel> Force joins you to the specified channel, and gives you +Y and any other configuration-defined modes on it, preventing you from being kicked. Depending on configuration, may announce that you have joined the channel on official network business."> -<helpop key="clones" value="/CLONES [limit] +<helpop key="clones" value="/CLONES <limit> Retrieves a list of users with more clones than the specified limit."> -<helpop key="check" value="/CHECK [nick|ip|hostmask|channel] {[server]} +<helpop key="check" value="/CHECK <nick|ip|hostmask|channel> [<server>] Allows opers to look up advanced information on channels, hostmasks or IP addresses, in a similar way to WHO but in more detail, displaying @@ -495,22 +512,21 @@ specified server."> Shows the time on all servers on the network."> -<helpop key="rconnect" value="/RCONNECT [source mask] [target mask] +<helpop key="rconnect" value="/RCONNECT <source mask> <target mask> -The server matching [source mask] will try to connect to the first -server in the config file matching [target mask]."> +The server matching <source mask> will try to connect to the first +server in the config file matching <target mask>."> -<helpop key="rsquit" value="/RSQUIT {[source mask]} [target mask] +<helpop key="rsquit" value="/RSQUIT <target mask> [<reason>] -Causes a remote server matching [target mask] to be disconnected from -the network, only if connected via a server matching [source mask] if -it is specified."> +Causes a remote server matching <target mask> to be disconnected from +the network."> -<helpop key="globops" value="/GLOBOPS [message] +<helpop key="globops" value="/GLOBOPS <message> Sends a message to all users with the +g snomask."> -<helpop key="cban" value="/CBAN [channel] {[duration] :[reason]} +<helpop key="cban" value="/CBAN <channel> [<duration> :[<reason>]] Sets or removes a channel ban. You must specify all three parameters to add a ban, and one parameter to remove a ban (just the channel). @@ -528,35 +544,43 @@ If no nick is given, it joins the oper doing the /SAJOIN."> Forces the user to part the channel(s)."> -<helpop key="samode" value="/SAMODE [target] +/-[modes] {[parameters for modes]} +<helpop key="samode" value="/SAMODE <target> (+|-)<modes> [<parameters for modes>] Applies the given mode change to the channel or nick specified."> -<helpop key="sanick" value="/SANICK [nick] [new nick] +<helpop key="sanick" value="/SANICK <nick> <new nick> Changes the user's nick to the new nick."> -<helpop key="saquit" value="/SAQUIT [nick] [reason] +<helpop key="sakick" value="/SAKICK <channel> <nick> <reason> + +Kicks the given user from the specified channel."> + +<helpop key="satopic" value="/SATOPIC <channel> <new topic> + +Applies the given topic to the specified channel."> + +<helpop key="saquit" value="/SAQUIT <nick> <reason> Forces user to quit with the specified reason."> -<helpop key="setidle" value="/SETIDLE [idle time] +<helpop key="setidle" value="/SETIDLE <idle time> Sets your idle time (in seconds) to the specified value."> -<helpop key="sethost" value="/SETHOST [host] +<helpop key="sethost" value="/SETHOST <host> Sets your host to the specified host."> -<helpop key="setident" value="/SETIDENT [ident] +<helpop key="setident" value="/SETIDENT <ident> Sets your ident to the specified ident."> -<helpop key="swhois" line="/SWHOIS [nick] [swhois] +<helpop key="swhois" line="/SWHOIS <nick> <swhois> Sets the user's swhois field to the given swhois."> -<helpop key="mkpasswd" value="/MKPASSWD [hashtype] [plaintext] +<helpop key="mkpasswd" value="/MKPASSWD <hashtype> <plaintext> Encodes the plaintext to a hash of the given type and displays the result."> @@ -565,28 +589,28 @@ the result."> Displays the Oper MOTD."> -<helpop key="nicklock" value="/NICKLOCK [nick] [new nick] +<helpop key="nicklock" value="/NICKLOCK <nick> <new nick> Changes the user's nick to the new nick, and forces it to remain as such for the remainder of the session."> -<helpop key="nickunlock" value="/NICKUNLOCK [nick] +<helpop key="nickunlock" value="/NICKUNLOCK <nick> Allows a previously locked user to change nicks again."> -<helpop key="chghost" value="/CHGHOST [nickname] [new hostname] +<helpop key="chghost" value="/CHGHOST <nickname> <new hostname> Changes the hostname of the user to the new hostname."> -<helpop key="chgname" value="/CHGNAME [nickname] [new name] +<helpop key="chgname" value="/CHGNAME <nickname> <new name> Changes the name of the user to the new name."> -<helpop key="chgident" value="/CHGIDENT [nickname] [new ident] +<helpop key="chgident" value="/CHGIDENT <nickname> <new ident> Changes the ident of the user to the new ident."> -<helpop key="shun" value="/SHUN [nick!user@host] {[duration] :[reason]} +<helpop key="shun" value="/SHUN <nick!user@host> [[<duration>] :<reason>] Sets or removes a shun (server side ignore) on a host and ident mask. You must specify all three parameters to add a shun, and one parameter @@ -596,13 +620,13 @@ The duration may be specified in seconds, or in the format 1y2w3d4h5m6s - meaning one year, two weeks, three days, 4 hours, 5 minutes and 6 seconds. All fields in this format are optional."> -<helpop key="die" value="/DIE [password] +<helpop key="die" value="/DIE <password> This command shuts down the local server. A single parameter is required, which must match the password in the configuration for the command to function."> -<helpop key="restart" value="/RESTART [password] +<helpop key="restart" value="/RESTART <password> This command restarts the local server. A single parameter is required, which must match the password in the configuration for the @@ -612,23 +636,23 @@ command to function."> Shows all currently available commands."> -<helpop key="kill" value="/KILL [user] [reason] +<helpop key="kill" value="/KILL <user> <reason> This command will disconnect a user from IRC with the given reason."> -<helpop key="rehash" value="/REHASH [mask] +<helpop key="rehash" value="/REHASH <mask> This command will cause the server configuration file to be reread and values reinitialized for all servers matching the server mask, or the local server if one is not specified."> -<helpop key="connect" value="/CONNECT [servermask] +<helpop key="connect" value="/CONNECT <servermask> Add a connection to the server matching the given server mask. You must have configured the server for linking in your configuration file before trying to link them."> -<helpop key="squit" value="/SQUIT [servermask] +<helpop key="squit" value="/SQUIT <servermask> Disconnects the server matching the given server mask from this server."> @@ -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."> -<helpop key="loadmodule" value="/LOADMODULE [filename.so] +<helpop key="loadmodule" value="/LOADMODULE <filename.so> Loads the specified module into the local server."> -<helpop key="unloadmodule" value="/UNLOADMODULE [filename.so] +<helpop key="unloadmodule" value="/UNLOADMODULE <filename.so> Unloads a module from the local server. The module cannot have the static flag set (see the output of /MODULES)."> -<helpop key="reloadmodule" value="/RELOADMODULE [filename.so] +<helpop key="reloadmodule" value="/RELOADMODULE <filename.so> Unloads and reloads a module on the local server. This module cannot have the static flag set (see the output of /MODULES)."> -<helpop key="loadmodule" value="/GLOADMODULE [filename.so] +<helpop key="gloadmodule" value="/GLOADMODULE <filename.so> Loads the specified module on all linked servers."> -<helpop key="unloadmodule" value="/GUNLOADMODULE [filename.so] +<helpop key="gunloadmodule" value="/GUNLOADMODULE <filename.so> Unloads a module from all linked servers. The module cannot have the static flag set (see the output of /MODULES)."> -<helpop key="reloadmodule" value="/GRELOADMODULE [filename.so] +<helpop key="greloadmodule" value="/GRELOADMODULE <filename.so> Unloads and reloads a module on all linked servers. This module cannot have the static flag set (see the output of /MODULES)."> -<helpop key="kline" value="/KLINE [user@host] {[duration] :[reason]} +<helpop key="kline" value="/KLINE <user@host> [<duration> :<reason>] Sets or removes a k-line (local host based ban) on a host and ident mask. You must specify all three parameters to add a ban, and one parameter @@ -675,7 +699,7 @@ The duration may be specified in seconds, or in the format 1y2w3d4h5m6s - meaning one year, two weeks, three days, 4 hours, 5 minutes and 6 seconds. All fields in this format are optional."> -<helpop key="zline" value="/ZLINE [ipmask] {[duration] :[reason]} +<helpop key="zline" value="/ZLINE <ipmask> [<duration> :<reason>] Sets or removes a z-line (ip based ban) on an ip range mask. You must specify all three parameters to add a ban, and one parameter @@ -685,7 +709,7 @@ The duration may be specified in seconds, or in the format 1y2w3d4h5m6s - meaning one year, two weeks, three days, 4 hours, 5 minutes and 6 seconds. All fields in this format are optional."> -<helpop key="qline" value="/QLINE [nickmask] {[duration] :[reason]} +<helpop key="qline" value="/QLINE <nickmask> [<duration> :<reason>] Sets or removes a q-line (nick based ban) on a nick mask. You must specify all three parameters to add a ban, and one parameter @@ -695,7 +719,7 @@ The duration may be specified in seconds, or in the format 1y2w3d4h5m6s - meaning one year, two weeks, three days, 4 hours, 5 minutes and 6 seconds. All fields in this format are optional."> -<helpop key="gline" value="/GLINE [user@host] {[duration] :[reason]} +<helpop key="gline" value="/GLINE <user@host> [<duration> :<reason>] Sets or removes a g-line (host based ban) on host mask. You must specify all three parameters to add a ban, and one @@ -705,7 +729,7 @@ The duration may be specified in seconds, or in the format 1y2w3d4h5m6s - meaning one year, two weeks, three days, 4 hours, 5 minutes and 6 seconds. All fields in this format are optional."> -<helpop key="eline" value="/ELINE [user@host] {[duration] :[reason]} +<helpop key="eline" value="/ELINE <user@host> [<duration> :<reason>] Sets or removes a e-line (local ban exception) on host mask. You must specify at least 3 parameters to add an exception, and one @@ -720,19 +744,11 @@ be negated by an eline on *@<ip>, bans on *@<host> can be negated by elines on *@<ip>, or *@<host>, and bans on <ident>@* or <ident>@<host> can be negated by any eline that matches."> -<helpop key="wallops" value="/WALLOPS [message] +<helpop key="wallops" value="/WALLOPS <message> Sends a message to all +w users."> -<helpop key="sakick" value="/SAKICK [#chan] [nick] [reason] - -Kicks the given user from the specified channel."> - -<helpop key="satopic" value="/SATOPIC [#chan] [new topic] - -Applies the given topic to the specified channel."> - -<helpop key="rline" value="/RLINE [regex] {[duration] :[reason]} +<helpop key="rline" value="/RLINE <regex> [<duration> :<reason>] Sets or removes an r-line (regex line) on a n!u@h\\sgecos mask. You must specify all three parameters to add an rline, and one parameter @@ -747,10 +763,6 @@ The duration may be specified in seconds, or in the format This command clears the DNS cache of the specified server. If no server is specified, the local server's DNS cache will be cleared."> -<helpop key="reload" value="/RELOAD [core command] - -Reloads the specified core command."> - <helpop key="close" value="/CLOSE Closes all unregistered connections to the local server."> @@ -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 <mask> Receives server notices specified by <mask> (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."> <helpop key="chmodes" value="Channel Modes ------------- - v [nickname] Gives voice to [nickname], allowing them to speak + v <nickname> Gives voice to <nickname>, allowing them to speak while the channel is +m. - h [nickname] Gives halfop status to [nickname] (requires + h <nickname> Gives halfop status to <nickname> (requires customprefix module). - o [nickname] Gives op status to [nickname]. - a [nickname] Gives protected status to [nickname], preventing + o <nickname> Gives op status to <nickname>. + a <nickname> Gives protected status to <nickname>, preventing them from them from being kicked (+q only, requires customprefix module). - q [nickname] Gives owner status to [nickname], preventing them + q <nickname> Gives owner status to <nickname>, preventing them from being kicked (Services or only, requires customprefix module). - b [hostmask] Bans [hostmask] from the channel. - e [hostmask] Excepts [hostmask] from bans (requires + b <hostmask> Bans <hostmask> from the channel. + e <hostmask> Excepts <hostmask> from bans (requires banexception module). - I [hostmask] Excepts [hostmask] from +i, allowing matching + I <hostmask> Excepts <hostmask> from +i, allowing matching users to join while the channel is invite-only (requires inviteexception module). c Blocks messages containing mIRC color codes (requires blockcolor module). - d [time] Blocks messages to a channel from new users - until they have been in the channel for [time] + d <time> Blocks messages to a channel from new users + until they have been in the channel for <time> seconds (requires delaymsg module). - f [*][lines]:[sec] Kicks on text flood equal to or above the + f [*]<lines>:<sec> Kicks on text flood equal to or above the specified rate. With *, the user is banned (requires messageflood module). i Makes the channel invite-only. Users can only join if an operator uses /INVITE to invite them. - j [joins]:[sec] Limits joins to the specified rate (requires + j <joins>:<sec> Limits joins to the specified rate (requires joinflood module). - k [key] Set the channel key (password) to [key]. - l [limit] Set the maximum allowed users to [limit]. + k <key> Set the channel key (password) to <key>. + l <limit> Set the maximum allowed users to <limit>. m Enable moderation. Only users with +v, +h, or +o can speak. n Blocks users who are not members of the channel @@ -860,8 +872,8 @@ 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 <flag>:<banmask> Adds basic channel access controls of <flag> to + <banmask>, 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 <changes>:<sec> 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 <seconds> 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 <channel> If the channel reaches its limit set by +l, + redirect users to <channel> (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 <mask> Blocks messages matching the given glob mask (requires chanfilter module). - X [mode] Makes channel operators immune to the specified + X <mode> 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 # ###################### -<helpop key="stats" value="/STATS [symbol] +<helpop key="stats" value="/STATS <symbol> Shows various server statistics. Depending on configuration, some symbols may be only available to opers. @@ -1021,46 +1033,49 @@ setting +I <extban>. Matching extbans: - j:#channel Matches anyone in #channel. Does not support wildcards - for #channel (requires channelban module). - r:realname Matches users with a matching realname (requires gecosban + j:<channel> Matches anyone in the given channel. Does not support + wildcards (requires channelban module). + r:<realname> Matches users with a matching realname (requires gecosban module). - s:server Matches users on a matching server (requires serverban + s:<server> Matches users on a matching server (requires serverban module). - z:fingerprint Matches users with a matching SSL certificate fingerprint + z:<certfp> Matches users with a matching SSL certificate fingerprint (requires sslmodes module) - O:opertype Matches IRCops of a matching type, mostly useful as an + O:<opertype> Matches IRCops of a matching type, mostly useful as an an invite exception (requires operchans module). - R:account Matches users logged into a matching account (requires + R:<account> Matches users logged into a matching account (requires services account module). Acting extbans: - c:<ban> Blocks any messages that contain color codes from + c:<banmask> Blocks any messages that contain color codes from matching users (requires blockcolor module). - m:<ban> Blocks messages from matching users (requires muteban + m:<banmask> Blocks messages from matching users (requires muteban module). Users with +v or above are not affected. - p:<ban> Blocks part messages from matching users (requires + p:<banmask> Blocks part messages from matching users (requires nopartmsg module). - A:<ban> Blocks invites by matching users even when +A is set + A:<banmask> Blocks invites by matching users even when +A is set (requires allowinvite module). - B:<ban> Blocks all capital or nearly all capital messages from + B:<banmask> Blocks all capital or nearly all capital messages from matching users (requires blockcaps module). - C:<ban> Blocks CTCPs from matching users (requires noctcp + C:<banmask> Blocks CTCPs from matching users (requires noctcp module). - N:<ban> Blocks nick changes from matching users (requires + 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:<ban> Blocks kicks by matching users (requires nokicks + Q:<banmask> Blocks kicks by matching users (requires nokicks module). - S:<ban> Strips color/bold/underline from messages from matching + S:<banmask> Strips color/bold/underline from messages from matching users (requires stripcolor module). - T:<ban> Blocks notices from matching users (requires nonotice + T:<banmask> Blocks notices from matching users (requires nonotice module). - U:<ban> Blocks unregistered users matching the given ban. - (requires m_services_account) + U:<banmask> 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, -matched against users as for a normal ban, or a matching extban. +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: diff --git a/docs/conf/helpop.conf.example b/docs/conf/helpop.conf.example index 7d505b261..c17ae87a5 100644 --- a/docs/conf/helpop.conf.example +++ b/docs/conf/helpop.conf.example @@ -68,8 +68,8 @@ CONNECT SQUIT RCONNECT RSQUIT DIE RESTART REHASH CLEARCACHE LOADMODULE UNLOADMODULE RELOADMODULE GLOADMODULE GUNLOADMODULE -GRELOADMODULE RELOAD CLOSE -LOCKSERV UNLOCKSERV JUMPSERVER"> +GRELOADMODULE CLOSE JUMPSERVER +LOCKSERV UNLOCKSERV"> <helpop key="umodes" value="User Modes ---------- @@ -79,7 +79,7 @@ LOCKSERV UNLOCKSERV JUMPSERVER"> 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 <mask> Receives server notices specified by <mask> (IRCop only). r Marks as a having a registered nickname (requires services account module). @@ -112,48 +112,49 @@ LOCKSERV UNLOCKSERV JUMPSERVER"> <helpop key="chmodes" value="Channel Modes ------------- - v [nickname] Gives voice to [nickname], allowing them to speak + v <nickname> Gives voice to <nickname>, allowing them to speak while the channel is +m. - h [nickname] Gives halfop status to [nickname] (requires + h <nickname> Gives halfop status to <nickname> (requires customprefix module). - o [nickname] Gives op status to [nickname]. - a [nickname] Gives protected status to [nickname], preventing + o <nickname> Gives op status to <nickname>. + a <nickname> Gives protected status to <nickname>, preventing them from them from being kicked (+q only, requires customprefix module). - q [nickname] Gives owner status to [nickname], preventing them + q <nickname> Gives owner status to <nickname>, preventing them from being kicked (Services or only, requires customprefix module). - b [hostmask] Bans [hostmask] from the channel. - e [hostmask] Excepts [hostmask] from bans (requires + b <hostmask> Bans <hostmask> from the channel. + e <hostmask> Excepts <hostmask> from bans (requires banexception module). - I [hostmask] Excepts [hostmask] from +i, allowing matching + I <hostmask> Excepts <hostmask> from +i, allowing matching users to join while the channel is invite-only (requires inviteexception module). c Blocks messages containing mIRC color codes (requires blockcolor module). - f [*][lines]:[sec] Kicks on text flood equal to or above the + d <time> Blocks messages to a channel from new users + until they have been in the channel for <time> + seconds (requires delaymsg module). + f [*]<lines>:<sec> Kicks on text flood equal to or above the specified rate. With *, the user is banned (requires messageflood module). - g [mask] Blocks messages matching the given blob mask - (requires chanfilter module). i Makes the channel invite-only. Users can only join if an operator uses /INVITE to invite them. - j [joins]:[sec] Limits joins to the specified rate (requires + j <joins>:<sec> Limits joins to the specified rate (requires joinflood module). - k [key] Set the channel key (password) to [key]. - l [limit] Set the maximum allowed users to [limit]. + k <key> Set the channel key (password) to <key>. + l <limit> Set the maximum allowed users to <limit>. m Enable moderation. Only users with +v, +h, or +o can speak. n Blocks users who are not members of the channel from messaging it. - p Make channel private, hiding it in user's whoises + 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). - s Make channel secret, hiding it in user's whoises + s Make channel secret, hiding it in users' whoises and /LIST. t Prevents users without +h or +o from changing the topic. @@ -161,8 +162,8 @@ 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 <flag>:<banmask> Adds basic channel access controls of <flag> to + <banmask>, 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 <changes>:<sec> 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 <seconds> 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 <channel> If the channel reaches its limit set by +l, + redirect users to <channel> (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 <mask> Blocks messages matching the given glob mask + (requires chanfilter module). + X <mode> 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."> <helpop key="extbans" value="Extended Bans ---------- - c:n!u@h Blocks any messages that contain color codes from - matching users (requires blockcolor module). - j:#channel Prevents anyone in #channel from joining the channel - (requires channelban module). - m:n!u@h Blocks messages from matching users (requires muteban - module). - p:n!u@h Blocks part messages from matching users (requires - nopartmsg module). - r:realname Prevents users with a matching realname from joining - the channel (requires gecosban module). - s:server Prevents users on a matching server from joining the - channel (requires services account). - - A:n!u@h Blocks invites by matching users even when +A is set - (requires allowinvite module). - B:n!u@h Blocks all capital or nearly all capital messages from - matching users (requires blockcaps module). - C:n!u@h Blocks CTCPs from matching users (requires noctcp - module). - M:account Blocks messages from users logged into a matching - account (requires services account module). - N:n!u@h Blocks nick changes from matching users (requires - nonicks module). - O:opertype Prevents IRCops of the specified opertype from joining - the channel, mostly useful as an invite exception (IRCop - only, requires operchans module). - Q:n!u@h Blocks kicks by matching users (requires nokicks - module). - R:account Prevents users logged into a matching account from - joining the channel (requires services account module). - S:n!u@h Strips color/bold/underline from messages from matching - users (requires stripcolor module). - T:n!u@h Blocks notices from matching users (requires nonotice - module). - U:n!u@h Blocks unregistered users matching the given ban. - (requires m_services_account) - z:certfp Blocks users having the given certificate fingerprint - (requires m_sslmodes) - - Redirect n!u@h#channel will redirect the banned user to #channel - when they try to join (requires banredirect module). - -All extbans that prevent users from joining may by used for ban -exceptions and invite exceptions (invex), and extbans blocking -specific actions may be used for ban exceptions to exempt people from -either wider extbans or the restrictive mode matching the extban, -where one exists."> +Extbans are split into two types; matching extbans, which match on +users in additional ways, and acting extbans, which restrict users +in different ways to a standard ban. + +To use an extban, simply set +b <ban> or +e <ban> with it as the ban, +instead of a normal nick!user@host mask, to ban or exempt matching +users. Ban exceptions on acting extbans exempt that user from matching +an extban of that type, and from any channel mode corresponding to the +restriction. Matching extbans may also be used for invite exceptions by +setting +I <extban>. + +Matching extbans: + + j:<channel> Matches anyone in the given channel. Does not support + wildcards (requires channelban module). + r:<realname> Matches users with a matching realname (requires gecosban + module). + s:<server> Matches users on a matching server (requires serverban + module). + z:<certfp> Matches users having the given SSL certificate + fingerprint (requires sslmodes module). + O:<opertype> Matches IRCops of a matching type, mostly useful as an + an invite exception (requires operchans module). + R:<account> Matches users logged into a matching account (requires + services account module). + +Acting extbans: + + c:<banmask> Blocks any messages that contain color codes from + matching users (requires blockcolor module). + m:<banmask> Blocks messages from matching users (requires muteban + module). Users with +v or above are not affected. + p:<banmask> Blocks part messages from matching users (requires + nopartmsg module). + A:<banmask> Blocks invites by matching users even when +A is set + (requires allowinvite module). + B:<banmask> Blocks all capital or nearly all capital messages from + 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 + module). + S:<banmask> Strips color/bold/underline from messages from matching + users (requires stripcolor module). + T:<banmask> Blocks notices from matching users (requires nonotice + module). + U:<banmask> 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. <bind address="" port="7000,7001" type="servers"> <bind address="1.2.3.4" port="7005" type="servers" ssl="openssl"> @@ -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 @@ #<blockamsg delay="3" action="killopers"> #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# -# Block CAPS module: Blocking all-CAPS messages with channel mode +B. +# Block CAPS module: Adds channel mode +B, blocks all-CAPS messages. #<module name="m_blockcaps.so"> # #-#-#-#-#-#-#-#-#-#-#- 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. # #<blockcaps percent="50" # minlen="5" # capsmap="ABCDEFGHIJKLMNOPQRSTUVWXYZ! "> @@ -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. #<module name="m_callerid.so"> # #-#-#-#-#-#-#-#-#-#-#- 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. #<module name="m_cban.so"> @@ -449,7 +449,7 @@ #<module name="m_chgident.so"> #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# -# 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. #<module name="m_chgname.so"> @@ -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 +# <connect:modes> to include the +x mode. The example <connect> tag +# shows this. See the m_conn_umodes module for more information. #<module name="m_cloaking.so"> # #-#-#-#-#-#-#-#-#-#-#- 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 <module> tag for info on availability. # # # #<filteropts engine="glob"> # # # @@ -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. #<module name="m_globalload.so"> @@ -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. #<module name="m_nicklock.so"> @@ -1231,8 +1234,13 @@ #<operlog tosnomask="off"> #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# -# 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. #<module name="m_operprefix.so"> # # 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. #<module name="m_regex_tre.so"> @@ -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. #<module name="m_sethost.so"> #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# 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"> <module name="m_deaf.so"> -<module name="m_dnsbl.so"> +<module name="m_dnsbl.so"> <module name="m_gecosban.so"> <module name="m_globalload.so"> <module name="m_ident.so"> @@ -246,8 +246,8 @@ <showwhois opersonly="yes" showfromopers="yes"> #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# -# 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). #<module name="m_sslmodes.so"> @@ -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 # "* <user> 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 <module> tag for info on availability. # # # -<filteropts engine="glob"> +<filteropts engine="glob"> # # # 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. #<module name="m_ssl_gnutls.so"> # #-#-#-#-#-#-#-#-#-#-#- 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 <typename ReturnType, typename Param1, typename Param2, typename Param3 virtual ~HandlerBase8() { } }; -template <typename HandlerType> class CoreExport caller +template <typename HandlerType> class caller { public: HandlerType* target; @@ -201,118 +201,118 @@ template <typename HandlerType> class CoreExport caller virtual ~caller() { } }; -template <typename ReturnType> class CoreExport caller0 : public caller< HandlerBase0<ReturnType> > +template <typename ReturnType> class caller0 : public caller< HandlerBase0<ReturnType> > { public: caller0(HandlerBase0<ReturnType>* initial) : caller< HandlerBase0<ReturnType> >::caller(initial) { } - virtual ReturnType operator() () + ReturnType operator() () { return this->target->Call(); } }; -template <typename ReturnType, typename Param1> class CoreExport caller1 : public caller< HandlerBase1<ReturnType, Param1> > +template <typename ReturnType, typename Param1> class caller1 : public caller< HandlerBase1<ReturnType, Param1> > { public: caller1(HandlerBase1<ReturnType, Param1>* initial) : caller< HandlerBase1<ReturnType, Param1> >(initial) { } - virtual ReturnType operator() (Param1 param1) + ReturnType operator() (Param1 param1) { return this->target->Call(param1); } }; -template <typename ReturnType, typename Param1, typename Param2> class CoreExport caller2 : public caller< HandlerBase2<ReturnType, Param1, Param2> > +template <typename ReturnType, typename Param1, typename Param2> class caller2 : public caller< HandlerBase2<ReturnType, Param1, Param2> > { public: caller2(HandlerBase2<ReturnType, Param1, Param2>* initial) : caller< HandlerBase2<ReturnType, Param1, Param2> >(initial) { } - virtual ReturnType operator() (Param1 param1, Param2 param2) + ReturnType operator() (Param1 param1, Param2 param2) { return this->target->Call(param1, param2); } }; -template <typename ReturnType, typename Param1, typename Param2, typename Param3> class CoreExport caller3 : public caller< HandlerBase3<ReturnType, Param1, Param2, Param3> > +template <typename ReturnType, typename Param1, typename Param2, typename Param3> class caller3 : public caller< HandlerBase3<ReturnType, Param1, Param2, Param3> > { public: caller3(HandlerBase3<ReturnType, Param1, Param2, Param3>* initial) : caller< HandlerBase3<ReturnType, Param1, Param2, Param3> >(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 <typename ReturnType, typename Param1, typename Param2, typename Param3, typename Param4> class CoreExport caller4 : public caller< HandlerBase4<ReturnType, Param1, Param2, Param3, Param4> > +template <typename ReturnType, typename Param1, typename Param2, typename Param3, typename Param4> class caller4 : public caller< HandlerBase4<ReturnType, Param1, Param2, Param3, Param4> > { public: caller4(HandlerBase4<ReturnType, Param1, Param2, Param3, Param4>* initial) : caller< HandlerBase4<ReturnType, Param1, Param2, Param3, Param4> >(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 <typename ReturnType, typename Param1, typename Param2, typename Param3, typename Param4, typename Param5> class CoreExport caller5 : public caller< HandlerBase5<ReturnType, Param1, Param2, Param3, Param4, Param5> > +template <typename ReturnType, typename Param1, typename Param2, typename Param3, typename Param4, typename Param5> class caller5 : public caller< HandlerBase5<ReturnType, Param1, Param2, Param3, Param4, Param5> > { public: caller5(HandlerBase5<ReturnType, Param1, Param2, Param3, Param4, Param5>* initial) : caller< HandlerBase5<ReturnType, Param1, Param2, Param3, Param4, Param5> >(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 <typename ReturnType, typename Param1, typename Param2, typename Param3, typename Param4, typename Param5, typename Param6> class CoreExport caller6 : public caller< HandlerBase6<ReturnType, Param1, Param2, Param3, Param4, Param5, Param6> > +template <typename ReturnType, typename Param1, typename Param2, typename Param3, typename Param4, typename Param5, typename Param6> class caller6 : public caller< HandlerBase6<ReturnType, Param1, Param2, Param3, Param4, Param5, Param6> > { public: caller6(HandlerBase6<ReturnType, Param1, Param2, Param3, Param4, Param5, Param6>* initial) : caller< HandlerBase6<ReturnType, Param1, Param2, Param3, Param4, Param5, Param6> >(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 <typename ReturnType, typename Param1, typename Param2, typename Param3, typename Param4, typename Param5, typename Param6, typename Param7> class CoreExport caller7 : public caller< HandlerBase7<ReturnType, Param1, Param2, Param3, Param4, Param5, Param6, Param7> > +template <typename ReturnType, typename Param1, typename Param2, typename Param3, typename Param4, typename Param5, typename Param6, typename Param7> class caller7 : public caller< HandlerBase7<ReturnType, Param1, Param2, Param3, Param4, Param5, Param6, Param7> > { public: caller7(HandlerBase7<ReturnType, Param1, Param2, Param3, Param4, Param5, Param6, Param7>* initial) : caller< HandlerBase7<ReturnType, Param1, Param2, Param3, Param4, Param5, Param6, Param7> >(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 <typename ReturnType, typename Param1, typename Param2, typename Param3, typename Param4, typename Param5, typename Param6, typename Param7, typename Param8> class CoreExport caller8 : public caller< HandlerBase8<ReturnType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8> > +template <typename ReturnType, typename Param1, typename Param2, typename Param3, typename Param4, typename Param5, typename Param6, typename Param7, typename Param8> class caller8 : public caller< HandlerBase8<ReturnType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8> > { public: caller8(HandlerBase8<ReturnType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8>* initial) : caller< HandlerBase8<ReturnType, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8> >(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 @@ <dict> <key>Iterations</key> <integer>3</integer> + <key>KeepAlive</key> + <true/> <key>Label</key> <string>org.inspircd</string> <key>LowPriorityIO</key> <true/> <key>Nice</key> <integer>1</integer> - <key>OnDemand</key> - <false/> <key>Program</key> <string>@BINARY_DIR@/inspircd</string> <key>ProgramArguments</key> 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 = "<servername> [<remote-server>]"; + syntax = "<servername>"; } /** Handle command. @@ -119,7 +119,7 @@ class CommandSquit : public Command : Command(parent, "SQUIT", 1, 2) { flags_needed = 'o'; - syntax = "<servername> [<reason>]"; + syntax = "<servername>"; } /** 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 = "<nick> {<nick>}"; + syntax = "<nick> [<nick> ...]"; } /** 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<void, bool>* 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 <ldap.h> #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 <openssl/err.h> #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 = "{[+|-]<nicks>}|*}"; + syntax = "*|(+|-)<nick>[,(+|-)<nick> ...]"; 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 = "{[+|-]<nick> <time>|HELP|LIST}"; + syntax = "[(+|-)<nick> [<time>]]|[LIST|HELP]"; /* XXX we need to fix this so it can work with translation stuff (i.e. move +- into a seperate param */ } @@ -205,7 +205,7 @@ class CommandDccallow : public Command void DisplayHelp(User* user) { - user->WriteNumeric(998, ":DCCALLOW [<+|->nick [time]] [list] [help]"); + user->WriteNumeric(998, ":DCCALLOW [(+|-)<nick> [<time>]]|[LIST|HELP]"); user->WriteNumeric(998, ":You may allow DCCs from specific users by specifying a"); user->WriteNumeric(998, ":DCC allow for the user you want to receive DCCs from."); user->WriteNumeric(998, ":For example, to allow the user Brain to send you inspircd.exe"); diff --git a/src/modules/m_denychans.cpp b/src/modules/m_denychans.cpp index 184134025..6378ba273 100644 --- a/src/modules/m_denychans.cpp +++ b/src/modules/m_denychans.cpp @@ -56,7 +56,7 @@ class ModuleDenyChannels : public Module if (InspIRCd::Match(redirect, j->second->getString("name"))) { bool goodchan = false; - ConfigTagList goodchans = ServerInstance->Config->ConfTags("badchan"); + ConfigTagList goodchans = ServerInstance->Config->ConfTags("goodchan"); for (ConfigIter k = goodchans.first; k != goodchans.second; ++k) { if (InspIRCd::Match(redirect, k->second->getString("name"))) diff --git a/src/modules/m_hideoper.cpp b/src/modules/m_hideoper.cpp index d3c2bf444..5b226f3b8 100644 --- a/src/modules/m_hideoper.cpp +++ b/src/modules/m_hideoper.cpp @@ -76,6 +76,29 @@ class ModuleHideOper : public Module line.clear(); } } + + ModResult OnStats(char symbol, User* user, string_list& results) CXX11_OVERRIDE + { + if (symbol != 'P') + return MOD_RES_PASSTHRU; + + unsigned int count = 0; + const UserManager::OperList& opers = ServerInstance->Users->all_opers; + for (UserManager::OperList::const_iterator i = opers.begin(); i != opers.end(); ++i) + { + User* oper = *i; + if (!oper->server->IsULine() && (user->IsOper() || !oper->IsModeSet(hm))) + { + LocalUser* lu = IS_LOCAL(oper); + results.push_back("249 " + user->nick + " :" + oper->nick + " (" + oper->ident + "@" + oper->dhost + ") Idle: " + + (lu ? ConvToStr(ServerInstance->Time() - lu->idle_lastmsg) + " secs" : "unavailable")); + count++; + } + } + results.push_back("249 "+user->nick+" :"+ConvToStr(count)+" OPER(s)"); + + return MOD_RES_DENY; + } }; MODULE_INIT(ModuleHideOper) diff --git a/src/modules/m_ojoin.cpp b/src/modules/m_ojoin.cpp index e4314873b..120715429 100644 --- a/src/modules/m_ojoin.cpp +++ b/src/modules/m_ojoin.cpp @@ -57,7 +57,6 @@ class CommandOjoin : public SplitCommand if (notice) { - channel = ServerInstance->FindChan(parameters[0]); channel->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s joined on official network business.", parameters[0].c_str(), user->nick.c_str()); ServerInstance->PI->SendChannelNotice(channel, 0, user->nick + " joined on official network business."); diff --git a/src/modules/m_permchannels.cpp b/src/modules/m_permchannels.cpp index d23af04bc..60c4578c5 100644 --- a/src/modules/m_permchannels.cpp +++ b/src/modules/m_permchannels.cpp @@ -144,12 +144,7 @@ static bool WriteDatabase(PermChannel& permchanmode, Module* mod, bool save_list stream.close(); #ifdef _WIN32 - if (remove(permchannelsconf.c_str())) - { - ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "Cannot remove old database! %s (%d)", strerror(errno), errno); - ServerInstance->SNO->WriteToSnoMask('a', "database: cannot remove old database: %s (%d)", strerror(errno), errno); - return false; - } + remove(permchannelsconf.c_str()); #endif // Use rename to move temporary to new db - this is guarenteed not to fuck up, even in case of a crash. if (rename(permchannelsnewconf.c_str(), permchannelsconf.c_str()) < 0) diff --git a/src/modules/m_spanningtree/capab.cpp b/src/modules/m_spanningtree/capab.cpp index e242bcd4a..f27fe8889 100644 --- a/src/modules/m_spanningtree/capab.cpp +++ b/src/modules/m_spanningtree/capab.cpp @@ -153,7 +153,13 @@ void TreeSocket::SendCapabilities(int phase) extra+ " PREFIX="+ServerInstance->Modes->BuildPrefixes()+ " CHANMODES="+ServerInstance->Modes->GiveModeList(MODETYPE_CHANNEL)+ - " USERMODES="+ServerInstance->Modes->GiveModeList(MODETYPE_USER) + " USERMODES="+ServerInstance->Modes->GiveModeList(MODETYPE_USER)+ + // XXX: Advertise the presence or absence of m_globops in CAPAB CAPABILITIES. + // Services want to know about it, and since m_globops was not marked as VF_(OPT)COMMON + // in 2.0, we advertise it here to not break linking to previous versions. + // Protocol version 1201 (1.2) does not have this issue because we advertise m_globops + // to 1201 protocol servers irrespectively of its module flags. + (ServerInstance->Modules->Find("m_globops.so") != NULL ? " GLOBOPS=1" : " GLOBOPS=0") ); this->WriteLine("CAPAB END"); diff --git a/src/modules/m_spanningtree/commands.h b/src/modules/m_spanningtree/commands.h index 67e2d43d6..3047e7e60 100644 --- a/src/modules/m_spanningtree/commands.h +++ b/src/modules/m_spanningtree/commands.h @@ -130,7 +130,7 @@ class CommandFJoin : public ServerCommand * @param newname The new name of the channel; must be the same or a case change of the current name */ static void LowerTS(Channel* chan, time_t TS, const std::string& newname); - void ProcessModeUUIDPair(const std::string& item, TreeSocket* src_socket, Channel* chan, irc::modestacker* modestack); + void ProcessModeUUIDPair(const std::string& item, TreeServer* sourceserver, Channel* chan, irc::modestacker* modestack); public: CommandFJoin(Module* Creator) : ServerCommand(Creator, "FJOIN", 3) { } CmdResult Handle(User* user, std::vector<std::string>& params); diff --git a/src/modules/m_spanningtree/fjoin.cpp b/src/modules/m_spanningtree/fjoin.cpp index d8027628f..d5b80fcb1 100644 --- a/src/modules/m_spanningtree/fjoin.cpp +++ b/src/modules/m_spanningtree/fjoin.cpp @@ -148,7 +148,7 @@ CmdResult CommandFJoin::Handle(User* srcuser, std::vector<std::string>& params) } irc::modestacker modestack(true); - TreeSocket* src_socket = TreeServer::Get(srcuser)->GetSocket(); + TreeServer* const sourceserver = TreeServer::Get(srcuser); /* Now, process every 'modes,uuid' pair */ irc::tokenstream users(params.back()); @@ -156,7 +156,7 @@ CmdResult CommandFJoin::Handle(User* srcuser, std::vector<std::string>& params) irc::modestacker* modestackptr = (apply_other_sides_modes ? &modestack : NULL); while (users.GetToken(item)) { - ProcessModeUUIDPair(item, src_socket, chan, modestackptr); + ProcessModeUUIDPair(item, sourceserver, chan, modestackptr); } /* Flush mode stacker if we lost the FJOIN or had equal TS */ @@ -166,7 +166,7 @@ CmdResult CommandFJoin::Handle(User* srcuser, std::vector<std::string>& params) return CMD_SUCCESS; } -void CommandFJoin::ProcessModeUUIDPair(const std::string& item, TreeSocket* src_socket, Channel* chan, irc::modestacker* modestack) +void CommandFJoin::ProcessModeUUIDPair(const std::string& item, TreeServer* sourceserver, Channel* chan, irc::modestacker* modestack) { std::string::size_type comma = item.find(','); @@ -180,6 +180,7 @@ void CommandFJoin::ProcessModeUUIDPair(const std::string& item, TreeSocket* src_ return; } + TreeSocket* src_socket = sourceserver->GetSocket(); /* Check that the user's 'direction' is correct */ TreeServer* route_back_again = TreeServer::Get(who); if (route_back_again->GetSocket() != src_socket) @@ -202,7 +203,7 @@ void CommandFJoin::ProcessModeUUIDPair(const std::string& item, TreeSocket* src_ } } - Membership* memb = chan->ForceJoin(who, NULL, route_back_again->bursting); + Membership* memb = chan->ForceJoin(who, NULL, sourceserver->bursting); if (!memb) return; diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index a17fb203c..ee4c4bdd8 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -694,6 +694,7 @@ void ModuleSpanningTree::OnUnloadModule(Module* mod) return; ServerInstance->PI->SendMetaData("modules", "-" + mod->ModuleSourceFile); +restart: // Close all connections which use an IO hook provided by this module const TreeServer::ChildServers& list = Utils->TreeRoot->GetChildren(); for (TreeServer::ChildServers::const_iterator i = list.begin(); i != list.end(); ++i) @@ -703,6 +704,8 @@ void ModuleSpanningTree::OnUnloadModule(Module* mod) { sock->SendError("SSL module unloaded"); sock->Close(); + // XXX: The list we're iterating is modified by TreeSocket::Squit() which is called by Close() + goto restart; } } diff --git a/src/modules/m_spanningtree/nick.cpp b/src/modules/m_spanningtree/nick.cpp index ecec849ee..686a2cc4c 100644 --- a/src/modules/m_spanningtree/nick.cpp +++ b/src/modules/m_spanningtree/nick.cpp @@ -42,21 +42,22 @@ CmdResult CommandNick::HandleRemote(RemoteUser* user, std::vector<std::string>& * On nick messages, check that the nick doesn't already exist here. * If it does, perform collision logic. */ + bool callfnc = true; User* x = ServerInstance->FindNickOnly(params[0]); - if ((x) && (x != user)) + if ((x) && (x != user) && (x->registered == REG_ALL)) { /* x is local, who is remote */ int collideret = Utils->DoCollision(x, TreeServer::Get(user), newts, user->ident, user->GetIPString(), user->uuid); if (collideret != 1) { - /* - * Remote client lost, or both lost, parsing or passing on this - * nickchange would be pointless, as the incoming client's server will - * soon receive SAVE to change its nick to its UID. :) -- w00t - */ - return CMD_FAILURE; + // Remote client lost, or both lost, rewrite this nick change as a change to uuid before + // forwarding and don't call ChangeNick() because DoCollision() has done it already + params[0] = user->uuid; + callfnc = false; } } - user->ChangeNick(params[0], newts); + if (callfnc) + user->ChangeNick(params[0], newts); + return CMD_SUCCESS; } diff --git a/src/modules/m_spanningtree/server.cpp b/src/modules/m_spanningtree/server.cpp index 69cae001c..f232d57d6 100644 --- a/src/modules/m_spanningtree/server.cpp +++ b/src/modules/m_spanningtree/server.cpp @@ -148,7 +148,7 @@ bool TreeSocket::Outbound_Reply_Server(parameterlist ¶ms) return true; } - this->SendError("Invalid credentials (check the other server's linking snomask for more information)"); + this->SendError("Mismatched server name or password (check the other server's snomask output for details - e.g. umode +s +Ll)"); ServerInstance->SNO->WriteToSnoMask('l',"Server connection from \2"+sname+"\2 denied, invalid link credentials"); return false; } @@ -240,7 +240,7 @@ bool TreeSocket::Inbound_Server(parameterlist ¶ms) return true; } - this->SendError("Invalid credentials"); + this->SendError("Mismatched server name or password (check the other server's snomask output for details - e.g. umode +s +Ll)"); ServerInstance->SNO->WriteToSnoMask('l',"Server connection from \2"+sname+"\2 denied, invalid link credentials"); return false; } diff --git a/src/modules/m_spanningtree/uid.cpp b/src/modules/m_spanningtree/uid.cpp index 1b17ca6e7..ac9041ecc 100644 --- a/src/modules/m_spanningtree/uid.cpp +++ b/src/modules/m_spanningtree/uid.cpp @@ -45,7 +45,18 @@ CmdResult CommandUID::HandleServer(TreeServer* remoteserver, std::vector<std::st /* check for collision */ User* collideswith = ServerInstance->FindNickOnly(params[2]); - if (collideswith) + if ((collideswith) && (collideswith->registered != REG_ALL)) + { + // User that the incoming user is colliding with is not fully registered, we force nick change the + // unregistered user to their uuid and tell them what happened + collideswith->WriteFrom(collideswith, "NICK %s", collideswith->uuid.c_str()); + collideswith->WriteNumeric(433, "%s %s :Nickname overruled.", collideswith->nick.c_str(), collideswith->nick.c_str()); + + // Clear the bit before calling User::ChangeNick() to make it NOT run the OnUserPostNick() hook + collideswith->registered &= ~REG_NICK; + collideswith->ChangeNick(collideswith->uuid, true); + } + else if (collideswith) { /* * Nick collision. diff --git a/src/modules/m_userip.cpp b/src/modules/m_userip.cpp index 96505a047..043967393 100644 --- a/src/modules/m_userip.cpp +++ b/src/modules/m_userip.cpp @@ -28,7 +28,7 @@ class CommandUserip : public Command public: CommandUserip(Module* Creator) : Command(Creator,"USERIP", 1) { - syntax = "<nick>{,<nick>}"; + syntax = "<nick> [<nick> ...]"; } CmdResult Handle (const std::vector<std::string> ¶meters, User *user) diff --git a/src/modules/m_watch.cpp b/src/modules/m_watch.cpp index 94292e4be..68fe09d64 100644 --- a/src/modules/m_watch.cpp +++ b/src/modules/m_watch.cpp @@ -207,7 +207,7 @@ class CommandWatch : public Command ext.set(user, wl); } - if (wl->size() == MAX_WATCH) + if (wl->size() >= MAX_WATCH) { user->WriteNumeric(512, "%s :Too many WATCH entries", nick); return CMD_FAILURE; diff --git a/src/modules/m_xline_db.cpp b/src/modules/m_xline_db.cpp index 1a7fd8cc5..c35f0d07a 100644 --- a/src/modules/m_xline_db.cpp +++ b/src/modules/m_xline_db.cpp @@ -135,12 +135,7 @@ class ModuleXLineDB : public Module stream.close(); #ifdef _WIN32 - if (remove(xlinedbpath.c_str())) - { - ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "Cannot remove old database! %s (%d)", strerror(errno), errno); - ServerInstance->SNO->WriteToSnoMask('a', "database: cannot remove old database: %s (%d)", strerror(errno), errno); - return false; - } + remove(xlinedbpath.c_str()); #endif // Use rename to move temporary to new db - this is guarenteed not to fuck up, even in case of a crash. if (rename(xlinenewdbpath.c_str(), xlinedbpath.c_str()) < 0) diff --git a/src/socketengine.cpp b/src/socketengine.cpp index c6c520efc..1c91ccdea 100644 --- a/src/socketengine.cpp +++ b/src/socketengine.cpp @@ -291,7 +291,13 @@ std::string SocketEngine::LastError() DWORD dwErrorCode = WSAGetLastError(); if (FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, dwErrorCode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPSTR)szErrorString, _countof(szErrorString), NULL) == 0) sprintf_s(szErrorString, _countof(szErrorString), "Error code: %u", dwErrorCode); - return szErrorString; + + std::string::size_type p; + std::string ret = szErrorString; + while ((p = ret.find_last_of("\r\n")) != std::string::npos) + ret.erase(p, 1); + + return ret; #endif } diff --git a/src/users.cpp b/src/users.cpp index 3f82b850c..8d22d166c 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -416,7 +416,7 @@ void OperInfo::init() { this->AllowedUserModes.set(); } - else if (*c >= 'A' && *c < 'z') + else if (*c >= 'A' && *c <= 'z') { this->AllowedUserModes[*c - 'A'] = true; } @@ -429,7 +429,7 @@ void OperInfo::init() { this->AllowedChanModes.set(); } - else if (*c >= 'A' && *c < 'z') + else if (*c >= 'A' && *c <= 'z') { this->AllowedChanModes[*c - 'A'] = true; } diff --git a/win/CMakeLists.txt b/win/CMakeLists.txt index 6cc76c094..3cfe9f6b8 100644 --- a/win/CMakeLists.txt +++ b/win/CMakeLists.txt @@ -103,7 +103,7 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake") set(CPACK_NSIS_MUI_UNIICON "${INSPIRCD_BASE}/win\\\\inspircd.ico") set(CPACK_NSIS_INSTALLED_ICON_NAME "inspircd.exe") set(CPACK_NSIS_URL_INFO_ABOUT "http://www.inspircd.org/") - set(CPACK_NSIS_COMPRESSOR "/SOLID lzma") + set(CPACK_NSIS_COMPRESSOR "/SOLID zlib") include(CPack) endif(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake") diff --git a/win/inspircd.rc.cmake b/win/inspircd.rc.cmake index a29d75d52..3ff767878 100644 --- a/win/inspircd.rc.cmake +++ b/win/inspircd.rc.cmake @@ -22,7 +22,7 @@ BEGIN VALUE "FileDescription", "InspIRCd"
VALUE "FileVersion", "@FULL_VERSION@"
VALUE "InternalName", "InspIRCd"
- VALUE "LegalCopyright", "Copyright (c) 2013 InspIRCd Development Team"
+ VALUE "LegalCopyright", "Copyright (c) 2014 InspIRCd Development Team"
VALUE "OriginalFilename", "inspircd.exe"
VALUE "ProductName", "InspIRCd - The Inspire IRC Daemon"
VALUE "ProductVersion", "@FULL_VERSION@"
diff --git a/win/inspircd_win32wrapper.cpp b/win/inspircd_win32wrapper.cpp index eba18dca3..3a3b5917a 100644 --- a/win/inspircd_win32wrapper.cpp +++ b/win/inspircd_win32wrapper.cpp @@ -206,6 +206,11 @@ CWin32Exception::CWin32Exception() : exception() dwErrorCode = GetLastError(); if( FormatMessageA( FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, dwErrorCode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPSTR)szErrorString, _countof(szErrorString), NULL) == 0 ) sprintf_s(szErrorString, _countof(szErrorString), "Error code: %u", dwErrorCode); + for (size_t i = 0; i < _countof(szErrorString); i++) + { + if ((szErrorString[i] == '\r') || (szErrorString[i] == '\n')) + szErrorString[i] = 0; + } } CWin32Exception::CWin32Exception(const CWin32Exception& other) diff --git a/win/inspircd_win32wrapper.h b/win/inspircd_win32wrapper.h index 9e6724126..a19bdf857 100644 --- a/win/inspircd_win32wrapper.h +++ b/win/inspircd_win32wrapper.h @@ -84,6 +84,8 @@ #define strcasecmp _stricmp #define strncasecmp _strnicmp +typedef int ssize_t; + /* Convert formatted (xxx.xxx.xxx.xxx) string to in_addr struct */ CoreExport int insp_inet_pton(int af, const char * src, void * dst); |