1
0
mirror of https://github.com/anope/anope.git synced 2026-06-12 18:54:47 +02:00

Compare commits

...

61 Commits

Author SHA1 Message Date
Adam b382c27bb0 Anope 1.9.3-p1 Release 2011-05-16 03:08:48 -04:00
Adam 9f9e83c65c Updated Changes 2011-05-16 03:08:39 -04:00
Adam 4ab0bd3a8e Fixed a crash when certain nicks expired 2011-04-25 22:44:33 -04:00
Adam 68b1abc6f7 Fixed botserv kicker logic 2011-04-16 04:37:57 -04:00
Adam 86ff426642 Fixed caps kicker
(cherry picked from commit efe5fedde9)
2011-04-15 19:52:05 -04:00
Adam 1aa0905241 Fixed disabling channel levels
(cherry picked from commit bd62c4891e)
2011-04-09 20:54:00 -04:00
Adam 255d76ccc1 Fixed bug #1261 2011-04-05 19:10:42 -04:00
DukePyrolator d0746ae8d6 removed a merge conflict in example.conf 2011-03-26 18:11:15 +01:00
Adam dbc19768b1 Fixed ns_release with a password 2011-03-12 03:31:13 -05:00
Adam 8d64d91742 Fixed /bs badword del to show what word was deleted 2011-03-05 18:21:20 -05:00
Adam ed4c5e1457 Fixed os_sqline del 2011-02-27 23:53:56 -05:00
Adam fdcb7e56ae Don't burst SXLines when we link because its unnecessary and fixed applying SQLines 2011-02-27 22:12:51 -05:00
Adam 0d1a0e8db9 Fixed tracking umodes on bahamut and fjoins on inspircd11 2011-02-25 21:56:00 -05:00
Adam b9fb2f8e63 Fixed session exception limit of 0 to mean unlimited
(cherry picked from commit 28d17a40ce)
2011-02-25 21:55:23 -05:00
Adam 1a1665ba56 Update SQL when a nick is deleted 2011-02-17 15:27:30 -05:00
Adam 634e9af9cb Fixed expiring session exceptions 2011-02-09 21:55:11 -05:00
Adam b6ab031fc1 Update the language strings too... 2011-02-09 13:29:22 -05:00
Adam ebe0ce6610 Fixed a compiler warning in os_news 2011-02-06 20:49:36 -05:00
Adam b2e52553a7 Merge 83556667fd 2011-02-04 22:10:39 -05:00
Adam 032c30dd5d Fixed /ms set limit none and made db_plain care less about convert exceptions 2011-02-04 12:37:01 -05:00
Charles Kingsley fb0f7649b4 Merge of 9704ccc8a62f...c362a1e077d5 2011-01-29 14:16:09 -05:00
Adam 92fb9844ec Fixed setting usermode +k on our clients on InspIRCd 2.0 2011-01-28 13:21:24 -05:00
lethality d8b92f1c70 Bug #1237 - only set umode +h on a user joining help chan if they have op access 2011-01-28 00:44:30 +00:00
Adam b354d4d1ab nickcore:language is a string now, not an int 2011-01-24 19:04:27 -05:00
Adam 81d8858e56 Fixed some SQL queries 2011-01-24 17:52:33 -05:00
Adam d7206c8f38 Fixed db upgrade loading forbidden nicks 2011-01-24 01:08:28 -05:00
Adam 7c30d223fb Bug #1234 - Fix reading resolv.conf if it has multiple spaces or tabs
(cherry picked from commit a162f1d18e)
2011-01-21 23:03:27 -05:00
Adam 0db220812f Bug #1232 - Fixed db-convert to properly convert mode lock parameters
(cherry picked from commit e7a8bcc30b)
2011-01-18 19:28:34 -05:00
Adam a2f5edf977 Fixed /ns confirm's log message to show the nick of who was confirmed
(cherry picked from commit 1b6aab0cd7)

Conflicts:

	modules/core/ns_register.cpp
2011-01-15 16:31:46 -05:00
Adam 2631eb2e48 Made CA_SET always be accessable, even if db-converter messes up levels
(cherry picked from commit a4ded88e85)
2011-01-15 16:29:37 -05:00
lethality 49970524c8 Fix CODINGs formatting and a missed typo 2011-01-14 04:37:32 +00:00
Adam 11a144ad61 Bug #1230 - Fixed unknown CTCPs from crashing services
(cherry picked from commit e490202a1b)
2011-01-11 22:20:36 -05:00
Adam 1bdadde68a Fixed CanAdd() to use safe iteration and make SNLine::Check really work 2011-01-09 13:37:12 -05:00
DukePyrolator 39d34f7174 fixed a small bug in the ratbox protocol module
(cherry picked from commit 2e7d08c10b)
2011-01-08 03:41:12 -05:00
Adam c7979d98fa Fixed restoring topics on perm channels 2010-12-30 01:11:35 -05:00
Adam 58c2f0c409 Fixed creating permanent channels on burst that have no botserv bot on IRCds without a perm channel mode 2010-12-29 23:24:44 -05:00
Adam 851c0a990e Bug #1225 - Made REGISTER show in /cs help 2010-12-28 16:39:41 -05:00
Adam c68933e547 Fixed build on debian lenny 2010-12-27 15:31:34 -05:00
Adam e9f84a0db9 Load session exceptions on start when using SQL
(cherry picked from commit a1c635b050)
2010-12-27 01:35:40 -05:00
Adam 87141253a1 Bug #1222 - Fixed crash from reading to read a range of memos 2010-12-27 01:03:13 -05:00
Adam 0c686e7168 Bug #1220 - Fixed an event in /hs activate and /ms del
(cherry picked from commit 49dd1c3409)
2010-12-27 01:02:18 -05:00
Adam b5091a373e Bug #1219 - Correctly restrict people from registering potentential guest names
(cherry picked from commit 8af2465a61)
2010-12-26 00:31:50 -05:00
Adam 8e898c2e3e Fixed a potential crash from dropping nicks
(cherry picked from commit 1b3f2567bc)
2010-12-26 00:31:41 -05:00
Adam 821995bf60 Properly remove commands from bots when they are destructed, and run privmsgs for bots we know of but aren't the core 2010-12-25 02:26:00 -05:00
Adam 673f6cb2f9 Merge branch '1.9.3-p1' of git.sigterm.info:anope/anope into 1.9.3-p1 2010-12-25 01:19:29 -05:00
Adam 852ed51ed7 Fixed bug #1217 again... works better now 2010-12-25 01:19:02 -05:00
Adam 5144b63a3a Bump version.sh to -p1 2010-12-24 23:04:44 -05:00
Adam 0f63790b4c Bug #1215 - Fixed crash when /cs set mlock is given an empty string 2010-12-24 20:16:42 -05:00
Adam 4f6232e628 Bug #1217 - Fix crash from deleting nonexistant users from XOP list 2010-12-24 20:15:28 -05:00
Adam 4e303566dc Bug #1216 - Do not apply SQLines on our own clients 2010-12-24 20:11:00 -05:00
Adam 4f7144e513 Made clearing SXLines remove the XLine from the IRCd too
(cherry picked from commit 86900175c8)
2010-12-24 20:09:49 -05:00
Adam c7a44bfd8e Fixed deleting expired SXLines 2010-12-24 20:07:59 -05:00
Adam 839fb4e5f0 Made SQLine clear work 2010-12-24 20:06:59 -05:00
Adam a2a6708f1a Allow hostmasks to be in uplink:host
(cherry picked from commit 18377ac9fd)
2010-12-24 20:06:25 -05:00
Adam faf1e3710e Fixed version.cpp to work ok if we are on a tag, and
prevent version.cpp from prepending version.sh's VERSION_EXTRA on every build
2010-12-24 20:05:52 -05:00
Adam e54cffd9b7 Don't send SXLines until after we start bursting with our uplink 2010-12-24 20:05:16 -05:00
Adam 75098739e6 NULL the core *serv pointers when core clients are deleted
(cherry picked from commit 7f9a5e01c6)
2010-12-24 20:04:37 -05:00
Adam 12d6e2ef3f Bug #1211 - Fixed loading and saving anope_os_sxlines 2010-12-24 20:04:25 -05:00
Adam 00ec71f81d Bug #1212 - Fixed some bad logic in /os exception preventing valid exceptions from being added 2010-12-24 20:03:33 -05:00
Adam 479fc1ce3f Handle not being able to completely flush our write buffer correctly 2010-12-24 20:02:25 -05:00
Adam 667419a460 Document that /cs owner and deowner allow nick args
(cherry picked from commit 5fe41fb8a0)
2010-12-24 20:00:17 -05:00
63 changed files with 1456 additions and 1362 deletions
+4 -4
View File
@@ -168,11 +168,11 @@ if [ ! "$NO_INTRO" ] ; then
VERSION=`git describe --tags`
VERSION_BUILD=`echo "$VERSION" | cut -d'-' -f2`
VERSION_EXTRA=`echo "$VERSION" | cut -d'-' -f3`
if [ "$VERSION_BUILD" == "$VERSION_EXTRA" ] ; then
VERSION_EXTRA=""
# Only do this if we are not on a tag, src/version.sh will be all we need then.
if [ "$VERSION_BUILD" != "$VERSION_EXTRA" ] ; then
echo "#define VERSION_BUILD $VERSION_BUILD" > include/version.h
echo "#define VERSION_EXTRA \"-$VERSION_EXTRA\"" >> include/version.h
fi
echo "#define VERSION_BUILD $VERSION_BUILD" > include/version.h
echo "#define VERSION_EXTRA \"$VERSION_EXTRA\"" >> include/version.h
fi
cat $SOURCE_DIR/.BANNER | sed "s/CURVER/$VERSION/" | sed "s@SOURCE_DIR@$SOURCE_DIR@" | $PAGER
echo ""
+163 -88
View File
@@ -324,8 +324,8 @@ options
/*
* If set, Services will perform more stringent checks on passwords. If this
* isn't set, Services will only disallow a password if it is the same as the
* entity (nickname or channel name) with which it is associated. When set,
* however, Services will also check that the password is at least five
* entity (nickname name) with which it is associated. When set, however,
* Services will also check that the password is at least five
* characters long, and in the future will probably check other things
* as well. This directive is optional, but recommended.
*/
@@ -337,8 +337,9 @@ options
* the given amount for any Services function or combination of functions
* during a single IRC session (subject to badpasstimeout, below), Services
* will issues a /KILL for the user. If not given, Services will ignore
* failed password attempts (though they will be logged in any case). This
* directive is optional, but recommended.
* failed password attempts (though they will be logged in any case).
*
* This directive is optional, but recommended.
*/
badpasslimit = 5
@@ -347,7 +348,9 @@ options
* does not enter any incorrect passwords in this amount of time, the incorrect
* password count will reset to zero. If not given, the timeout will be
* disabled, and the incorrect password count will never be reset until the user
* disconnects. This directive is optional.
* disconnects.
*
* This directive is optional.
*/
badpasstimeout = 1h
@@ -410,7 +413,9 @@ options
/*
* If set, Services will require a reason when a FORBID is added, else the
* reason is optional. This directive also applies to SUSPENDed channels as
* well. This directive is optional.
* well.
*
* This directive is optional.
*/
forceforbidreason = yes
@@ -444,7 +449,9 @@ options
/*
* If set, Services will send global messages on starting up and shutting
* down/restarting. This directive is optional.
* down/restarting.
*
* This directive is optional.
*/
#globaloncycle = yes
@@ -463,13 +470,17 @@ options
/*
* If set, Services will hide the IRC operator's nick in a global
* message/notice. This directive is optional.
* message/notice.
*
* This directive is optional.
*/
#anonymousglobal = yes
/*
* Prevents users from registering their nick if they are not connected
* for at least the given number of seconds. This directive is optional.
* for at least the given number of seconds.
*
* This directive is optional.
*/
#nickregdelay = 30
@@ -477,7 +488,7 @@ options
* If set, forbids the registration of nicks that contain an existing
* nick with Services access. For example, if Tester is a Services Oper,
* you can't register NewTester or Tester123 unless you are an IRC
* Operator. This directive is optional.
* Operator.
*
* NOTE: If you enable this, you will have to be logged in as an IRC
* operator in order to register a Services Root nick when setting up
@@ -800,8 +811,7 @@ mail
/*
* This controls the minimum amount of time an user must wait before sending
* another e-mail after they have sent one. It also controls the minimum time
* an user must wait before they can receive another e-mail. This directive
* is optional, but recommended.
* an user must wait before they can receive another e-mail.
*
* This feature prevents users from being mail bombed using Services and
* it is highly recommended that it be used.
@@ -810,8 +820,10 @@ mail
/*
* If set, Services will not attempt to put quotes around the TO: fields
* in e-mails. This directive is optional, and as far as we know, it's
* only needed if you are using ESMTP or QMail to send out e-mails.
* in e-mails.
*
* This directive is optional, and as far as we know, it's only needed
* if you are using ESMTP or QMail to send out e-mails.
*/
#dontquoteaddresses = yes
}
@@ -860,14 +872,16 @@ nickserv
/*
* The core modules to load for NickServ. This is a space separated list that corresponds
* to the base names of the modules for NickServ. This directive is optional, but highly recommended.
* to the base names of the modules for NickServ.
*
* This directive is optional, but highly recommended.
*/
modules = "ns_help ns_register ns_group ns_identify ns_access ns_set ns_saset ns_set_autoop ns_set_email ns_set_greet ns_set_hide ns_set_kill ns_set_language ns_set_message ns_set_private ns_set_secure ns_saset_noexpire ns_drop ns_recover ns_release ns_sendpass ns_ghost ns_alist ns_info ns_list ns_logout ns_status ns_update ns_getpass ns_getemail ns_forbid ns_suspend ns_resetpass"
/*
* Force users to give an e-mail address when they register a nick. This directive
* is recommended to be enabled, and required if the e-mail registration option is
* enabled.
* Force users to give an e-mail address when they register a nick.
*
* This directive is recommended to be enabled, and required if e-mail registration is enabled.
*/
forceemail = yes
@@ -922,27 +936,31 @@ nickserv
regdelay = 30s
/*
* The minimum length of time between consecutive uses of NickServ's RESEND command. This
* directive is optional, but recommended. If not set, this restriction will be disabled.
* The minimum length of time between consecutive uses of NickServ's RESEND command.
*
* This directive is optional, but recommended. If not set, this restriction will be disabled.
*/
resenddelay = 90s
/*
* The length of time before a nick registration expires. This directive is optional, but
* recommended. If not set, the default is 21 days.
* The length of time before a nick registration expires.
*
* This directive is optional, but recommended. If not set, the default is 21 days.
*/
expire = 21d
/*
* The length of time a user gets to enter the confirmation code which has been e-mailed
* to them before the nick will be released for general use again. This directive is
* only required if the e-mail registration option is enabled.
* to them before the nick will be released for general use again.
*
* This directive is only required if the e-mail registration option is enabled.
*/
#preregexpire = 1d
/*
* The maximum number of nicks allowed in a group. This directive is optional, but
* recommended. If not set or set to 0, no limits will be applied.
* The maximum number of nicks allowed in a group.
*
* This directive is optional, but recommended. If not set or set to 0, no limits will be applied.
*/
maxaliases = 16
@@ -965,19 +983,25 @@ nickserv
releasetimeout = 1m
/*
* Allow the use of the IMMED option in the NickServ SET KILL command. This directive is optional.
* Allow the use of the IMMED option in the NickServ SET KILL command.
*
* This directive is optional.
*/
#allowkillimmed = yes
/*
* If set, the NickServ GROUP command won't allow any group change. This is recommended for
* better performance and to protect against nick stealing, however users will have less
* flexibility. This directive is optional.
* flexibility.
*
* This directive is optional, but recommended.
*/
#nogroupchange = yes
/*
* Limits the use of the NickServ LIST command to IRC operators. This directive is optional.
* Limits the use of the NickServ LIST command to IRC operators.
*
* This directive is optional.
*/
#listopersonly = yes
@@ -994,8 +1018,9 @@ nickserv
/*
* Prevents the use of the DROP, FORBID, GETPASS, and SET PASSWORD commands by Services Admins
* on other Services Admins or the Services Root(s). This directive is optional, but
* recommended.
* on other Services Admins or the Services Root(s).
*
* This directive is optional, but recommended.
*/
secureadmins = yes
@@ -1008,7 +1033,9 @@ nickserv
/*
* If set, Services will set the channel modes a user has access to upon identifying, assuming
* they are not already set. This directive is optional.
* they are not already set.
*
* This directive is optional.
*/
#modeonid = yes
@@ -1042,7 +1069,9 @@ chanserv
/*
* The core modules to load for ChanServ. This is a space separated list that corresponds
* to the base names of the modules for ChanServ. This directive is optional, but highly recommended.
* to the base names of the modules for ChanServ.
*
* This directive is optional, but highly recommended.
*/
modules = "cs_help cs_register cs_set cs_saset cs_saset_noexpire cs_set_bantype cs_set_description cs_set_entrymsg cs_set_founder cs_set_keeptopic cs_set_mlock cs_set_opnotice cs_set_peace cs_set_persist cs_set_private cs_set_restricted cs_set_secure cs_set_securefounder cs_set_secureops cs_set_signkick cs_set_successor cs_set_topiclock cs_set_xop cs_xop cs_access cs_akick cs_drop cs_ban cs_clear cs_modes cs_getkey cs_invite cs_kick cs_list cs_topic cs_info cs_forbid cs_suspend cs_status cs_unban"
@@ -1076,15 +1105,18 @@ chanserv
defaults="keeptopic peace secure securefounder signkick xop"
/*
* The maximum number of channels which may be registered to a single nickname. This directive is optional,
* but recommended. If not set, there will be no restriction on the numbers of channels a single nickname
* can have registered.
* The maximum number of channels which may be registered to a single nickname.
*
* This directive is optional, but recommended.
* If not set, there will be no restriction on the numbers of channels a single nickname can have registered.
*/
maxregistered = 20
/*
* The length of time before a channel registration expires. This directive is optional, but
* recommended. If not set, the default is 14 days.
* The length of time before a channel registration expires.
*
* This directive is optional, but recommended.
* If not set, the default is 14 days.
*/
expire = 14d
@@ -1122,7 +1154,9 @@ chanserv
inhabit = 15s
/*
* Limits the use of the ChanServ LIST command to IRC operators. This directive is optional.
* Limits the use of the ChanServ LIST command to IRC operators.
*
* This directive is optional.
*/
#listopersonly = yes
@@ -1132,7 +1166,9 @@ chanserv
listmax = 50
/*
* Allow only IRC Operators to use ChanServ. This directive is optional.
* Allow only IRC Operators to use ChanServ.
*
* This directive is optional.
*/
#opersonly = yes
}
@@ -1151,21 +1187,25 @@ memoserv
nick = "MemoServ"
/*
* The description of the MemoServ client, which will be used as the GECOS (real
* name) of the client.
* The description of the MemoServ client, which will be used as the GECOS
* (real name) of the client.
*/
description = "Memo Service"
/*
* The core modules to load for MemoServ. This is a space separated list that corresponds
* to the base names of the modules for MemoServ. This directive is optional, but highly recommended.
* to the base names of the modules for MemoServ.
*
* This directive is optional, but highly recommended.
*/
modules = "ms_send ms_cancel ms_list ms_read ms_del ms_set ms_info ms_rsend ms_check ms_staff ms_sendall ms_help"
/*
* The maximum number of memos a user is allowed to keep by default. Normal users may set the
* limit anywhere between 0 and this value. Services Admins can change it to any value or
* disable it. This directive is optional, but recommended. If not set, the limit is disabled
* disable it.
*
* This directive is optional, but recommended. If not set, the limit is disabled
* by default, and normal users can set any limit they want.
*/
maxmemos = 20
@@ -1174,15 +1214,18 @@ memoserv
* The delay between consecutive uses of the MemoServ SEND command. This can help prevent spam
* as well as denial-of-service attacks from sending large numbers of memos and filling up disk
* space (and memory). The default 3-second wait means a maximum average of 150 bytes of memo
* per second per user under the current IRC protocol. This directive is optional, but
* recommended.
* per second per user under the current IRC protocol.
*
* This directive is optional, but recommended.
*/
senddelay = 3s
/*
* Should we notify all appropriate users of a new memo? This applies in cases where a memo is
* sent to a nick which is in the group of another nick. Note that, unlike before, it is currently
* more efficient to enable this. This directive is optional.
* more efficient to enable this.
*
* This directive is optional.
*/
notifyall = yes
@@ -1212,8 +1255,8 @@ botserv
nick = "BotServ"
/*
* The description of the BotServ client, which will be used as the GECOS (real
* name) of the client.
* The description of the BotServ client, which will be used as the GECOS
* (real name) of the client.
*/
description = "Bot Service"
@@ -1272,13 +1315,16 @@ botserv
/*
* If set, the bots will use a kick reason that does not state the word when it is kicking.
* This is especially useful if you have young people on your network. This directive is
* optional.
* This is especially useful if you have young people on your network.
*
* This directive is optional.
*/
gentlebadwordreason = yes
/*
* If set, BotServ will use case sensitive checking for badwords. This directive is optional.
* If set, BotServ will use case sensitive checking for badwords.
*
* This directive is optional.
*/
#casesensitive = yes
@@ -1293,9 +1339,11 @@ botserv
/*
* [OPTIONAL] HostServ Config
*
* This section is used to set up the vHost Service pseudo-client. The block is optional and can be
* removed if you do not wish to have HostServ on your network. Unless specified otherwise,
* all directives are required if you do wish to use HostServ.
* This section is used to set up the vHost Service pseudo-client.
*
* The block is optional and can be removed if you do not wish to have HostServ on your network.
*
* Unless specified otherwise, all directives are required if you do wish to use HostServ.
*/
hostserv
{
@@ -1305,14 +1353,16 @@ hostserv
nick = "HostServ"
/*
* The description of the HostServ client, which will be used as the GECOS (real
* name) of the client.
* The description of the HostServ client, which will be used as the GECOS
* (real name) of the client.
*/
description = "vHost Service"
/*
* The core modules to load for HostServ. This is a space separated list that corresponds
* to the base names of the modules for HostServ. This directive is optional, but highly recommended.
* to the base names of the modules for HostServ.
*
* This directive is optional, but highly recommended.
*/
modules = "hs_help hs_on hs_off hs_group hs_list hs_set hs_setall hs_del hs_delall"
}
@@ -1338,14 +1388,18 @@ operserv
/*
* The core modules to load for OperServ. This is a space separated list that corresponds
* to the base names of the modules for OperServ. This directive is optional, but highly recommended.
* to the base names of the modules for OperServ.
*
* This directive is optional, but highly recommended.
*/
modules = "os_help os_global os_stats os_staff os_mode os_kick os_clearmodes os_akill os_snline os_sqline os_szline os_chanlist os_userlist os_news os_session os_noop os_jupe os_ignore os_set os_reload os_update os_restart os_quit os_shutdown os_defcon os_chankill os_svsnick os_oline os_umode os_modload os_modunload os_modreload os_modlist os_modinfo"
/*
* If set, Services Admins will be able to use SUPERADMIN [ON|OFF] which will temporarily grant
* them extra privileges, such as being a founder on ALL channels, ability to adjust another
* users' modes, etc. This directive is optional.
* them extra privileges such as being a founder on ALL channels, ability to adjust another
* users' modes, etc.
*
* This directive is optional.
*/
#superadmin = yes
@@ -1362,21 +1416,25 @@ operserv
/*
* If set, this option will make Services send an AKILL command immediately after it has been
* added with AKILL ADD. This eliminates the need for killing the user after the AKILL has
* been added. This directive is optional.
* been added.
*
* This directive is optional, but recommended.
*/
#akillonadd = yes
/*
* If set, this option will make Services send an (SVS)KILL command immediately after SNLINE ADD.
* This eliminates the need for killingthe user after the SNLINE has been added. This directive
* is optional.
* This eliminates the need for killingthe user after the SNLINE has been added.
*
*This directive is optional.
*/
#killonsnline = yes
/*
* If set, this option will make Services send an (SVS)KILL command immediately after SQLINE ADD.
* This eliminates the need for killingthe user after the SQLINE has been added. This directive
* is optional.
* This eliminates the need for killingthe user after the SQLINE has been added.
*
* This directive is optional.
*/
#killonsqline = yes
@@ -1430,34 +1488,38 @@ operserv
/*
* Default session limit per host. Once a host reaches it's session limit, all clients attempting
* to connect from that host will be killed. A value of zero means an unlimited session limit.
*
* This directive is optional.
* If not given and session limiting is enabled, it will default to no limit.
*/
defaultsessionlimit = 3
/*
* The maximum session limit that may be set for a host in an exception. This directive is only
* required if session limiting is enabled.
* The maximum session limit that may be set for a host in an exception.
*
* This directive is only required if session limiting is enabled.
*/
maxsessionlimit = 100
/*
* Sets the default expiry time for session exceptions. This directive is only required if session
* limiting is enabled.
* Sets the default expiry time for session exceptions.
*
* This directive is only required if session limiting is enabled.
*/
exceptionexpiry = 1d
/*
* The message that will be NOTICE'd to a user just before they are removed from the network because
* their host's session limit has been exceeded. It may be used to give a slightly more descriptive
* reason for the impending kill as opposed to simply "Session limit exceeded". This directive is
* optional, if not set, nothing will be sent.
* reason for the impending kill as opposed to simply "Session limit exceeded".
*
* This directive is optional, if not set, nothing will be sent.
*/
sessionlimitexceeded = "The session limit for your host %s has been exceeded."
/*
* Same as above, but should be used to provide a website address where users can find out more
* about session limits and how to go about applying for an exception. This directive is optional,
* if not set, nothing will be sent.
* about session limits and how to go about applying for an exception.
*
* Note: This directive has been intentionally commented out in an effort to remind you to change
* the URL it contains. It is recommended that you supply an address/URL where people can get help
@@ -1467,26 +1529,31 @@ operserv
/*
* If set and is not 0, this directive tells Services to add an AKILL the number of subsequent kills
* for the same host exceeds this value, preventing the network from experiencing KILL floods. This
* directive is optional.
* for the same host exceeds this value, preventing the network from experiencing KILL floods.
*
* This directive is optional.
*/
maxsessionkill = 15
/*
* Sets the expiry time for AKILLs set for hosts exceeding the maxsessionkill directive limit. This
* directive is optional, if not set, defaults to 30 minutes.
* Sets the expiry time for AKILLs set for hosts exceeding the maxsessionkill directive limit.
*
* This directive is optional, if not set, defaults to 30 minutes.
*/
sessionautokillexpiry = 30m
/*
* Adds the nickname of the IRC Operator issuing an AKILL to the kill reason. This directive is
* optional.
* Adds the nickname of the IRC Operator issuing an AKILL to the kill reason.
*
* This directive is optional.
*/
addakiller = yes
/*
* If set, only IRC Operators will be permitted to use OperServ, regardless of module-based command
* access restrictions. This directive is optional, but recommended.
* access restrictions.
*
* This directive is optional, but recommended.
*/
opersonly = yes
}
@@ -1508,8 +1575,8 @@ global
nick = "Global"
/*
* The description of the Global client, which will be used as the GECOS (real
* name) of the client.
* The description of the Global client, which will be used as the GECOS
* (real name) of the client.
*/
description = "Global Noticer"
}
@@ -1576,24 +1643,30 @@ defcon
/*
* This value can be used to automatically return the network to DefCon level 5 after the specified
* time period, just in case any IRC Operator forgets to remove a DefCon setting. This directive is
* optional.
* time period, just in case any IRC Operator forgets to remove a DefCon setting.
*
* This directive is optional.
*/
#timeout = 15m
/*
* If set, Services will send a global message on DefCon level changes. This directive is optional.
* If set, Services will send a global message on DefCon level changes.
*
* This directive is optional.
*/
#globalondefcon = yes
/*
* If set, Services will send the global message defined in the message directive on DefCon level
* changes. This directive is optional.
* changes.
*
* This directive is optional.
*/
#globalondefconmore = yes
/*
* Defines the message that will be sent on DefCon level changes when globalondefconmore is set.
*
* This directive is required only when globalondefconmore is set.
*/
#message = "Put your message to send your users here. Dont forget to uncomment globalondefconmore"
@@ -1719,7 +1792,9 @@ m_helpchan
{
/*
* For the given channel, every user that has or gets op status of the channel
* will automatically receive the +h user mode. This directive is optional.
* will automatically receive the +h user mode.
*
* This directive is optional.
*/
helpchannel = "#help"
}
+1 -4
View File
@@ -1,4 +1 @@
Reported Bugs from Bugzilla: http://bugs.anope.org/
---------------------------------------------------
For all bug reports / updates please see http://bugs.anope.org
+209 -140
View File
@@ -1,170 +1,239 @@
Orginally pulled from: http://www.inspircd.org/wiki/Coding_Guidelines
Yes, I'm aware the formatting of this document is ugly. It'll be fixed when someone cares. Read the wiki page if you want pretty for now.
---
InspIRCd Coding Guidelines
The following are a set of guidelines for writing patches to InspIRCd, or for creating modules for distribution with the official package. These
guidelines were written a time after InspIRCd development started, and so not all code yet follows these. This will be rectified with time.
The following are a set of guidelines for writing patches to InspIRCd, or for
creating modules for distribution with the official package. These guidelines
were written a time after InspIRCd development started, and so not all code
yet follows these. This will be rectified with time.
1. Comments
Multi Line
Multiple line comments should follow the C-style comment, for example:
/*
* This is a multiple line comment, huzzah..
*/
Single Line
Single line comments should also be in the C style, for example:
/* This is a boring one-line comment */
* Multi Line
Multiple line comments should follow the C-style comment, for example:
/*
* This is a multiple line comment, huzzah..
*/
Doxygen commenting
If you wish your comment to show in doxygen, the comment should be directly above the item you are documenting (a class, function, enum, etc)
and the first line should be "/**". For example:
/** This is a doxygen multiline comment.
* Description of thingymebob here.
*/
The first line after the "**" is used as the short description of the item (up to the full stop) and everything afterwards as the detailed
description.
* Single Line
Single line comments should also be in the C style, for example:
/* This is a boring one-line comment */
Indentation
Tabs. Tabs. ONLY TABS. Use a single tab for each level of indentation, for example:
int main()
{
<tab>if (condition)
<tab>{
<tab><tab>code
<tab>}
}
* Doxygen commenting
If you wish your comment to show in doxygen, the comment should be directly
above the item you are documenting (a class, function, enum, etc) and the
first line should be "/**". For example:
/** This is a doxygen multiline comment.
* Description of thingymebob here.
*/
The first line after the "**" is used as the short description of the item
(up to the full stop) and everything afterwards as the detailed description.
Separation
Always put a space in between a keyword like if/while and the condition, for example:
if (foo == bar)
NOT
if(foo == bar)
2. Indentation
Braces
Always put braces opening and closing blocks on separate lines, see the identation example. For example, place braces like this:
if (apples == "green")
{
cout << "Apples are green" << endl;
}
Tabs. Tabs. ONLY TABS. Use a single tab for each level of indentation,
for example:
int main()
{
<tab>if (condition)
<tab>{
<tab><tab>code
<tab>}
}
and not:
if (apples == "green") {
cout << "Apples are green" << endl;
}
The one exception to this is if you are declaring a class method which is only one line long, in that case the following is acceptable in most cases:
class foo : public bar
{
foo() { }
getrandomfoo() { return rand(); }
};
Templates
Where possible, use templates rather than #defines. Avoid use of RTTI.
Structs
Structs should be declared in the following fashion:
struct BodyPartBasket
{
int arms;
int legs;
int scrotalsacs;
};
and not like this:
typedef struct
{
int arms;
int legs;
int scrotalsacs;
} BodyPartBasket;
The second way is not required in C++ to be able to do this:
BodyPartBasket mybasket;
Plus, placing the name at the bottom of the declaration makes readability more difficult (as you have to scroll down to the bottom of the
struct to find its name).
(where possible, call them classes rather than structs.)
3. Separation
Variable naming
Class and struct names should be in camel case with a leading capital letter, for example "MyBagOfBones" and not "my_bag_of_bones" or
"mybagofbones". Variable names can be in either camel case with a leading capital letter or alternatively all lower case, so long as the same
naming convention is adhered to throughout the class. No classes or variables should be named in capitals unless this makes sense for the
name (for example "class DNS"). Constants and enum values should always be completely in CAPITALS and underscores may be used, for example:
enum DecayState
{
DECAYED_MOULDY = 0,
DECAYED_SMELLY = 1,
DECAYED_MAGGOTS = 2
};
All value names in an enum should be started with the same text which should be related in some way to the enum's use. For example "DNS_CNAME,
DNS_A, DNS_AAAA".
Always put a space in between a keyword like if/while and the condition,
for example:
if (foo == bar)
NOT
if(foo == bar)
Use of references
Wherever possible, when dealing with any complex class, pass a const reference rather than a copy of the class. For example:
MyThingy::MyThingy(const std::string &thingyvalue)
{
}
Of course, if you intended to change the string you can just omit the 'const'.
Use of char pointers
Whenever you use char pointers (char*, char**) try to use const equivalents. This is much safer and avoids ugly and dangerous casts. For example:
MyThingy::Thingify(const char* const* wotsits)
{
}
If it is possible without performance loss, consider avoiding char pointers altogether and using std::string instead.
4. Braces
Use of STL
For more information on use of STL in InspIRCd, please see the separate STL FAQ.
Always put braces opening and closing blocks on separate lines, see the
identation example. For example, place braces like this:
if (apples == "green")
{
cout << "Apples are green" << endl;
}
Making copies of data
Never ever make a copy of a piece of data unless it is absolutely necessary. For example, don't use strlcpy() to make a copy of the const char* string
returned by std::string::c_str(), if the change can be done to the std::string itself. The same goes for unnecessary variable assignments, especially
those which assign large classes.
and not:
if (apples == "green") {
cout << "Apples are green" << endl;
}
namespace std
Avoid the following:
using namespace std;
It might take a bit more typing, but things work better if you don't set (then later assume) the namespace -- specify it explicitly when you want to
use it.
The one exception to this is if you are declaring a class method which is
only one line long, in that case the following is acceptable in most cases:
class foo : public bar
{
foo() { }
getrandomfoo() { return rand(); }
};
Linefeeds
Unix linefeeds only please. We do not like to see our screens covered in ^M. :-)
Portability
Always make sure your code is portable to all supported operating systems, remember of course that as of 1.1.8 this includes windows. Don't write code
that only works on windows, or only works on Linux. Test your code on all platforms or ask for help from other developers who have the platforms you
want to test on.
5. Templates
new() and delete(), malloc() and free()
Apart from the fact that using malloc() and free() is bad practice in C++ code, you must never use malloc() or free() in InspIRCd, within its modules
or within the core. This is because if you use malloc() or free() in windows, the memory is claimed from the program's local heap. In windows, each
shared object (module, dll) has its own heap, which is protected from other dlls and executables. To get around this issue and allow more posix-like
memory access from other dlls in the program (other modules), InspIRCd overrides the operators new and delete to ensure that memory allocated by them
comes from the windows global heap. If you use malloc() and free() for this, the ircd will segfault when another module tries to access the memory you
have allocated!
Where possible, use templates rather than #defines. Avoid use of RTTI.
strdup()
As with malloc(), above, strdup() should be avoided. Where strdup() is absolutely necessary, use strnewdup() which is our strdup() implementation that
calls operator new instead of using malloc(). char arrays allocated by strnewdup() should be deleted with operator delete[].
CoreExport and DllImport
Prefix all types you want to import or export to other modules with CoreExport and DllImport macros. These do nothing in POSIX operating systems,
however in windows these are expanded to the instructions __declspec(dllimport) and __declspec(dllexport) respectively depending on where they are
used and how.
6. Structs
External Dependencies
If a module is compiled as standard, or the code is part of the core, you must not use any dependencies that are not available as standard on all
supported operating systems beyond libstdc++, libc, and whatever else is currently required to build the core. Modules which use nonstandard
dependencies belong in the modules/extra directory.
Structs should be declared in the following fashion:
struct BodyPartBasket
{
int arms;
int legs;
int scrotalsacs;
};
and not like this:
typedef struct
{
int arms;
int legs;
int scrotalsacs;
} BodyPartBasket;
Profiling and Performance
It is one thing to assume that code performs bad, it is another thing to prove that it actually is. A lot of experienced programmers talk about
'premature optimisation', and here is what it means: if you have a piece of code called once on startup that takes 10 seconds instead of one second to
run, and a piece of code that takes 0.05 seconds to run when it should take 0.01, and it is called once per second, the second piece of code is the
priority.
In other words, make sure that what you think is slow, and a performance problem in Insp actually is.
To do this, use the callgrind tool from Valgrind (valgrind --tool=cachegrind bin/inspircd -nofork -debug), and kcachegrind (or similar) to view the
output files.
The second way is not required in C++ to be able to do this:
BodyPartBasket mybasket;
Plus, placing the name at the bottom of the declaration makes readability
more difficult (as you have to scroll down to the bottom of the struct to
find its name). (where possible, call them classes rather than structs.)
7. Variable naming
Class and struct names should be in camel case with a leading capital letter,
for example "MyBagOfBones" and not "my_bag_of_bones" or "mybagofbones".
Variable names can be in either camel case with a leading capital letter or
alternatively all lower case, so long as the same naming convention is
adhered to throughout the class. No classes or variables should be named in
capitals unless this makes sense for the name (for example "class DNS").
Constants and enum values should always be completely in CAPITALS and
underscores may be used, for example:
enum DecayState
{
DECAYED_MOULDY = 0,
DECAYED_SMELLY = 1,
DECAYED_MAGGOTS = 2
};
All value names in an enum should be started with the same text which should
be related in some way to the enum's use. For example "DNS_CNAME, DNS_A,
DNS_AAAA".
8. Use of references
Wherever possible, when dealing with any complex class, pass a const reference
rather than a copy of the class. For example:
MyThingy::MyThingy(const std::string &thingyvalue)
{
}
Of course, if you intended to change the string you can just omit the 'const'.
9. Use of char pointers
Whenever you use char pointers (char*, char**) try to use const equivalents.
This is much safer and avoids ugly and dangerous casts. For example:
MyThingy::Thingify(const char* const* wotsits)
{
}
If it is possible without performance loss, consider avoiding char pointers
altogether and using std::string instead.
10. Use of STL
For more information on use of STL in InspIRCd, please see the separate
STL FAQ.
11. Making copies of data
Never ever make a copy of a piece of data unless it is absolutely necessary.
For example, don't use strlcpy() to make a copy of the const char* string
returned by std::string::c_str(), if the change can be done to the std::string
itself. The same goes for unnecessary variable assignments, especially those
which assign large classes.
12. namespace std
Avoid the following:
using namespace std;
It might take a bit more typing, but things work better if you don't set
(then later assume) the namespace -- specify it explicitly when you want to
use it.
13. Linefeeds
Unix linefeeds only please. We do not like to see our screens covered in ^M.
14. Portability
Always make sure your code is portable to all supported operating systems,
remember of course that as of 1.1.8 this includes windows. Don't write code
that only works on windows, or only works on Linux. Test your code on all
platforms or ask for help from other developers who have the platforms you
want to test on.
* new() and delete(), malloc() and free()
Apart from the fact that using malloc() and free() is bad practice in C++
code, you must never use malloc() or free() in InspIRCd, within its modules
or within the core. This is because if you use malloc() or free() in windows,
the memory is claimed from the program's local heap.
In windows, each shared object (module, dll) has its own heap, which is
protected from other dlls and executables. To get around this issue and
allow more posix-like memory access from other dlls in the program (other
modules), InspIRCd overrides the operators new and delete to ensure that
memory allocated by them comes from the windows global heap. If you use
malloc() and free() for this, the ircd will segfault when another module
tries to access the memory you have allocated!
* strdup()
As with malloc(), above, strdup() should be avoided. Where strdup() is
absolutely necessary, use strnewdup() which is our strdup() implementation
that calls operator new instead of using malloc().
char arrays allocated by strnewdup() should be deleted with operator delete[].
* CoreExport and DllImport
Prefix all types you want to import or export to other modules with CoreExport
and DllImport macros. These do nothing in POSIX operating systems, however
in windows these are expanded to the instructions __declspec(dllimport) and
__declspec(dllexport) respectively depending on where they are used and how.
15. External Dependencies
If a module is compiled as standard, or the code is part of the core, you must
not use any dependencies that are not available as standard on all supported
operating systems beyond libstdc++, libc, and whatever else is currently
required to build the core. Modules which use nonstandard dependencies belong
in the modules/extra directory.
16. Profiling and Performance
It is one thing to assume that code performs bad, it is another thing to prove
that it actually is. A lot of experienced programmers talk about 'premature
optimisation', and here is what it means: if you have a piece of code called
once on startup that takes 10 seconds instead of one second to run, and a
piece of code that takes 0.05 seconds to run when it should take 0.01, and
it is called once per second, the second piece of code is the priority.
In other words, make sure that what you think is slow, and a performance
problem in Insp actually is.
To do this, use the callgrind tool from Valgrind (valgrind --tool=cachegrind
bin/inspircd -nofork -debug), and kcachegrind (or similar) to view the output
files.
+20
View File
@@ -1,3 +1,23 @@
Anope Version 1.9.3-p1
--------------------
F Fixed bad logic in /os exception preventing valid hosts from being added
F Fixed /os sqline clear
F Fixed not applying SQLines to our own clients
F Fixed crash from deleting nonexistant users on the XOP access lists
F Fixed crash when /cs set mlock is given an empty string
F Fixed a potential crash from expiring nicks
F Fixed build on Debian Lenny
F Fixed /bs badword del to show what word was deleted
F Fixed using /ns release with a password
F Fixed allowing setting a valid TTB with /bs kick repeat
F Fixed caps kicker
F Fixed many SQL issues
F Fixed reading resolv.conf if it has multiple spaces or tabs
F Fixed creating permanent channels on burst and setting their topics
F Fixed /cs register to show in HELP
F Fixed restricting people from registering guest nick names
F Fixed a potential crash from dropping nicks
Anope Version 1.9.3
--------------------
A Added italics BotServ kicks support
+2 -4
View File
@@ -162,7 +162,7 @@ Note: You should also read the README and FAQ files!
4) Starting Anope
Go into the directory where binaries were installed (by default, this is
~/services). Type ./services to launch Anope.
~/services/bin). Type ./services to launch Anope.
If there are syntax errors in the configuration file they will be
displayed on the screen. Correct them until there are no errors anymore.
@@ -180,9 +180,7 @@ Note: You should also read the README and FAQ files!
5) Setting up a crontab
A crontab entry will allow you to check periodically whether Anope is
still running, and restart it if not. You'll need to have Anope binaries
and data installed in the same directory for this to work without
modification.
still running, and restart it if not.
First rename the example.chk script that is in Anope path (by default,
this is ~/services) to services.chk and edit it. You'll need to modify
+2
View File
@@ -27,6 +27,8 @@ Anope Mutli Language Support
If you have finished a language file translation and you want others to use it, please send it to team@anope.org
(don't forget to mention clearly your (nick)name, your e-mail and the language name). You'll of course get full credit for it.
NOTE: There is no guarantee we will use your work so please do not be offended if we say no thanks.
3) Using langages with modules
Module authors can easially add the ability to have their modules translated by adding _() around the strings they
+285 -321
View File
@@ -1,321 +1,285 @@
Anope -- a set of IRC services for IRC networks
-----------------------------------------------
Anope is 2003-2010 Anope Team <team@anope.org>.
Based on Epona 2000-2002 PegSoft <epona@pegsoft.net>.
Based on Services 1996-1999 Andrew Church <achurch@achurch.org>.
This program is free but copyrighted software; see the file COPYING for
details.
Information about Anope may be found at http://www.anope.org/
Information about Epona may be found at http://www.epona.org/
Information about Services may be found at http://www.ircservices.esper.net/
Table of Contents
-----------------
1) Credits
2) Presentation
3) Installation
4) Command Line Options
5) Messages Translation
6) Contact and Mailing List
1) Credits
Anope is based on Lara's Epona version 1.4.14.
Epona is based on Andy Church's IRC Services version 4.3.3.
The original credits:
* Mauritz Antunes
Portuguese translation
* Jose R. Holzmann, Raul S. Villarreal
Spanish translation
* Andrew Kempe <theshadow@shadowfire.org>
News system
* <d.duca@eurcom.net>
Italian translation
* <mikado@holyfire.com>
Turkish translation
* Andrew Kempe <theshadow@shadowfire.org>
Session limiting
Epona credits:
* lara <lara@pegsoft.net>
Main coding
* CafeiN <oytuny@yahoo.com>
Turkish translation
* Sylvain Cresto aka tost <scresto@netsante.fr>
FreeBSD 5 patch
* Marcelo Conde Foscarini aka Bras <ircadmin@brmarket.net>
Portuguese translation
* Alvaro Toledo aka POLLITO <atoledo@keldon.org>
Spanish translation
* chemical <chemical@musicplay.de>
German translation
* shine <dh@shinewelt.de>
German translation
* Guven Guzelbey aka MeShGuL <guzelbey@cs.utk.edu>
Turkish translation
* Jordi Pujol <jordi.pujol@aujac.org>
Catalan translation
* Eva Dachs <evadachs@terra.es>
Catalan translation
* Toni Perez <toni.perez@aujac.org>
Catalan translation
* Sergios Karalis <sergios_k@hotmail.com>
Greek translation
* Thomas J. Stensas aka ShadowMaster <shadowmaster@shadow-realm.org>
Ultimate 3.x support
Anope credits:
* Adam Kramer <ribosome@anope.org>
* Adam <adam@anope.org>
* Alvaro Toledo <atoledo@keldon.org>
* Amanda Folson <amanda@anope.org>
* Andrew Berquist <vash@anope.org>
* Björn Stiddien <keeper@anope.org>
* Charles Kingsley <chaz@anope.org>
* Chris Hogben <heinz@anope.org>
* Daniel Engel <dane@zero.org>
* David <dv@diboo.net>
* David Narayan <jester@phrixus.net>
* David Robson <rob@anope.org>
* Daniele Nicolucci <jollino@sogno.net>
* Florian Schulze <certus@anope.org>
* Gabriel Acevedo H. <drstein@anope.org>
* Jan Milants <viper@anope.org>
* Jens Voss <dukepyrolator@anope.org>
* JH <jh@irc-chat.net>
* Joris Vink <joris@anope.org>
* Lucas Nussbaum <lucas@lucas-nussbaum.net>
* Mark Summers <mark@goopler.net>
* Matthew Beeching <jobe@invictachat.net>
* Naram Qashat <cyberbotx@anope.org>
* Pieter Bootsma <geniusdex@anope.org>
* Robin Burchell <w00t@inspircd.org>
* Thomas Juberg Stensås <ShadowMaster@Shadow-Realm.org>
* Trystan .S Lee <trystan@nomadirc.net>
* openglx <openglx@brasnerd.com.br>
Anope Translations:
* GeniusDex <geniusdex@anope.org> (nl.l)
* Kein <kein-of@yandex.ru> (ru.l)
* Stuff <the.stuff@gmx.de> (de.l)
* Gabriel Acevedo H. <drstein@anope.org> (es.l)
* Janos Kapitany <sarkanyka@cjbchat.hu> (hun.l)
* Szymon S'wierkosz <szymek@adres.pl> (pl.l)
Anope uses the strlcat() and strlcpy() functions from OpenSSH 2.5.1p2.
These functions are copyrighted by Todd C. Miller:
Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote
products derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED `AS IS'' AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
2) Presentation
Anope is a set of Services for IRC networks that allows users to manage
their nicks and channels in a secure and efficient way, and administrators
to manage their network with powerful tools.
Currently available services are:
* NickServ, a powerful nickname manager that users can use to protect
themselves against nick stealing. Each user has its own nickname
group, that allows the user to register as many nicks as needed
while still being able to take profit of his privileges and to
modify the nick configuration. NickServ also has an optional
password retrieval feature.
* ChanServ, a powerful channel manager that helps users to administer
their channels in a totally customizable way. ChanServ has an
internal list of privileged users and banned users that controls
accesses on a per-channel basis. It eliminates all takeover
problems, because of its powerful op/unban/invite and even mass
deop and mass kick functions.
* MemoServ, an helpful companion that allows sending short messages
to offline users, that they can then read when they come online
later.
* BotServ, an original service that allows users to get a permanent,
friendly bot on their channels in an easy way. Each bot can be
configured to monitor the channels against floods, repetitions,
caps writing, and swearing, and to take appropriate actions. It
also can handle user-friendly commands (like !op, !deop, !voice,
!devoice, !kick, and many others), say a short greet message when
an user joins a channel, and even "take over" ChanServ actions such
as auto-opping users, saying the entry notice, and so on. This
service can be disabled if you want to save some bandwidth.
* OperServ, the IRCops' and IRC admins' black box, that allows them
to manage the list of network bans (also known as AKILL (DALnet) or
GLINE (Undernet)), to configure messages displayed to users when
they log on, to set modes and to kick users from any channel, to
send notices quickly to the entire network, and much more!
* HostServ, a neat service that allows users to show custom vHosts
(virtual hosts) instead of their real IP address; this only works
on daemons supporting ip cloaking, such as UnrealIRCd, UltimateIRCd
and ViagraIRCd.
Anope currently works with:
* Bahamut 1.4.27 or later (including 1.8)
* InspIRCd 1.1, 1.2, or 2.0
* Ratbox 2.0.6 or later
* UnrealIRCd 3.2 or later
Anope could also work with some of the daemons derived by the ones listed
above, but there's no support for them if they work or don't work.
3) Installation
See the INSTALL file for instruction on installing Anope.
4) Command Line Options
Normally, Anope can be run simply by invoking the "services" executable.
Any of the following command-line options can be specified to change
the behavior of Anope:
--debug Enable debugging mode; more info sent to log (give
option more times for more info)
--readonly Enable read-only mode; no changes to databases
allowed
--nofork Do not fork after startup; log messages will be
written to terminal
--noexpire Expiration routines won't be run at all
--version Display the version of Anope
--nothird Do not load the non-core modules specified
--protocoldebug Debug each incoming message after protocol parsing
--support Used for support, same as -debug -nofork -nothird
Upon starting, Anope will parse its command-line parameters then
(assuming the -nofork option is not given) detach itself and run in the
background. If Anope encounters a problem reading the database files or
cannot connect to its uplink server, it will terminate immediately;
otherwise, it will run until the connection is terminated (or a QUIT,
SHUTDOWN, or RESTART command is sent; see OperServ's help).
In the case of an error, an appropriate error message will be written to
the log file.
If Anope is run with the "--readonly" command-line option, it can serve as
a "backup" to the full version of services. A "full" version of services
(run without --readonly) will automatically reintroduce its pseudo-clients
(NickServ, ChanServ, etc.), while a "backup" services will not, thus
allowing full services to be brought up at any time without disrupting
the network (and without having to take backup services down beforehand).
The "--debug" option is useful if you find or suspect a problem in Anope.
Giving it once on the command line will cause all traffic to and from
services as well as some other debugging information to be recorded in
the log file; if you send a bug report, PLEASE include an excerpt from
the log file WITH DEBUGGING ACTIVE; we cannot emphasize enough how
important this is to tracking down problems. (You can also enable
debugging while Services is running using OperServ's SET DEBUG command.)
If you repeat use --debug=<level>, the debugging level will be increased,
which provides more detailed information but may also slow Anope down
considerably and make the log file grow dramatically faster. In general,
a debug level of 1 is sufficient for the coding team to be able to trace
a problem, because all network traffic is included and we can usually
reproduce the problem.
5) Messages Translations
Anope has a powerful option in NickServ allowing users to choose what
language it must use when sending messages to users. Messages are stored
in language files (located in the lang directory).
Anope is currently provided with thirteen languages: Catalan, Dutch,
English, French, German, Greek, Hungarian, Italian, Polish, Portuguese,
Russian, Spanish and Turkish. If you want to translate Anope messages
into another language, follow this instructions:
* Copy the lang/en_us.l file to a meaningful name (for example, if
you would like to translate messages in Spanish, you would rename
it to es.l).
* Edit the file with your favorite text editor. Carefully read the
instructions given at the top of the file, and start translating
the whole file. The file is big, so make sure you have some coffee
available ;) Try to avoid the use of English words as much as
possible. If the new language contains only a few 'special'
characters, try and use latin representations of it, if possible.
Remember that most clients are only capable of handling the
ISO-8859-1 charset. Of course, if you are translating Anope to a
language with a totally different charset, such as Russian, feel
free to use the one that suites it best (and the one that is in use
by most speakers of that language ;)).
* When this is done, you have two solutions: either patch Services
source code so they take in account the new language file
(basically, you'll have to modify lang/Makefile, language.c and
maybe services.h), or send us the translated file so we can make
the patch and include your language in the next Anope release.
* Note that there is a language tool on bin/langtool.pl that can aid
the verification process on newly created language files. Try to
use it before you submit a language file.
When new major releases come out, you'll not have to retranslate the
whole file; the Changes.lang file will help you to know which messages
were added, modified or deleted.
If you did a language file translation, and want to let others use it,
please send it to team@anope.org (don't forget to mention clearly your
(nick)name, your e-mail and the language name). You'll of course get full
credit for it, and will even get future final major releases before
anyone else to complete the translation!... ;)
6) Contact
For announcements and discussions about Anope, please visit our
Portal and Forums at http://www.anope.org/ -- make sure you register
yourself and your network to get full benefits.
If you read the documentation carefully, and didn't find the answer to
your question, feel free to post on the website forums or join our irc
channel (irc.anope.org #anope). Once you join our Support channel, just
type "? report" for instructions on how to report a Bug. Be as precise as
possible when asking a question, because we have no extraordinary powers
and can't guess things if they aren't provided. The more precise you are,
the sooner you'll be likely to get an answer.
If you think you found a bug, add it to the bug tracking system
(http://bugs.anope.org) and - again - be as precise as possible. Also say
whether the bug happens always or under what circumstances, and anything
that could be useful to track your bug down. If you wrote a patch, send
it over. :)
Anope -- a set of IRC services for IRC networks
-----------------------------------------------
Anope is 2003-2011 Anope Team <team@anope.org>.
Based on Epona 2000-2002 PegSoft <epona@pegsoft.net>.
Based on Services 1996-1999 Andrew Church <achurch@achurch.org>.
This program is free but copyrighted software; see the file COPYING for
details.
Information about Anope may be found at http://www.anope.org/
Information about Epona may be found at http://www.epona.org/
Information about Services may be found at http://www.ircservices.esper.net/
Table of Contents
-----------------
1) Credits
2) Presentation
3) Installation
4) Command Line Options
5) Messages Translation
6) Contact and Mailing List
1) Credits
Anope is based on Lara's Epona version 1.4.14.
Epona is based on Andy Church's IRC Services version 4.3.3.
The original credits:
* Mauritz Antunes
Portuguese translation
* Jose R. Holzmann, Raul S. Villarreal
Spanish translation
* Andrew Kempe <theshadow@shadowfire.org>
News system
* <d.duca@eurcom.net>
Italian translation
* <mikado@holyfire.com>
Turkish translation
* Andrew Kempe <theshadow@shadowfire.org>
Session limiting
Epona credits:
* lara <lara@pegsoft.net>
Main coding
* CafeiN <oytuny@yahoo.com>
Turkish translation
* Sylvain Cresto aka tost <scresto@netsante.fr>
FreeBSD 5 patch
* Marcelo Conde Foscarini aka Bras <ircadmin@brmarket.net>
Portuguese translation
* Alvaro Toledo aka POLLITO <atoledo@keldon.org>
Spanish translation
* chemical <chemical@musicplay.de>
German translation
* shine <dh@shinewelt.de>
German translation
* Guven Guzelbey aka MeShGuL <guzelbey@cs.utk.edu>
Turkish translation
* Jordi Pujol <jordi.pujol@aujac.org>
Catalan translation
* Eva Dachs <evadachs@terra.es>
Catalan translation
* Toni Perez <toni.perez@aujac.org>
Catalan translation
* Sergios Karalis <sergios_k@hotmail.com>
Greek translation
* Thomas J. Stensas aka ShadowMaster <shadowmaster@shadow-realm.org>
Ultimate 3.x support
Anope credits:
* Adam Kramer <ribosome@anope.org>
* Adam <adam@anope.org>
* Alvaro Toledo <atoledo@keldon.org>
* Amanda Folson <amanda@anope.org>
* Andrew Berquist <vash@anope.org>
* Björn Stiddien <keeper@anope.org>
* Charles Kingsley <chaz@anope.org>
* Chris Hogben <heinz@anope.org>
* Daniel Engel <dane@zero.org>
* David <dv@diboo.net>
* David Narayan <jester@phrixus.net>
* David Robson <rob@anope.org>
* Daniele Nicolucci <jollino@sogno.net>
* Florian Schulze <certus@anope.org>
* Gabriel Acevedo H. <drstein@anope.org>
* Jan Milants <viper@anope.org>
* Jens Voss <dukepyrolator@anope.org>
* JH <jh@irc-chat.net>
* Joris Vink <joris@anope.org>
* Lee Holmes <lethality@anope.org>
* Lucas Nussbaum <lucas@lucas-nussbaum.net>
* Mark Summers <mark@goopler.net>
* Matthew Beeching <jobe@invictachat.net>
* Naram Qashat <cyberbotx@anope.org>
* Phil Lavin <phil@anope.org>
* Pieter Bootsma <geniusdex@anope.org>
* Robin Burchell <w00t@inspircd.org>
* Sean Roe <therock247uk@anope.org>
* Sebastian V <hal9000@anope.org>
* Thomas Juberg Stensås <ShadowMaster@Shadow-Realm.org>
* Trystan .S Lee <trystan@nomadirc.net>
* openglx <openglx@brasnerd.com.br>
Anope Translations:
* GeniusDex <geniusdex@anope.org> (nl.l)
* Kein <kein-of@yandex.ru> (ru.l)
* Maik Funke <Han@mefalcon.org> (de.l)
* Gabriel Acevedo H. <drstein@anope.org> (es.l)
* Janos Kapitany <sarkanyka@cjbchat.hu> (hun.l)
* Szymon S'wierkosz <szymek@adres.pl> (pl.l)
* Christopher N. <saka@epiknet.org> (fr.l)
* Yusuf Kurekci <ysfm.20@gmail.com> (tr.l)
Anope uses the strlcat() and strlcpy() functions from OpenSSH 2.5.1p2.
These functions are copyrighted by Todd C. Miller:
Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote
products derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED `AS IS'' AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
2) Presentation
Anope is a set of Services for IRC networks that allows users to manage
their nicks and channels in a secure and efficient way, and administrators
to manage their network with powerful tools.
Currently available services are:
* NickServ, a powerful nickname manager that users can use to protect
themselves against nick stealing. Each user has its own nickname
group, that allows the user to register as many nicks as needed
while still being able to take profit of his privileges and to
modify the nick configuration. NickServ also has an optional
password retrieval feature.
* ChanServ, a powerful channel manager that helps users to administer
their channels in a totally customizable way. ChanServ has an
internal list of privileged users and banned users that controls
accesses on a per-channel basis. It eliminates all takeover
problems, because of its powerful op/unban/invite and even mass
deop and mass kick functions.
* MemoServ, an helpful companion that allows sending short messages
to offline users, that they can then read when they come online
later.
* BotServ, an original service that allows users to get a permanent,
friendly bot on their channels in an easy way. Each bot can be
configured to monitor the channels against floods, repetitions,
caps writing, and swearing, and to take appropriate actions. It
also can handle user-friendly commands (like !op, !deop, !voice,
!devoice, !kick, and many others), say a short greet message when
an user joins a channel, and even "take over" ChanServ actions such
as auto-opping users, saying the entry notice, and so on. This
service can be disabled if you want to save some bandwidth.
* OperServ, the IRCops' and IRC admins' black box, that allows them
to manage the list of network bans (also known as AKILL (DALnet) or
GLINE (Undernet)), to configure messages displayed to users when
they log on, to set modes and to kick users from any channel, to
send notices quickly to the entire network, and much more!
* HostServ, a neat service that allows users to show custom vHosts
(virtual hosts) instead of their real IP address; this only works
on daemons supporting ip cloaking, such as UnrealIRCd.
Anope currently works with:
* Bahamut 1.4.27 or later (including 1.8)
* InspIRCd 1.1, 1.2, or 2.0
* Ratbox 2.0.6 or later
* UnrealIRCd 3.2 or later
* Plexus 3 or later
* ngIRCd 17.1 or later
Anope could also work with some of the daemons derived by the ones listed
above, but there's no support for them if they work or don't work.
3) Installation
See the INSTALL file for instruction on installing Anope.
4) Command Line Options
Normally, Anope can be run simply by invoking the "services" executable.
Any of the following command-line options can be specified to change
the behavior of Anope:
--debug Enable debugging mode; more info sent to log (give
option more times for more info)
--readonly Enable read-only mode; no changes to databases
allowed
--nofork Do not fork after startup; log messages will be
written to terminal
--noexpire Expiration routines won't be run at all
--version Display the version of Anope
--nothird Do not load the non-core modules specified
--protocoldebug Debug each incoming message after protocol parsing
--support Used for support, same as -debug -nofork -nothird
Upon starting, Anope will parse its command-line parameters then
(assuming the -nofork option is not given) detach itself and run in the
background. If Anope encounters a problem reading the database files or
cannot connect to its uplink server, it will terminate immediately;
otherwise, it will run until the connection is terminated (or a QUIT,
SHUTDOWN, or RESTART command is sent; see OperServ's help).
In the case of an error, an appropriate error message will be written to
the log file.
If Anope is run with the "--readonly" command-line option, it can serve as
a "backup" to the full version of services. A "full" version of services
(run without --readonly) will automatically reintroduce its pseudo-clients
(NickServ, ChanServ, etc.), while a "backup" services will not, thus
allowing full services to be brought up at any time without disrupting
the network (and without having to take backup services down beforehand).
The "--debug" option is useful if you find or suspect a problem in Anope.
Giving it once on the command line will cause all traffic to and from
services as well as some other debugging information to be recorded in
the log file; if you send a bug report, PLEASE include an excerpt from
the log file WITH DEBUGGING ACTIVE; we cannot emphasize enough how
important this is to tracking down problems. (You can also enable
debugging while Services is running using OperServ's SET DEBUG command.)
If you repeat use --debug=<level>, the debugging level will be increased,
which provides more detailed information but may also slow Anope down
considerably and make the log file grow dramatically faster. In general,
a debug level of 1 is sufficient for the coding team to be able to trace
a problem, because all network traffic is included and we can usually
reproduce the problem.
5) Messages Translations
Please see LANGUAGE for this information
6) Contact
For announcements and discussions about Anope, please visit our
Portal and Forums at http://www.anope.org/ -- make sure you register
yourself to get full benefits.
If you read the documentation carefully, and didn't find the answer to
your question, feel free to post on the website forums or join our irc
channel (irc.anope.org #anope). Once you join our Support channel be as
precise as possible when asking a question, because we have no extraordinary
powers and can't guess things if they aren't provided.
The more precise you are the sooner you'll be likely to get an answer.
If you think you found a bug, add it to the bug tracking system
(http://bugs.anope.org) and - again - be as precise as possible. Also say
whether the bug happens always or under what circumstances, and anything
that could be useful to track your bug down. If you wrote a patch, send
it over. :)
+2 -2
View File
@@ -10,10 +10,10 @@ Anope Bundled Tools
options. To use the SMTP client instead of sendmail, find the line in your
services configuration file (services.conf) that defines sendmailpath. On
that line, change the path to your services installation directory, then
followed by "tools/anopesmtp" and the IP address of a valid SMTP server. It
followed by "bin/anopesmtp" and the IP address of a valid SMTP server. It
should look like this:
sendmailpath = "/home/anope/services/tools/anopesmtp 127.0.0.1"
sendmailpath = "/home/anope/services/bin/anopesmtp 127.0.0.1"
If the SMTP client doesn't send mail, or if there's an other problem with
it, you can compile it in debug mode. To do this, open anopesmtp.cpp, and look
-309
View File
@@ -1,309 +0,0 @@
Troubleshooting Guide for Anope 1.9
------------------------------------------------
NOTE:
An updated version of this guide can be found on our wiki:
http://wiki.anope.org/index.php/Troubleshooting
Table of Contents
-----------------
1) General
1.1) Anope complains in the logfile about being unable to load the default
language.
1.2) Anope spricht kein Deutsch!, etc. (Anope doesn't speak my language!)
1.3) I selected a language other than English, but sometimes Anope sends
responses in English instead.
1.4) Anope always dies after about five minutes, saying "FATAL ERROR! Can't
back up nick.db".
1.5) Anope crashed with a segmentation fault.
1.6) I've found a bug that's not mentioned here or in the README or BUGS
files. What should I do?
1.7) My FreeBSD box complains about 'Shared object "nss_dns.so.1" not
found'
1.8) Anope and long (more then 30 character) nicknames.
2) Installation / Configuration
2.1) When I run "make", I get an error message like "missing separator",
"Unassociated shell command", "Unexpected end of line seen", etc.
2.2) I get an error like "Makefile.inc not found".
2.3) I typed "./services" at the command line, but nothing happened!
2.4) Whenever I start Anope, I get a message on my IRC server saying
"connection refused" or something similar, and Anope gives an error
message from the server saying "Closing Link: ...".
2.5) My IRC server is giving me messages like "Connection to
services.whatever.net[127.0.0.1] activated" and then "Access denied --
no N line". Why?
2.6) When I say "/connect services.*", it doesn't work!
2.7) Anope starts up okay, but if I try to register a nickname, it comes
back with "Sorry, registration failed."
2.8) Anope reports (via /stats u or /msg OperServ STATS) a different number
of users online than I get from doing /lusers.
3) BotServ
3.1) How do I add bots to BotServ?
3.2) Why do kick triggers and fantasy commands fail to work with my Bahamut
IRCd?
4) ChanServ
4.1) Anope's channel mode setting doesn't work. I can't set modes with
OperServ, and every time ChanServ tries to set a mode, my server
reverses the change.
4.2) Anope ignored the SET SUCCESSOR setting and deleted a channel when the
founder expired.
4.3) How to auto voice all those whom join my #channel?
4.4) Channel options like RESTRICTED or SECUREOPS don't work. What's wrong?
5) OperServ
5.1) Using the OperServ JUPE command results in server messages like
"Server juped.server introduced by non-hub server services.my.net".
5.2) When I add an AKILL, the users matching it don't get killed.
5.3) Trying to use OperServ gives me "Access denied".
5.4) I can't get /OS UMODES and /OS SVSNICK to work!
5.5) What is a Super-Admin? How does it work? Why might it not work?
-------------------------------------------------------------------------------
1) General
1.1) Anope complains in the logfile about being unable to load the default
language.
You forgot to run "make install".
1.2) Anope spricht kein Deutsch!, etc. (Anope doesn't speak my language!)
See section 5 of the README file.
1.3) I selected a language other than English, but sometimes Anope sends
responses in English instead.
Some language files are not complete--in other words, they only have a
translation of some of the message Anope uses. In this case, the
missing messages will be displayed in English. You can either wait for
the primary translator to provide us with a translation, or do the
translation yourself and send us the messages translated into your
language.
1.4) Anope always dies after about five minutes, saying "FATAL ERROR! Can't
back up nick.db".
Make sure that the user Anope runs as has write access to the data
directory, and that the data directory actually exists (the latter
shouldn't be a problem if you ran the Config script). This means Anope
needs write and execute permission on the data directory itself and execute
permission on every parent directory of the data directory.
1.5) Anope crashed with a segmentation fault.
See if you can reproduce this by doing a certain sequence of things. If
so, please report it to us (see part 6 of README file). If not, you're
probably out of luck; if you like, you can report it to us anyway, but
chances are it won't get fixed if we don't have instructions on reproducing
it. If you do have such a problem, you may find the crontab utility useful
for dealing with it.
Also, see the DumpCore directive in the configuration file. It allows Anope
to dump its core whenever it's segfaulting, usually calling it core and
placing it into Anope's main directory. Open up gdb by issuing the
following command at your shell:
* gdb services core
(of course replacing 'core' with the name of the core if different) and
type 'bt' at the gdb prompt. After that, send us the output you got and
keep the core file in a safe place, in case we need it to dig deeper into
the problem.
1.6) I've found a bug that's not mentioned here or in the README or BUGS files.
What should I do?
See section 6 of the README file.
1.7) My FreeBSD box complains about 'Shared object "nss_dns.so.1" not found'
We haven't figured out the exact cause yet, but as a quickfix you can
delete the /etc/nsswitch.conf file. Please keep in mind that removing a
configuration file can be dangerous, so only do this if you know what you
are doing.
1.8) Anope and long (more then 30 character) nicknames.
By default, Anope only supports nicknames up to 30 characters (NICKLEN=30).
If your IRCd allows for longer nicknames or has been modified to do so
Anope will start logging a lot of ("NICK from nonexistent nick") messages.
This is because once a user uses a nick that is too long for Anope to handle,
Anope loses track of the user for the remainder of the session.
It is POSSIBLE but not NOT RECOMMENDED to extend the maximum length of nicknames
Anope can track, however this will also break database compatibility. DBs saved
with Anope set to allow for example 40 chars cannot be read by a clean Anope
installation and vice versa. So changing the maximum nick length is only possible
when starting with fresh databases and even then the consequences of this are
UNTESTED.
In order to change the maximum internal nick length, change the NICKMAX setting
in include/config.h, recompile anope and start without databases.
2) Installation / Configuration
2.1) When I run "make", I get an error message like "missing separator",
"Unassociated shell command", "Unexpected end of line seen", etc.
Your make program isn't compatible with the Makefile for Anope. The
Makefile was designed to work with GNU make, and as such may not work on
other systems' "make" programs. If you get an error from "make", obtain
GNU make from ftp://prep.ai.mit.edu/pub/gnu/make/ (or wherever you prefer) and
use it instead of your system's default "make". Note that GNU make may
already be installed on your system; try using the command "gmake" instead
of "make".
The make programs bundled with SunOS/Solaris and FreeBSD have been reported
not to work; you will need to use GNU make on these systems.
2.2) I get an error like "Makefile.inc not found".
You forgot to run the Config script first. See the INSTALL file for
compilation instructions.
2.3) I typed "./services" at the command line, but nothing happened!
Anope puts itself in the background when it starts, so you get your shell
prompt right back. Meanwhile, Anope will continue setting up, then connect
to the IRC server specified in services.conf (or on the command line). If
it doesn't connect, you probably specified the wrong IRCd or RemoteServer in
the configuration file. Check to make sure that you are actually running one of
the supported IRCds, also. A list of supported IRCds can be found in the README
file.
You can also check the log file (services.log by default) for error
messages. Starting services with the -support command line option
will prevent it from running in the background will output the
messages written to the log file to the console as well. Please note that this
will also prevent 3rd party modules from loading and will put Anope into
debug mode.
2.4) Whenever I start Anope, I get a message on my IRC server saying
"connection refused" or something similar, and Anope gives an error
message from the server saying "Closing Link: ...".
See section 3 of the INSTALL file.
2.5) My IRC server is giving me messages like "Connection to
services.whatever.net[127.0.0.1] activated" and then "Access denied -- no
N line". Why?
This is typically caused by including a port number in the C:line for
services, which tells your server to try to autoconnect to it (depending on
the class (Y:line) settings). This is not what you want, because Anope
will connect to the server itself, but does not listen for servers to
connect to it. The solution is to remove the port number from the C:line.
2.6) When I say "/connect services.*", it doesn't work!
You cannot /connect services. When you start Anope, it will attempt to
connect to the server you specified in services.conf. Please see the answer
above for more information.
2.7) Anope starts up okay, but if I try to register a nickname, it comes back
with "Sorry, registration failed."
Make sure you've selected the correct IRC server type in the configure
script; see section 3 of the INSTALL file for details.
2.8) Anope reports (via /stats u or /msg OperServ STATS) a different number of
users online than I get from doing /lusers.
Anope doesn't count its own pseudo-clients (NickServ, ChanServ, etc.) in
its user count, while the IRC server does.
3) BotServ
3.1) How do I add bots to BotServ?
Read /msg BotServ HELP and /msg BotServ HELP BOT. Note that you need to be
opered up and identified as a Services Administrator in Anope before you
can use the BOT command.
3.2) Why do kick triggers and fantasy commands fail to work with my Bahamut
IRCd?
Bahamut allows you to setup a server as 'serviceshub'. This will filter
certain data that services usually don't need to process. This option also
filters channel messages, because DALnet's services have no use for them.
Anope parses the channel messages for kick triggers and fantasy commands.
To make sure these work the server type of the hub they're linked to should
be simply 'hub' and not 'serviceshub'.
4) ChanServ
4.1) Anope's channel mode setting doesn't work. I can't set modes with
OperServ, and every time ChanServ tries to set a mode, my server reverses
the change.
Make sure EVERY server on your network has a U: line for Services in
ircd.conf, for example:
U:services.whatever.net:*:*
4.2) Anope ignored the SET SUCCESSOR setting and deleted a channel when the
founder expired.
Normally, this is because the successor had too many channels registered.
In this case, you will see an entry in the log file like the following:
[date] Successor (SuccessorNick) of channel #somechannel owns too many
channels, deleting channel #somechannel
If you don't get a message like this or you can verify that the successor
wasn't running into the channel limit, please report it using the
bug-reporting procedure in section 6 of the README file.
4.3) How to auto voice all those whom join my #channel?
Execute the following commands (/cs is an alias for /msg ChanServ):
/cs set #channel secure off
/cs set #channel xop off
/cs levels #channel set AUTOVOICE -1
4.4) Channel options like RESTRICTED or SECUREOPS don't work. What's wrong?
Make sure that you didn't put any of your normal IRCd's as a ULined server
in Anope. Some access checks for clients from ULined servers are skipped to
avoid fights between the ULined servers. This is usually only useful when
you have a statistics server connected to your network.
5) OperServ
5.1) Using the OperServ JUPE command results in server messages like "Server
juped.server introduced by non-hub server services.my.net".
Services' uplink must have an H: line for Services in the ircd.conf file,
which looks something like:
H:*::services.whatever.net
5.2) When I add an AKILL, the users matching it don't get killed.
Use the AkillOnAdd configuration directive.
5.3) Trying to use OperServ gives me "Access denied".
Check that you're opered on your IRCd (ie, moded +o)
Check that you're identified to a nickname listed within an opertype allowed to do the command you're trying.
Check whether you can use /msg operserv staff
5.4) I can't get /OS UMODES and /OS SVSNICK to work!
You need to be a SuperAdmin to be able to use these commands.
5.5) What is a Super-Admin? How does it work? Why might it not work?
SuperAdmin's have extra privileges, including being founder on all
channels. It must be activated on a per user basis and is only available to
Services Roots. It is set using OperServ and is not persistent. It only
works if SuperAdmin is not commented in the services configuration file,
which is commented out by default. Read /msg OperServ HELP SET SUPERADMIN
for further help.
+6
View File
@@ -174,6 +174,12 @@ class DNSManager : public Timer
void Tick(time_t now);
void Cleanup(Module *mod);
/** Does a BLOCKING DNS query and returns the first IP.
* Only use this if you know what you are doing. Unless you specifically
* need a blocking query use the DNSRequest system
*/
static DNSRecord BlockingQuery(const Anope::string &mask, QueryType qt);
};
/** A DNS timeout, one is made for every DNS request to detect timeouts
+1
View File
@@ -1245,6 +1245,7 @@ enum LanguageString
NICK_SERVADMIN_HELP_FORBID,
NICK_SERVADMIN_HELP_SUSPEND,
NICK_SERVADMIN_HELP_UNSUSPEND,
CHAN_HELP_CMD_REGISTER,
CHAN_HELP_CMD_FORBID,
CHAN_HELP_CMD_SUSPEND,
CHAN_HELP_CMD_UNSUSPEND,
+16
View File
@@ -138,11 +138,13 @@ class CoreExport XLineManager
*/
virtual XLine *Add(BotInfo *bi, User *u, const Anope::string &mask, time_t expires, const Anope::string &reason);
private:
/** Delete an XLine, eg, remove it from the IRCd.
* @param x The xline
*/
virtual void Del(XLine *x);
public:
/** Checks if a mask can/should be added to the XLineManager
* @param mask The mask
* @param expires When the mask would expire
@@ -176,6 +178,10 @@ class CoreExport XLineManager
* @param x The xline
*/
virtual void OnExpire(XLine *x);
/** Called to send an XLine to the IRCd
*/
virtual void Send(XLine *x) = 0;
};
/* This is for AKILLS */
@@ -189,6 +195,8 @@ class SGLineManager : public XLineManager
void OnMatch(User *u, XLine *x);
void OnExpire(XLine *x);
void Send(XLine *x);
};
class SNLineManager : public XLineManager
@@ -201,6 +209,10 @@ class SNLineManager : public XLineManager
void OnMatch(User *u, XLine *x);
void OnExpire(XLine *x);
void Send(XLine *x);
XLine *Check(User *u);
};
class SQLineManager : public XLineManager
@@ -214,6 +226,8 @@ class SQLineManager : public XLineManager
void OnExpire(XLine *x);
void Send(XLine *x);
static bool Check(Channel *c);
};
@@ -227,6 +241,8 @@ class SZLineManager : public XLineManager
void OnMatch(User *u, XLine *x);
void OnExpire(XLine *x);
void Send(XLine *x);
};
#endif // OPERSERV_H
+1 -1
View File
@@ -485,7 +485,7 @@ class Memo : public Flags<MemoFlag>
struct CoreExport MemoInfo
{
unsigned memomax;
int16 memomax;
std::vector<Memo *> memos;
unsigned GetIndex(Memo *m) const;
+8 -1
View File
@@ -54,12 +54,19 @@ int main(int argc, char *argv[])
std::string version_build = "#define VERSION_BUILD 1";
std::string build = "#define BUILD 1";
std::string version_extra;
if (fd.is_open())
{
while (getline(fd, filebuf))
{
if (!filebuf.find("#define VERSION_BUILD"))
version_build = filebuf;
else if (!filebuf.find("#define VERSION_EXTRA"))
{
size_t q = filebuf.find('"');
version_extra = filebuf.substr(q + 1, filebuf.length() - q - 2);
}
else if (!filebuf.find("#define BUILD"))
{
size_t tab = filebuf.find(' ');
@@ -89,7 +96,7 @@ int main(int argc, char *argv[])
for (std::list<std::pair<std::string, std::string> >::iterator it = versions.begin(), it_end = versions.end(); it != it_end; ++it)
{
if (it->first == "EXTRA")
fd << "#define VERSION_EXTRA \"" << it->second << "\"" << std::endl;
fd << "#define VERSION_EXTRA \"" << (!version_extra.empty() ? version_extra : "") << (version_extra.find(it->second) == std::string::npos ? it->second : "") << "\"" << std::endl;
else
fd << "#define VERSION_" << it->first << " " << it->second << std::endl;
}
+2 -1
View File
@@ -202,9 +202,10 @@ class CommandBSBadwords : public Command
bool override = !check_access(u, ci, CA_BADWORDS);
Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "DEL " << badword->word;
ci->EraseBadWord(i);
u->SendMessage(BotServ, BOT_BADWORDS_DELETED, badword->word.c_str(), ci->name.c_str());
ci->EraseBadWord(i);
}
return MOD_CONT;
+100 -59
View File
@@ -51,13 +51,14 @@ class CommandBSKick : public Command
{
if (!ttb.empty())
{
Anope::string error;
ci->ttb[TTB_BADWORDS] = convertTo<int16>(ttb, error, false);
/* Only error if errno returns ERANGE or EINVAL or we are less then 0 - TSL */
if (!error.empty() || ci->ttb[TTB_BADWORDS] < 0)
try
{
ci->ttb[TTB_BADWORDS] = convertTo<int16>(ttb);
if (ci->ttb[TTB_BADWORDS] < 0)
throw CoreException();
}
catch (const CoreException &)
{
/* leaving the debug behind since we might want to know what these are */
Log(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_BADWORDS];
/* reset the value back to 0 - TSL */
ci->ttb[TTB_BADWORDS] = 0;
u->SendMessage(BotServ, BOT_KICK_BAD_TTB, ttb.c_str());
@@ -66,6 +67,7 @@ class CommandBSKick : public Command
}
else
ci->ttb[TTB_BADWORDS] = 0;
ci->botflags.SetFlag(BS_KICK_BADWORDS);
if (ci->ttb[TTB_BADWORDS])
u->SendMessage(BotServ, BOT_KICK_BADWORDS_ON_BAN, ci->ttb[TTB_BADWORDS]);
@@ -84,11 +86,14 @@ class CommandBSKick : public Command
{
if (!ttb.empty())
{
Anope::string error;
ci->ttb[TTB_BOLDS] = convertTo<int16>(ttb, error, false);
if (!error.empty() || ci->ttb[TTB_BOLDS] < 0)
try
{
ci->ttb[TTB_BOLDS] = convertTo<int16>(ttb);
if (ci->ttb[TTB_BOLDS] < 0)
throw CoreException();
}
catch (const CoreException &)
{
Log(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_BOLDS];
ci->ttb[TTB_BOLDS] = 0;
u->SendMessage(BotServ, BOT_KICK_BAD_TTB, ttb.c_str());
return MOD_CONT;
@@ -117,11 +122,14 @@ class CommandBSKick : public Command
if (!ttb.empty())
{
Anope::string error;
ci->ttb[TTB_CAPS] = convertTo<int16>(ttb, error, false);
if (!error.empty() || ci->ttb[TTB_CAPS] < 0)
try
{
ci->ttb[TTB_CAPS] = convertTo<int16>(ttb);
if (ci->ttb[TTB_CAPS] < 0)
throw CoreException();
}
catch (const CoreException &)
{
Log(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_CAPS];
ci->ttb[TTB_CAPS] = 0;
u->SendMessage(BotServ, BOT_KICK_BAD_TTB, ttb.c_str());
return MOD_CONT;
@@ -130,17 +138,21 @@ class CommandBSKick : public Command
else
ci->ttb[TTB_CAPS] = 0;
if (min.empty())
ci->capsmin = 10;
else
ci->capsmin = min.is_number_only() ? convertTo<int16>(min) : 10;
ci->capsmin = 10;
try
{
ci->capsmin = convertTo<int16>(min);
}
catch (const CoreException &) { }
if (ci->capsmin < 1)
ci->capsmin = 10;
if (percent.empty())
ci->capspercent = 25;
else
ci->capspercent = percent.is_number_only() ? convertTo<int16>(percent) : 25;
ci->capspercent = 25;
try
{
ci->capspercent = convertTo<int16>(percent);
}
catch (const CoreException &) { }
if (ci->capspercent < 1 || ci->capspercent > 100)
ci->capspercent = 25;
@@ -162,11 +174,14 @@ class CommandBSKick : public Command
{
if (!ttb.empty())
{
Anope::string error;
ci->ttb[TTB_COLORS] = convertTo<int16>(ttb, error, false);
if (!error.empty() || ci->ttb[TTB_COLORS] < 0)
try
{
ci->ttb[TTB_COLORS] = convertTo<int16>(ttb);
if (ci->ttb[TTB_COLORS] < 1)
throw CoreException();
}
catch (const CoreException &)
{
Log(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_COLORS];
ci->ttb[TTB_COLORS] = 0;
u->SendMessage(BotServ, BOT_KICK_BAD_TTB, ttb.c_str());
return MOD_CONT;
@@ -174,6 +189,7 @@ class CommandBSKick : public Command
}
else
ci->ttb[TTB_COLORS] = 0;
ci->botflags.SetFlag(BS_KICK_COLORS);
if (ci->ttb[TTB_COLORS])
u->SendMessage(BotServ, BOT_KICK_COLORS_ON_BAN, ci->ttb[TTB_COLORS]);
@@ -195,11 +211,14 @@ class CommandBSKick : public Command
if (!ttb.empty())
{
Anope::string error;
ci->ttb[TTB_FLOOD] = convertTo<int16>(ttb, error, false);
if (!error.empty() || ci->ttb[TTB_FLOOD] < 0)
try
{
ci->ttb[TTB_FLOOD] = convertTo<int16>(ttb);
if (ci->ttb[TTB_FLOOD] < 1)
throw CoreException();
}
catch (const CoreException &)
{
Log(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_FLOOD];
ci->ttb[TTB_FLOOD] = 0;
u->SendMessage(BotServ, BOT_KICK_BAD_TTB, ttb.c_str());
return MOD_CONT;
@@ -208,19 +227,25 @@ class CommandBSKick : public Command
else
ci->ttb[TTB_FLOOD] = 0;
if (lines.empty())
ci->floodlines = 6;
else
ci->floodlines = lines.is_number_only() ? convertTo<int16>(lines) : 6;
ci->floodlines = 6;
try
{
ci->floodlines = convertTo<int16>(lines);
}
catch (const CoreException &) { }
if (ci->floodlines < 2)
ci->floodlines = 6;
if (secs.empty())
ci->floodsecs = 10;
else
ci->floodsecs = secs.is_number_only() ? convertTo<int16>(secs) : 10;
if (ci->floodsecs < 1 || ci->floodsecs > Config->BSKeepData)
ci->floodsecs = 10;
try
{
ci->floodsecs = convertTo<int16>(secs);
}
catch (const CoreException &) { }
if (ci->floodsecs < 1)
ci->floodsecs = 10;
if (ci->floodsecs > Config->BSKeepData)
ci->floodsecs = Config->BSKeepData;
ci->botflags.SetFlag(BS_KICK_FLOOD);
if (ci->ttb[TTB_FLOOD])
@@ -242,11 +267,14 @@ class CommandBSKick : public Command
if (!ttb.empty())
{
Anope::string error;
ci->ttb[TTB_REPEAT] = convertTo<int16>(ttb, error, false);
if (!error.empty() || ci->ttb[TTB_REPEAT] < 0)
try
{
ci->ttb[TTB_REPEAT] = convertTo<int16>(ttb);
if (ci->ttb[TTB_REPEAT] < 0)
throw CoreException();
}
catch (const CoreException &)
{
Log(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_REPEAT];
ci->ttb[TTB_REPEAT] = 0;
u->SendMessage(BotServ, BOT_KICK_BAD_TTB, ttb.c_str());
return MOD_CONT;
@@ -255,10 +283,12 @@ class CommandBSKick : public Command
else
ci->ttb[TTB_REPEAT] = 0;
if (times.empty())
ci->repeattimes = 3;
else
ci->repeattimes = times.is_number_only() ? convertTo<int16>(times) : 3;
ci->repeattimes = 3;
try
{
ci->repeattimes = convertTo<int16>(times);
}
catch (const CoreException &) { }
if (ci->repeattimes < 2)
ci->repeattimes = 3;
@@ -280,11 +310,14 @@ class CommandBSKick : public Command
{
if (!ttb.empty())
{
Anope::string error;
ci->ttb[TTB_REVERSES] = convertTo<int16>(ttb, error, false);
if (!error.empty() || ci->ttb[TTB_REVERSES] < 0)
try
{
ci->ttb[TTB_REVERSES] = convertTo<int16>(ttb);
if (ci->ttb[TTB_REVERSES] < 0)
throw CoreException();
}
catch (const CoreException &)
{
Log(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_REVERSES];
ci->ttb[TTB_REVERSES] = 0;
u->SendMessage(BotServ, BOT_KICK_BAD_TTB, ttb.c_str());
return MOD_CONT;
@@ -310,11 +343,14 @@ class CommandBSKick : public Command
{
if (!ttb.empty())
{
Anope::string error;
ci->ttb[TTB_UNDERLINES] = convertTo<int16>(ttb, error, false);
if (!error.empty() || ci->ttb[TTB_UNDERLINES] < 0)
try
{
ci->ttb[TTB_UNDERLINES] = convertTo<int16>(ttb);
if (ci->ttb[TTB_REVERSES] < 0)
throw CoreException();
}
catch (const CoreException &)
{
Log(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_UNDERLINES];
ci->ttb[TTB_UNDERLINES] = 0;
u->SendMessage(BotServ, BOT_KICK_BAD_TTB, ttb.c_str());
return MOD_CONT;
@@ -322,6 +358,7 @@ class CommandBSKick : public Command
}
else
ci->ttb[TTB_UNDERLINES] = 0;
ci->botflags.SetFlag(BS_KICK_UNDERLINES);
if (ci->ttb[TTB_UNDERLINES])
u->SendMessage(BotServ, BOT_KICK_UNDERLINES_ON_BAN, ci->ttb[TTB_UNDERLINES]);
@@ -340,11 +377,14 @@ class CommandBSKick : public Command
{
if (!ttb.empty())
{
Anope::string error;
ci->ttb[TTB_ITALICS] = convertTo<int16>(ttb, error, false);
if (!error.empty() || ci->ttb[TTB_ITALICS] < 0)
try
{
ci->ttb[TTB_ITALICS] = convertTo<int16>(ttb);
if (ci->ttb[TTB_ITALICS] < 0)
throw CoreException();
}
catch (const CoreException &)
{
Log(LOG_DEBUG) << "remainder of ttb " << error << " ttb " << ci->ttb[TTB_ITALICS];
ci->ttb[TTB_ITALICS] = 0;
u->SendMessage(BotServ, BOT_KICK_BAD_TTB, ttb.c_str());
return MOD_CONT;
@@ -352,6 +392,7 @@ class CommandBSKick : public Command
}
else
ci->ttb[TTB_ITALICS] = 0;
ci->botflags.SetFlag(BS_KICK_ITALICS);
if (ci->ttb[TTB_ITALICS])
u->SendMessage(BotServ, BOT_KICK_ITALICS_ON_BAN, ci->ttb[TTB_ITALICS]);
+21 -11
View File
@@ -162,9 +162,15 @@ class CommandCSAccess : public Command
CommandReturn DoAdd(User *u, ChannelInfo *ci, const std::vector<Anope::string> &params)
{
Anope::string nick = params[2];
int level = params[3].is_number_only() ? convertTo<int>(params[3]) : ACCESS_INVALID;
int ulev = get_access(u, ci);
int level = ACCESS_INVALID;
try
{
level = convertTo<int>(params[3]);
}
catch (const CoreException &) { }
if (level >= ulev && !u->Account()->HasPriv("chanserv/access/modify"))
{
u->SendMessage(ChanServ, ACCESS_DENIED);
@@ -456,20 +462,24 @@ class CommandCSLevels : public Command
Anope::string what = params[2];
Anope::string lev = params[3];
Anope::string error;
int level = (lev.is_number_only() ? convertTo<int>(lev, error, false) : 0);
if (!lev.is_number_only())
error = "1";
int level = 0;
if (lev.equals_ci("FOUNDER"))
{
level = ACCESS_FOUNDER;
error.clear();
else
{
try
{
level = convertTo<int>(lev);
}
catch (const CoreException &)
{
this->OnSyntaxError(u, "SET");
return MOD_CONT;
}
}
if (!error.empty())
this->OnSyntaxError(u, "SET");
else if (level <= ACCESS_INVALID || level > ACCESS_FOUNDER)
if (level <= ACCESS_INVALID || level > ACCESS_FOUNDER)
u->SendMessage(ChanServ, CHAN_LEVELS_RANGE, ACCESS_INVALID + 1, ACCESS_FOUNDER - 1);
else
{
@@ -502,7 +512,7 @@ class CommandCSLevels : public Command
Anope::string what = params[2];
/* Don't allow disabling of the founder level. It would be hard to change it back if you dont have access to use this command */
if (what.equals_ci("FOUNDER"))
if (!what.equals_ci("FOUNDER"))
for (int i = 0; levelinfo[i].what >= 0; ++i)
{
if (what.equals_ci(levelinfo[i].name))
+10 -23
View File
@@ -39,34 +39,21 @@ public:
if (pattern[0] == '#')
{
Anope::string tmp = myStrGetToken(pattern.substr(1), '-', 0); /* Read FROM out */
if (tmp.empty())
Anope::string n1 = myStrGetToken(pattern.substr(1), '-', 0), /* Read FROM out */
n2 = myStrGetToken(pattern, '-', 1);
try
{
from = convertTo<int>(n1);
to = convertTo<int>(n2);
}
catch (const CoreException &)
{
u->SendMessage(ChanServ, LIST_INCORRECT_RANGE);
u->SendMessage(ChanServ, CS_LIST_INCORRECT_RANGE);
return MOD_CONT;
}
if (!tmp.is_number_only())
{
u->SendMessage(ChanServ, LIST_INCORRECT_RANGE);
u->SendMessage(ChanServ, CS_LIST_INCORRECT_RANGE);
return MOD_CONT;
}
from = convertTo<int>(tmp);
tmp = myStrGetTokenRemainder(pattern, '-', 1); /* Read TO out */
if (tmp.empty())
{
u->SendMessage(ChanServ, LIST_INCORRECT_RANGE);
u->SendMessage(ChanServ, CS_LIST_INCORRECT_RANGE);
return MOD_CONT;
}
if (!tmp.is_number_only())
{
u->SendMessage(ChanServ, LIST_INCORRECT_RANGE);
u->SendMessage(ChanServ, CS_LIST_INCORRECT_RANGE);
return MOD_CONT;
}
to = convertTo<int>(tmp);
pattern = "*";
}
+5
View File
@@ -100,6 +100,11 @@ class CommandCSRegister : public Command
{
SyntaxError(ChanServ, u, "REGISTER", CHAN_REGISTER_SYNTAX);
}
void OnServHelp(User *u)
{
u->SendMessage(ChanServ, CHAN_HELP_CMD_REGISTER);
}
};
class CSRegister : public Module
+1 -1
View File
@@ -36,7 +36,7 @@ class CommandCSSetMLock : public Command
if (ModeManager::FindChannelModeByName(CMODE_REGISTERED))
ci->SetMLock(CMODE_REGISTERED, true);
Anope::string modes = params[1];
Anope::string modes = params.size() > 1 ? params[1] : "";
for (Anope::string::const_iterator ch = modes.begin(), end = modes.end(); ch != end; ++ch)
{
switch (*ch)
+4 -3
View File
@@ -285,7 +285,6 @@ class XOPBase : public Command
CommandReturn DoDel(User *u, const std::vector<Anope::string> &params, ChannelInfo *ci, int level, LanguageString *messages)
{
Anope::string nick = params.size() > 2 ? params[2] : "";
ChanAccess *access;
if (nick.empty())
{
@@ -329,12 +328,14 @@ class XOPBase : public Command
return MOD_CONT;
}
NickCore *nc = na->nc;
ChanAccess *access = NULL;
unsigned i, end;
for (i = 0, end = ci->GetAccessCount(); i < end; ++i)
{
access = ci->GetAccess(nc, level);
access = ci->GetAccess(i);
if (access->nc == nc)
if (access->nc == nc && access->level == level)
break;
}
+208 -195
View File
@@ -337,7 +337,7 @@ static void LoadNickCore(const std::vector<Anope::string> &params)
/* Clear default flags */
nc->ClearFlags();
nc->pass = params[1];
nc->pass = params.size() > 1 ? params[1] : "";
Log(LOG_DEBUG_2) << "[db_plain]: Loaded NickCore " << nc->display;
}
@@ -573,41 +573,48 @@ class DBPlain : public Module
EventReturn OnDatabaseReadMetadata(NickCore *nc, const Anope::string &key, const std::vector<Anope::string> &params)
{
if (key.equals_ci("LANGUAGE"))
nc->language = params[0];
else if (key.equals_ci("MEMOMAX"))
nc->memos.memomax = params[0].is_pos_number_only() ? convertTo<int16>(params[0]) : 1;
else if (key.equals_ci("CHANCOUNT"))
nc->channelcount = params[0].is_pos_number_only() ? convertTo<uint16>(params[0]) : 0;
else if (key.equals_ci("EMAIL"))
nc->email = params[0];
else if (key.equals_ci("GREET"))
nc->greet = params[0];
else if (key.equals_ci("ACCESS"))
nc->AddAccess(params[0]);
else if (key.equals_ci("FLAGS"))
try
{
for (unsigned j = 0, end = params.size(); j < end; ++j)
for (int i = 0; NickCoreFlags[i].Flag != -1; ++i)
if (params[j].equals_ci(NickCoreFlags[i].Name))
nc->SetFlag(NickCoreFlags[i].Flag);
}
else if (key.equals_ci("MI"))
{
Memo *m = new Memo;
m->time = params[0].is_pos_number_only() ? convertTo<time_t>(params[0]) : 0;
m->sender = params[1];
for (unsigned j = 2; params[j].equals_ci("UNREAD") || params[j].equals_ci("RECEIPT") || params[j].equals_ci("NOTIFYS"); ++j)
if (key.equals_ci("LANGUAGE"))
nc->language = params[0];
else if (key.equals_ci("MEMOMAX"))
nc->memos.memomax = params[0].is_pos_number_only() ? convertTo<int16>(params[0]) : -1;
else if (key.equals_ci("CHANCOUNT"))
nc->channelcount = params[0].is_pos_number_only() ? convertTo<uint16>(params[0]) : 0;
else if (key.equals_ci("EMAIL"))
nc->email = params[0];
else if (key.equals_ci("GREET"))
nc->greet = params[0];
else if (key.equals_ci("ACCESS"))
nc->AddAccess(params[0]);
else if (key.equals_ci("FLAGS"))
{
if (params[j].equals_ci("UNREAD"))
m->SetFlag(MF_UNREAD);
else if (params[j].equals_ci("RECEIPT"))
m->SetFlag(MF_RECEIPT);
else if (params[j].equals_ci("NOTIFYS"))
m->SetFlag(MF_NOTIFYS);
for (unsigned j = 0, end = params.size(); j < end; ++j)
for (int i = 0; NickCoreFlags[i].Flag != -1; ++i)
if (params[j].equals_ci(NickCoreFlags[i].Name))
nc->SetFlag(NickCoreFlags[i].Flag);
}
m->text = params[params.size() - 1];
nc->memos.memos.push_back(m);
else if (key.equals_ci("MI"))
{
Memo *m = new Memo;
m->time = params[0].is_pos_number_only() ? convertTo<time_t>(params[0]) : 0;
m->sender = params[1];
for (unsigned j = 2; params[j].equals_ci("UNREAD") || params[j].equals_ci("RECEIPT") || params[j].equals_ci("NOTIFYS"); ++j)
{
if (params[j].equals_ci("UNREAD"))
m->SetFlag(MF_UNREAD);
else if (params[j].equals_ci("RECEIPT"))
m->SetFlag(MF_RECEIPT);
else if (params[j].equals_ci("NOTIFYS"))
m->SetFlag(MF_NOTIFYS);
}
m->text = params[params.size() - 1];
nc->memos.memos.push_back(m);
}
}
catch (const CoreException &ex)
{
throw DatabaseException(ex.GetReason());
}
return EVENT_CONTINUE;
@@ -649,183 +656,189 @@ class DBPlain : public Module
EventReturn OnDatabaseReadMetadata(ChannelInfo *ci, const Anope::string &key, const std::vector<Anope::string> &params)
{
if (key.equals_ci("BANTYPE"))
ci->bantype = params[0].is_pos_number_only() ? convertTo<int16>(params[0]) : Config->CSDefBantype;
else if (key.equals_ci("MEMOMAX"))
ci->memos.memomax = params[0].is_pos_number_only() ? convertTo<int16>(params[0]) : 1;
else if (key.equals_ci("FOUNDER"))
try
{
ci->founder = findcore(params[0]);
if (!ci->founder)
if (key.equals_ci("BANTYPE"))
ci->bantype = params[0].is_pos_number_only() ? convertTo<int16>(params[0]) : Config->CSDefBantype;
else if (key.equals_ci("MEMOMAX"))
ci->memos.memomax = params[0].is_pos_number_only() ? convertTo<int16>(params[0]) : -1;
else if (key.equals_ci("FOUNDER"))
{
std::stringstream reason;
reason << "Deleting founderless channel " << ci->name << " (founder: " << params[0] << ")";
throw DatabaseException(reason.str());
}
}
else if (key.equals_ci("SUCCESSOR"))
ci->successor = findcore(params[0]);
else if (key.equals_ci("LEVELS"))
{
for (unsigned j = 0, end = params.size(); j < end; j += 2)
for (int i = 0; ChannelLevels[i].Level != -1; ++i)
if (params[j].equals_ci(ChannelLevels[i].Name))
ci->levels[ChannelLevels[i].Level] = params[j + 1].is_number_only() ? convertTo<int16>(params[j + 1]) : 0;
}
else if (key.equals_ci("FLAGS"))
{
for (unsigned j = 0, end = params.size(); j < end; ++j)
for (int i = 0; ChannelInfoFlags[i].Flag != -1; ++i)
if (params[j].equals_ci(ChannelInfoFlags[i].Name))
ci->SetFlag(ChannelInfoFlags[i].Flag);
}
else if (key.equals_ci("DESC"))
ci->desc = params[0];
else if (key.equals_ci("TOPIC"))
{
ci->last_topic_setter = params[0];
ci->last_topic_time = params[1].is_pos_number_only() ? convertTo<time_t>(params[1]) : 0;
ci->last_topic = params[2];
}
else if (key.equals_ci("FORBID"))
{
ci->forbidby = params[0];
ci->forbidreason = params[1];
}
else if (key.equals_ci("ACCESS"))
{
NickCore *nc = findcore(params[0]);
if (!nc)
{
std::stringstream reason;
reason << "Access entry for nonexistant core " << params[0] << " on " << ci->name;
throw DatabaseException(reason.str());
}
int level = params[1].is_number_only() ? convertTo<int>(params[1]) : 0;
time_t last_seen = params[2].is_pos_number_only() ? convertTo<time_t>(params[2]) : 0;
ci->AddAccess(nc, level, params[3], last_seen);
}
else if (key.equals_ci("AKICK"))
{
bool Stuck = params[0].equals_ci("STUCK");
bool Nick = params[1].equals_ci("NICK");
NickCore *nc = NULL;
if (Nick)
{
nc = findcore(params[2]);
if (!nc)
ci->founder = findcore(params[0]);
if (!ci->founder)
{
std::stringstream reason;
reason << "Akick for nonexistant core " << params[2] << " on " << ci->name;
reason << "Deleting founderless channel " << ci->name << " (founder: " << params[0] << ")";
throw DatabaseException(reason.str());
}
}
AutoKick *ak;
if (Nick)
ak = ci->AddAkick(params[3], nc, params.size() > 6 ? params[6] : "", params[4].is_pos_number_only() ? convertTo<time_t>(params[4]) : 0, params[5].is_pos_number_only() ? convertTo<time_t>(params[5]) : 0);
else
ak = ci->AddAkick(params[3], params[2], params.size() > 6 ? params[6] : "", params[4].is_pos_number_only() ? convertTo<time_t>(params[4]) : 0, params[5].is_pos_number_only() ? convertTo<time_t>(params[5]) : 0);
if (Stuck)
ak->SetFlag(AK_STUCK);
if (Nick)
ak->SetFlag(AK_ISNICK);
}
else if (key.equals_ci("MLOCK_ON") || key.equals_ci("MLOCK_OFF"))
{
bool Set = key.equals_ci("MLOCK_ON");
/* For now store mlock in extensible, Anope hasn't yet connected to the IRCd and doesn't know what modes exist */
ci->Extend(Set ? "db_mlock_modes_on" : "db_mlock_modes_off", new ExtensibleItemRegular<std::vector<Anope::string> >(params));
}
else if (key.equals_ci("MLP"))
{
std::vector<std::pair<Anope::string, Anope::string> > mlp;
ci->GetExtRegular("db_mlp", mlp);
mlp.push_back(std::make_pair(params[0], params[1]));
/* For now store mlocked modes in extensible, Anope hasn't yet connected to the IRCd and doesn't know what modes exist */
ci->Extend("db_mlp", new ExtensibleItemRegular<std::vector<std::pair<Anope::string, Anope::string> > >(mlp));
}
else if (key.equals_ci("MI"))
{
Memo *m = new Memo;
m->time = params[0].is_pos_number_only() ? convertTo<time_t>(params[0]) : 0;
m->sender = params[1];
for (unsigned j = 2; params[j].equals_ci("UNREAD") || params[j].equals_ci("RECEIPT") || params[j].equals_ci("NOTIFYS"); ++j)
else if (key.equals_ci("SUCCESSOR"))
ci->successor = findcore(params[0]);
else if (key.equals_ci("LEVELS"))
{
if (params[j].equals_ci("UNREAD"))
m->SetFlag(MF_UNREAD);
else if (params[j].equals_ci("RECEIPT"))
m->SetFlag(MF_RECEIPT);
else if (params[j].equals_ci("NOTIFYS"))
m->SetFlag(MF_NOTIFYS);
for (unsigned j = 0, end = params.size(); j < end; j += 2)
for (int i = 0; ChannelLevels[i].Level != -1; ++i)
if (params[j].equals_ci(ChannelLevels[i].Name))
ci->levels[ChannelLevels[i].Level] = params[j + 1].is_number_only() ? convertTo<int16>(params[j + 1]) : 0;
}
m->text = params[params.size() - 1];
ci->memos.memos.push_back(m);
}
else if (key.equals_ci("ENTRYMSG"))
ci->entry_message = params[0];
else if (key.equals_ci("BI"))
{
if (params[0].equals_ci("NAME"))
ci->bi = findbot(params[1]);
else if (params[0].equals_ci("FLAGS"))
else if (key.equals_ci("FLAGS"))
{
for (unsigned j = 1, end = params.size(); j < end; ++j)
for (int i = 0; BotFlags[i].Flag != -1; ++i)
if (params[j].equals_ci(BotFlags[i].Name))
ci->botflags.SetFlag(BotFlags[i].Flag);
for (unsigned j = 0, end = params.size(); j < end; ++j)
for (int i = 0; ChannelInfoFlags[i].Flag != -1; ++i)
if (params[j].equals_ci(ChannelInfoFlags[i].Name))
ci->SetFlag(ChannelInfoFlags[i].Flag);
}
else if (params[0].equals_ci("TTB"))
else if (key.equals_ci("DESC"))
ci->desc = params[0];
else if (key.equals_ci("TOPIC"))
{
for (unsigned j = 1, end = params.size(); j < end; j += 2)
ci->last_topic_setter = params[0];
ci->last_topic_time = params[1].is_pos_number_only() ? convertTo<time_t>(params[1]) : 0;
ci->last_topic = params[2];
}
else if (key.equals_ci("FORBID"))
{
ci->forbidby = params[0];
ci->forbidreason = params[1];
}
else if (key.equals_ci("ACCESS"))
{
NickCore *nc = findcore(params[0]);
if (!nc)
{
if (params[j].equals_ci("BOLDS"))
ci->ttb[0] = params[j + 1].is_pos_number_only() ? convertTo<int16>(params[j + 1]) : 0;
else if (params[j].equals_ci("COLORS"))
ci->ttb[1] = params[j + 1].is_pos_number_only() ? convertTo<int16>(params[j + 1]) : 0;
else if (params[j].equals_ci("REVERSES"))
ci->ttb[2] = params[j + 1].is_pos_number_only() ? convertTo<int16>(params[j + 1]) : 0;
else if (params[j].equals_ci("UNDERLINES"))
ci->ttb[3] = params[j + 1].is_pos_number_only() ? convertTo<int16>(params[j + 1]) : 0;
else if (params[j].equals_ci("BADWORDS"))
ci->ttb[4] = params[j + 1].is_pos_number_only() ? convertTo<int16>(params[j + 1]) : 0;
else if (params[j].equals_ci("CAPS"))
ci->ttb[5] = params[j + 1].is_pos_number_only() ? convertTo<int16>(params[j + 1]) : 0;
else if (params[j].equals_ci("FLOOD"))
ci->ttb[6] = params[j + 1].is_pos_number_only() ? convertTo<int16>(params[j + 1]) : 0;
else if (params[j].equals_ci("REPEAT"))
ci->ttb[7] = params[j + 1].is_pos_number_only() ? convertTo<int16>(params[j + 1]) : 0;
else if (params[j].equals_ci("ITALICS"))
ci->ttb[8] = params[j + 1].is_pos_number_only() ? convertTo<int16>(params[j + 1]) : 0;
std::stringstream reason;
reason << "Access entry for nonexistant core " << params[0] << " on " << ci->name;
throw DatabaseException(reason.str());
}
int level = params[1].is_number_only() ? convertTo<int>(params[1]) : 0;
time_t last_seen = params[2].is_pos_number_only() ? convertTo<time_t>(params[2]) : 0;
ci->AddAccess(nc, level, params[3], last_seen);
}
else if (key.equals_ci("AKICK"))
{
bool Stuck = params[0].equals_ci("STUCK");
bool Nick = params[1].equals_ci("NICK");
NickCore *nc = NULL;
if (Nick)
{
nc = findcore(params[2]);
if (!nc)
{
std::stringstream reason;
reason << "Akick for nonexistant core " << params[2] << " on " << ci->name;
throw DatabaseException(reason.str());
}
}
AutoKick *ak;
if (Nick)
ak = ci->AddAkick(params[3], nc, params.size() > 6 ? params[6] : "", params[4].is_pos_number_only() ? convertTo<time_t>(params[4]) : 0, params[5].is_pos_number_only() ? convertTo<time_t>(params[5]) : 0);
else
ak = ci->AddAkick(params[3], params[2], params.size() > 6 ? params[6] : "", params[4].is_pos_number_only() ? convertTo<time_t>(params[4]) : 0, params[5].is_pos_number_only() ? convertTo<time_t>(params[5]) : 0);
if (Stuck)
ak->SetFlag(AK_STUCK);
if (Nick)
ak->SetFlag(AK_ISNICK);
}
else if (key.equals_ci("MLOCK_ON") || key.equals_ci("MLOCK_OFF"))
{
bool Set = key.equals_ci("MLOCK_ON");
/* For now store mlock in extensible, Anope hasn't yet connected to the IRCd and doesn't know what modes exist */
ci->Extend(Set ? "db_mlock_modes_on" : "db_mlock_modes_off", new ExtensibleItemRegular<std::vector<Anope::string> >(params));
}
else if (key.equals_ci("MLP"))
{
std::vector<std::pair<Anope::string, Anope::string> > mlp;
ci->GetExtRegular("db_mlp", mlp);
mlp.push_back(std::make_pair(params[0], params[1]));
/* For now store mlocked modes in extensible, Anope hasn't yet connected to the IRCd and doesn't know what modes exist */
ci->Extend("db_mlp", new ExtensibleItemRegular<std::vector<std::pair<Anope::string, Anope::string> > >(mlp));
}
else if (key.equals_ci("MI"))
{
Memo *m = new Memo;
m->time = params[0].is_pos_number_only() ? convertTo<time_t>(params[0]) : 0;
m->sender = params[1];
for (unsigned j = 2; params[j].equals_ci("UNREAD") || params[j].equals_ci("RECEIPT") || params[j].equals_ci("NOTIFYS"); ++j)
{
if (params[j].equals_ci("UNREAD"))
m->SetFlag(MF_UNREAD);
else if (params[j].equals_ci("RECEIPT"))
m->SetFlag(MF_RECEIPT);
else if (params[j].equals_ci("NOTIFYS"))
m->SetFlag(MF_NOTIFYS);
}
m->text = params[params.size() - 1];
ci->memos.memos.push_back(m);
}
else if (key.equals_ci("ENTRYMSG"))
ci->entry_message = params[0];
else if (key.equals_ci("BI"))
{
if (params[0].equals_ci("NAME"))
ci->bi = findbot(params[1]);
else if (params[0].equals_ci("FLAGS"))
{
for (unsigned j = 1, end = params.size(); j < end; ++j)
for (int i = 0; BotFlags[i].Flag != -1; ++i)
if (params[j].equals_ci(BotFlags[i].Name))
ci->botflags.SetFlag(BotFlags[i].Flag);
}
else if (params[0].equals_ci("TTB"))
{
for (unsigned j = 1, end = params.size(); j < end; j += 2)
{
if (params[j].equals_ci("BOLDS"))
ci->ttb[0] = params[j + 1].is_pos_number_only() ? convertTo<int16>(params[j + 1]) : 0;
else if (params[j].equals_ci("COLORS"))
ci->ttb[1] = params[j + 1].is_pos_number_only() ? convertTo<int16>(params[j + 1]) : 0;
else if (params[j].equals_ci("REVERSES"))
ci->ttb[2] = params[j + 1].is_pos_number_only() ? convertTo<int16>(params[j + 1]) : 0;
else if (params[j].equals_ci("UNDERLINES"))
ci->ttb[3] = params[j + 1].is_pos_number_only() ? convertTo<int16>(params[j + 1]) : 0;
else if (params[j].equals_ci("BADWORDS"))
ci->ttb[4] = params[j + 1].is_pos_number_only() ? convertTo<int16>(params[j + 1]) : 0;
else if (params[j].equals_ci("CAPS"))
ci->ttb[5] = params[j + 1].is_pos_number_only() ? convertTo<int16>(params[j + 1]) : 0;
else if (params[j].equals_ci("FLOOD"))
ci->ttb[6] = params[j + 1].is_pos_number_only() ? convertTo<int16>(params[j + 1]) : 0;
else if (params[j].equals_ci("REPEAT"))
ci->ttb[7] = params[j + 1].is_pos_number_only() ? convertTo<int16>(params[j + 1]) : 0;
else if (params[j].equals_ci("ITALICS"))
ci->ttb[8] = params[j + 1].is_pos_number_only() ? convertTo<int16>(params[j + 1]) : 0;
}
}
else if (params[0].equals_ci("CAPSMIN"))
ci->capsmin = params[1].is_pos_number_only() ? convertTo<int16>(params[1]) : 0;
else if (params[0].equals_ci("CAPSPERCENT"))
ci->capspercent = params[1].is_pos_number_only() ? convertTo<int16>(params[1]) : 0;
else if (params[0].equals_ci("FLOODLINES"))
ci->floodlines = params[1].is_pos_number_only() ? convertTo<int16>(params[1]) : 0;
else if (params[0].equals_ci("FLOODSECS"))
ci->floodsecs = params[1].is_pos_number_only() ? convertTo<int16>(params[1]) : 0;
else if (params[0].equals_ci("REPEATTIMES"))
ci->repeattimes = params[1].is_pos_number_only() ? convertTo<int16>(params[1]) : 0;
else if (params[0].equals_ci("BADWORD"))
{
BadWordType Type;
if (params[1].equals_ci("SINGLE"))
Type = BW_SINGLE;
else if (params[1].equals_ci("START"))
Type = BW_START;
else if (params[1].equals_ci("END"))
Type = BW_END;
else
Type = BW_ANY;
ci->AddBadWord(params[2], Type);
}
}
else if (params[0].equals_ci("CAPSMIN"))
ci->capsmin = params[1].is_pos_number_only() ? convertTo<int16>(params[1]) : 0;
else if (params[0].equals_ci("CAPSPERCENT"))
ci->capspercent = params[1].is_pos_number_only() ? convertTo<int16>(params[1]) : 0;
else if (params[0].equals_ci("FLOODLINES"))
ci->floodlines = params[1].is_pos_number_only() ? convertTo<int16>(params[1]) : 0;
else if (params[0].equals_ci("FLOODSECS"))
ci->floodsecs = params[1].is_pos_number_only() ? convertTo<int16>(params[1]) : 0;
else if (params[0].equals_ci("REPEATTIMES"))
ci->repeattimes = params[1].is_pos_number_only() ? convertTo<int16>(params[1]) : 0;
else if (params[0].equals_ci("BADWORD"))
{
BadWordType Type;
if (params[1].equals_ci("SINGLE"))
Type = BW_SINGLE;
else if (params[1].equals_ci("START"))
Type = BW_START;
else if (params[1].equals_ci("END"))
Type = BW_END;
else
Type = BW_ANY;
ci->AddBadWord(params[2], Type);
}
}
catch (const CoreException &ex)
{
throw DatabaseException(ex.GetReason());
}
return EVENT_CONTINUE;
+6 -2
View File
@@ -45,8 +45,12 @@ class CommandHSList : public Command
u->SendMessage(HostServ, LIST_INCORRECT_RANGE);
return MOD_CONT;
}
from = convertTo<int>(key.substr(1, tmp - 1));
to = convertTo<int>(key.substr(tmp + 1));
try
{
from = convertTo<int>(key.substr(1, tmp - 1));
to = convertTo<int>(key.substr(tmp + 1));
}
catch (const CoreException &) { }
}
}
+6 -6
View File
@@ -49,7 +49,7 @@ class MemoListCallback : public NumberList
class CommandMSRead : public Command
{
public:
CommandMSRead() : Command("READ", 0, 2)
CommandMSRead() : Command("READ", 1, 2)
{
}
@@ -57,8 +57,7 @@ class CommandMSRead : public Command
{
MemoInfo *mi;
ChannelInfo *ci = NULL;
Anope::string numstr = !params.empty() ? params[0] : "", chan;
int num;
Anope::string numstr = params[0], chan;
if (!numstr.empty() && numstr[0] == '#')
{
@@ -79,8 +78,8 @@ class CommandMSRead : public Command
}
else
mi = &u->Account()->memos;
num = !numstr.empty() && numstr.is_number_only() ? convertTo<int>(numstr) : -1;
if (numstr.empty() || (!numstr.equals_ci("LAST") && !numstr.equals_ci("NEW") && num <= 0))
if (numstr.empty() || (!numstr.equals_ci("LAST") && !numstr.equals_ci("NEW") && !numstr.is_number_only()))
this->OnSyntaxError(u, numstr);
else if (mi->memos.empty())
{
@@ -89,7 +88,8 @@ class CommandMSRead : public Command
else
u->SendMessage(MemoServ, MEMO_HAVE_NO_MEMOS);
}
else {
else
{
int i, end;
if (numstr.equals_ci("NEW"))
+12 -14
View File
@@ -71,7 +71,7 @@ class CommandMSSet : public Command
Anope::string p2 = params.size() > 2 ? params[2] : "";
Anope::string p3 = params.size() > 3 ? params[3] : "";
Anope::string user, chan;
int32 limit;
int16 limit;
NickCore *nc = u->Account();
ChannelInfo *ci = NULL;
bool is_servadmin = u->Account()->HasPriv("memoserv/set-limit");
@@ -115,7 +115,7 @@ class CommandMSSet : public Command
SyntaxError(MemoServ, u, "SET LIMIT", MEMO_SET_LIMIT_SERVADMIN_SYNTAX);
return MOD_CONT;
}
if ((!isdigit(p1[0]) && !p1.equals_ci("NONE")) || (!p2.empty() && !p2.equals_ci("HARD")))
if ((!p1.is_pos_number_only() && !p1.equals_ci("NONE")) || (!p2.empty() && !p2.equals_ci("HARD")))
{
SyntaxError(MemoServ, u, "SET LIMIT", MEMO_SET_LIMIT_SERVADMIN_SYNTAX);
return MOD_CONT;
@@ -134,14 +134,12 @@ class CommandMSSet : public Command
else
nc->UnsetFlag(NI_MEMO_HARDMAX);
}
limit = p1.is_pos_number_only() ? convertTo<int32>(p1) : -1;
if (limit < 0 || limit > 32767)
limit = -1;
try
{
u->SendMessage(MemoServ, MEMO_SET_LIMIT_OVERFLOW, 32767);
limit = 32767;
limit = convertTo<int16>(p1);
}
if (p1.equals_ci("NONE"))
limit = -1;
catch (const CoreException &) { }
}
else
{
@@ -160,7 +158,12 @@ class CommandMSSet : public Command
u->SendMessage(MemoServ, MEMO_SET_YOUR_LIMIT_FORBIDDEN);
return MOD_CONT;
}
limit = p1.is_pos_number_only() ? convertTo<int32>(p1) : -1;
limit = -1;
try
{
limit = convertTo<int16>(p1);
}
catch (const CoreException &) { }
/* The first character is a digit, but we could still go negative
* from overflow... watch out! */
if (limit < 0 || (Config->MSMaxMemos > 0 && static_cast<unsigned>(limit) > Config->MSMaxMemos))
@@ -171,11 +174,6 @@ class CommandMSSet : public Command
u->SendMessage(MemoServ, MEMO_SET_YOUR_LIMIT_TOO_HIGH, Config->MSMaxMemos);
return MOD_CONT;
}
else if (limit > 32767)
{
u->SendMessage(MemoServ, MEMO_SET_LIMIT_OVERFLOW, 32767);
limit = 32767;
}
}
mi->memomax = limit;
if (limit > 0)
+8 -2
View File
@@ -35,7 +35,6 @@ class CommandNSAList : public Command
NickAlias *na;
int min_level = 0;
int is_servadmin = u->Account()->IsServicesOper();
unsigned lev_param = 0;
@@ -60,6 +59,7 @@ class CommandNSAList : public Command
Anope::string lev = params.size() > lev_param ? params[lev_param] : "";
/* if a level was given, make sure it's an int for later */
int min_level = ACCESS_INVALID;
if (!lev.empty())
{
if (lev.equals_ci("FOUNDER"))
@@ -73,7 +73,13 @@ class CommandNSAList : public Command
else if (lev.equals_ci("VOP"))
min_level = ACCESS_VOP;
else
min_level = lev.is_number_only() ? convertTo<int>(lev) : ACCESS_INVALID;
{
try
{
min_level = convertTo<int>(lev);
}
catch (const CoreException &) { }
}
}
if (!na)
+10 -20
View File
@@ -55,30 +55,20 @@ class CommandNSList : public Command
if (pattern[0] == '#')
{
Anope::string tmp = myStrGetToken(pattern.substr(1), '-', 0); /* Read FROM out */
if (tmp.empty())
Anope::string n1 = myStrGetToken(pattern.substr(1), '-', 0), /* Read FROM out */
n2 = myStrGetToken(pattern, '-', 1);
try
{
from = convertTo<int>(n1);
to = convertTo<int>(n2);
}
catch (const CoreException &)
{
u->SendMessage(NickServ, LIST_INCORRECT_RANGE);
return MOD_CONT;
}
if (!tmp.is_number_only())
{
u->SendMessage(NickServ, LIST_INCORRECT_RANGE);
return MOD_CONT;
}
from = convertTo<int>(tmp);
tmp = myStrGetTokenRemainder(pattern, '-', 1); /* Read TO out */
if (tmp.empty())
{
u->SendMessage(NickServ, LIST_INCORRECT_RANGE);
return MOD_CONT;
}
if (!tmp.is_number_only())
{
u->SendMessage(NickServ, LIST_INCORRECT_RANGE);
return MOD_CONT;
}
to = convertTo<int>(tmp);
pattern = "*";
}
+3 -3
View File
@@ -58,7 +58,7 @@ class CommandNSConfirm : public Command
if (!force)
{
u->Login(na->nc);
Log(LOG_COMMAND, u, this) << "to register " << u->nick << " (email: " << (!nr->email.empty() ? nr->email : "none") << ")";
Log(LOG_COMMAND, u, this) << "to register " << nr->nick << " (email: " << (!nr->email.empty() ? nr->email : "none") << ")";
if (Config->NSAddAccessOnReg)
u->SendMessage(NickServ, NICK_REGISTERED, u->nick.c_str(), na->nc->GetAccess(0).c_str());
else
@@ -75,7 +75,7 @@ class CommandNSConfirm : public Command
}
else
{
Log(LOG_COMMAND, u, this) << "to confirm " << u->nick << " (email: " << (!nr->email.empty() ? nr->email : "none") << ")";
Log(LOG_COMMAND, u, this) << "to confirm " << nr->nick << " (email: " << (!nr->email.empty() ? nr->email : "none") << ")";
u->SendMessage(NickServ, NICK_FORCE_REG, nr->nick.c_str());
User *user = finduser(nr->nick);
/* Delrequest must be called before validate_user */
@@ -218,7 +218,7 @@ class CommandNSRegister : public CommandNSConfirm
/* Guest nick can now have a series of between 1 and 7 digits.
* --lara
*/
if (nicklen <= prefixlen + 7 && nicklen >= prefixlen + 1 && !u->nick.find_ci(Config->NSGuestNickPrefix) && !u->nick.substr(prefixlen).find_first_not_of("1234567890"))
if (nicklen <= prefixlen + 7 && nicklen >= prefixlen + 1 && !u->nick.find_ci(Config->NSGuestNickPrefix) && u->nick.substr(prefixlen).find_first_not_of("1234567890") == Anope::string::npos)
{
u->SendMessage(NickServ, NICK_CANNOT_BE_REGISTERED, u->nick.c_str());
return MOD_CONT;
+1
View File
@@ -41,6 +41,7 @@ class CommandNSRelease : public Command
if (res == 1)
{
Log(LOG_COMMAND, u, this) << "released " << na->nick;
na->Release();
u->SendMessage(NickServ, NICK_RELEASED);
}
else
+6 -1
View File
@@ -70,7 +70,12 @@ class CommandOSDefcon : public Command
defcon_sendlvls(u);
return MOD_CONT;
}
newLevel = lvl.is_number_only() ? convertTo<int>(lvl) : 0;
try
{
newLevel = convertTo<int>(lvl);
}
catch (const CoreException &) { }
if (newLevel < 1 || newLevel > 5)
{
this->OnSyntaxError(u, "");
+13 -9
View File
@@ -213,7 +213,6 @@ class NewsBase : public Command
CommandReturn DoDel(User *u, const std::vector<Anope::string> &params, NewsType type, LanguageString *msgs)
{
Anope::string text = params.size() > 1 ? params[1] : "";
unsigned num;
if (text.empty())
this->OnSyntaxError(u, "DEL");
@@ -226,16 +225,21 @@ class NewsBase : public Command
}
if (!text.equals_ci("ALL"))
{
num = text.is_pos_number_only() ? convertTo<unsigned>(text) : 0;
if (num > 0 && del_newsitem(num, type))
try
{
u->SendMessage(OperServ, msgs[MSG_DELETED], num);
for (unsigned i = 0, end = News.size(); i < end; ++i)
if (News[i]->type == type && News[i]->num > num)
--News[i]->num;
unsigned num = convertTo<unsigned>(text);
if (del_newsitem(num, type))
{
u->SendMessage(OperServ, msgs[MSG_DELETED], num);
for (unsigned i = 0, end = News.size(); i < end; ++i)
if (News[i]->type == type && News[i]->num > num)
--News[i]->num;
return MOD_CONT;
}
}
else
u->SendMessage(OperServ, msgs[MSG_DEL_NOT_FOUND], num);
catch (const CoreException &) { }
u->SendMessage(OperServ, msgs[MSG_DEL_NOT_FOUND], text.c_str());
}
else
{
+20 -5
View File
@@ -125,7 +125,12 @@ class CommandOSSession : public Command
{
Anope::string param = params[1];
unsigned mincount = param.is_pos_number_only() ? convertTo<unsigned>(param) : 0;
unsigned mincount = 0;
try
{
mincount = convertTo<unsigned>(param);
}
catch (const CoreException &) { }
if (mincount <= 1)
u->SendMessage(OperServ, OPER_SESSION_INVALID_THRESHOLD);
@@ -245,7 +250,12 @@ class CommandOSException : public Command
else if (expires > 0)
expires += Anope::CurTime;
int limit = !limitstr.empty() && limitstr.is_number_only() ? convertTo<int>(limitstr) : -1;
int limit = -1;
try
{
limit = convertTo<int>(limitstr);
}
catch (const CoreException &) { }
if (limit < 0 || limit > static_cast<int>(Config->MaxSessionLimit))
{
@@ -254,7 +264,7 @@ class CommandOSException : public Command
}
else
{
if (mask.find('!') == Anope::string::npos || mask.find('@') == Anope::string::npos)
if (mask.find('!') != Anope::string::npos || mask.find('@') != Anope::string::npos)
{
u->SendMessage(OperServ, OPER_EXCEPTION_INVALID_HOSTMASK);
return MOD_CONT;
@@ -319,8 +329,13 @@ class CommandOSException : public Command
return MOD_CONT;
}
n1 = n1str.is_pos_number_only() ? convertTo<int>(n1str) - 1 : -1;
n2 = n2str.is_pos_number_only() ? convertTo<int>(n2str) - 1 : -1;
n1 = n2 = -1;
try
{
n1 = convertTo<int>(n1str);
n2 = convertTo<int>(n2str);
}
catch (const CoreException &) { }
if (n1 >= 0 && n1 < exceptions.size() && n2 >= 0 && n2 < exceptions.size() && n1 != n2)
{
+8 -4
View File
@@ -143,16 +143,20 @@ class CommandOSSet : public Command
Log(LOG_ADMIN, u, this) << "DEBUG ON";
u->SendMessage(OperServ, OPER_SET_DEBUG_ON);
}
else if (setting.equals_ci("OFF") || (setting[0] == '0' && setting.is_number_only() && !convertTo<int>(setting)))
else if (setting.equals_ci("OFF"))
{
Log(LOG_ADMIN, u, this) << "DEBUG OFF";
debug = 0;
u->SendMessage(OperServ, OPER_SET_DEBUG_OFF);
}
else if (setting.is_number_only() && convertTo<int>(setting) > 0)
else if (setting.is_number_only())
{
debug = convertTo<int>(setting);
Log(LOG_ADMIN, u, this) << "DEBUG " << debug;
try
{
debug = convertTo<int>(setting);
Log(LOG_ADMIN, u, this) << "DEBUG " << debug;
}
catch (const CoreException &) { }
u->SendMessage(OperServ, OPER_SET_DEBUG_LEVEL, debug);
}
else
+2 -2
View File
@@ -43,7 +43,7 @@ class SQLineDelCallback : public NumberList
return;
++Deleted;
DoDel(u, x - 1);
DoDel(u, x);
}
static void DoDel(User *u, XLine *x)
@@ -351,7 +351,7 @@ class CommandOSSQLine : public Command
CommandReturn DoClear(User *u)
{
FOREACH_MOD(I_OnDelXLine, OnDelXLine(u, NULL, X_SQLINE));
SGLine->Clear();
SQLine->Clear();
u->SendMessage(OperServ, OPER_SQLINE_CLEAR);
return MOD_CONT;
+31 -14
View File
@@ -397,7 +397,7 @@ class DBMySQL : public Module
I_OnNickAddAccess, I_OnNickEraseAccess, I_OnNickClearAccess,
I_OnDelCore, I_OnNickForbidden, I_OnNickGroup, I_OnMakeNickRequest,
I_OnDelNickRequest, I_OnNickRegister, I_OnChangeCoreDisplay,
I_OnNickSuspended,
I_OnNickSuspended, I_OnDelNick,
/* ChanServ */
I_OnAccessAdd, I_OnAccessDel, I_OnAccessChange, I_OnAccessClear, I_OnLevelChange,
I_OnChanForbidden, I_OnDelChan, I_OnChanRegistered, I_OnChanSuspend,
@@ -414,7 +414,7 @@ class DBMySQL : public Module
/* HostServ */
I_OnSetVhost, I_OnDeleteVhost
};
ModuleManager::Attach(i, this, 41);
ModuleManager::Attach(i, this, 42);
}
EventReturn OnLoadDatabase()
@@ -449,7 +449,7 @@ class DBMySQL : public Module
nc->language = r.Get(i, "language");
nc->channelcount = r.Get(i, "channelcount").is_number_only() ? convertTo<int>(r.Get(i, "channelcount")) : 0;
nc->memos.memomax = r.Get(i, "memomax").is_number_only() ? convertTo<int>(r.Get(i, "memomax")) : 20;
nc->memos.memomax = r.Get(i, "memomax").is_number_only() ? convertTo<int16>(r.Get(i, "memomax")) : 20;
}
r = SQL->RunQuery("SELECT * FROM `anope_ns_access`");
@@ -608,7 +608,7 @@ class DBMySQL : public Module
ci->forbidreason = r.Get(i, "forbidreason");
ci->bantype = r.Get(i, "bantype").is_number_only() ? convertTo<int>(r.Get(i, "bantype")) : 2;
ci->entry_message = r.Get(i, "entry_message");
ci->memos.memomax = r.Get(i, "memomax").is_number_only() ? convertTo<int>(r.Get(i, "memomax")) : 20;
ci->memos.memomax = r.Get(i, "memomax").is_number_only() ? convertTo<int16>(r.Get(i, "memomax")) : 20;
ci->capsmin = r.Get(i, "capsmin").is_number_only() ? convertTo<int>(r.Get(i, "capsmin")) : 0;
ci->capspercent = r.Get(i, "capspercent").is_number_only() ? convertTo<int>(r.Get(i, "capspercent")) : 0;
ci->floodlines = r.Get(i, "floodlines").is_number_only() ? convertTo<int>(r.Get(i, "floodlines")) : 0;
@@ -881,15 +881,15 @@ class DBMySQL : public Module
Anope::string by = r.Get(i, "xby");
Anope::string reason = r.Get(i, "reason");
time_t seton = r.Get(i, "seton").is_pos_number_only() ? convertTo<time_t>(r.Get(i, "seton")) : Anope::CurTime;
time_t expires = r.Get(i, "expires").is_pos_number_only() ? convertTo<time_t>(r.Get(i, "expires")) : Anope::CurTime;
time_t expires = r.Get(i, "expire").is_pos_number_only() ? convertTo<time_t>(r.Get(i, "expire")) : Anope::CurTime;
XLine *x = NULL;
if (SNLine && r.Get(i, "type").equals_cs("SNLINE"))
SNLine->Add(NULL, NULL, mask, expires, reason);
x = SNLine->Add(NULL, NULL, mask, expires, reason);
else if (SQLine && r.Get(i, "type").equals_cs("SQLINE"))
SQLine->Add(NULL, NULL, mask, expires, reason);
x = SQLine->Add(NULL, NULL, mask, expires, reason);
else if (SZLine && r.Get(i, "type").equals_cs("SZLINE"))
SZLine->Add(NULL, NULL, mask, expires, reason);
x = SZLine->Add(NULL, NULL, mask, expires, reason);
if (x)
{
x->By = by;
@@ -897,6 +897,18 @@ class DBMySQL : public Module
}
}
r = SQL->RunQuery("SELECT * FROM `anope_os_exceptions`");
for (int i = 0; i < r.Rows(); ++i)
{
Anope::string mask = r.Get(i, "mask");
unsigned limit = convertTo<unsigned>(r.Get(i, "slimit"));
Anope::string creator = r.Get(i, "who");
Anope::string reason = r.Get(i, "reason");
time_t expires = convertTo<time_t>(r.Get(i, "expires"));
exception_add(NULL, mask, limit, reason, creator, expires);
}
r = SQL->RunQuery("SELECT * FROM `anope_extra`");
for (int i = 0; i < r.Rows(); ++i)
{
@@ -1130,7 +1142,7 @@ class DBMySQL : public Module
this->RunQuery("INSERT INTO `anope_ns_core` (display, pass, email, greet, flags, language, channelcount, memomax) VALUES('" +
this->Escape(nc->display) + "', '" + this->Escape(nc->pass) + "', '" +
this->Escape(nc->email) + "', '" + this->Escape(nc->greet) + "', '" +
BuildFlagsList(nc) + "', " + stringify(nc->language) + ", " + stringify(nc->channelcount) + ", " +
BuildFlagsList(nc) + "', '" + this->Escape(nc->language) + "', " + stringify(nc->channelcount) + ", " +
stringify(nc->memos.memomax) + ") " +
"ON DUPLICATE KEY UPDATE pass=VALUES(pass), email=VALUES(email), greet=VALUES(greet), flags=VALUES(flags), language=VALUES(language), " +
"channelcount=VALUES(channelcount), memomax=VALUES(memomax)");
@@ -1152,6 +1164,11 @@ class DBMySQL : public Module
this->RunQuery("UPDATE `anope_ns_core` SET `flags` = '" + BuildFlagsList(na->nc) + "' WHERE `display` = '" + this->Escape(na->nc->display) + "'");
}
void OnDelNick(NickAlias *na)
{
this->RunQuery("DELETE FROM `anope_ns_alias` WHERE `nick` = '" + this->Escape(na->nick) + "'");
}
void OnAccessAdd(ChannelInfo *ci, User *u, NickCore *nc, int level)
{
this->RunQuery("INSERT INTO `anope_cs_access` (level, display, channel, last_seen, creator) VALUES (" + stringify(level) + ", '" + this->Escape(nc->display) + "', '" + this->Escape(ci->name) + "', " + stringify(Anope::CurTime) + ", '" + this->Escape(u->nick) + "')");
@@ -1314,7 +1331,7 @@ class DBMySQL : public Module
this->Escape(m->sender) + "', '" + this->Escape(m->text) + "', 'CHAN')");
}
void OnMemoDel(NickCore *nc, MemoInfo *mi, Memo *m)
void OnMemoDel(const NickCore *nc, MemoInfo *mi, Memo *m)
{
if (m)
this->RunQuery("DELETE FROM `anope_ms_info` WHERE `receiver` = '" + this->Escape(nc->display) + "' AND `time` = " + stringify(m->time));
@@ -1361,7 +1378,7 @@ class DBMySQL : public Module
EventReturn OnAddXLine(User *, XLine *x, XLineType Type)
{
this->RunQuery(Anope::string("INSERT INTO `anope_os_sxlines` (type, mask, xby, reason, seton, expire) VALUES('") +
this->RunQuery(Anope::string("INSERT INTO `anope_os_xlines` (type, mask, xby, reason, seton, expire) VALUES('") +
(Type == X_SNLINE ? "SNLINE" : (Type == X_SQLINE ? "SQLINE" : "SZLINE")) + "', '" +
this->Escape(x->Mask) + "', '" + this->Escape(x->By) + "', '" + this->Escape(x->Reason) + "', " +
stringify(x->Created) + ", " + stringify(x->Expires) + ")");
@@ -1379,7 +1396,7 @@ class DBMySQL : public Module
void OnDeleteVhost(NickAlias *na)
{
this->RunQuery("DELETE FROM `anope_hs_core` WHERE `nick` = '" + na->nick + "'");
this->RunQuery("DELETE FROM `anope_hs_core` WHERE `nick` = '" + this->Escape(na->nick) + "'");
}
void OnSetVhost(NickAlias *na)
@@ -1501,7 +1518,7 @@ static void SaveDatabases()
{
ChanAccess *access = ci->GetAccess(j);
me->RunQuery(Anope::string("INSERT INTO `anope_cs_access` (level, display, channel, last_seen, creator) VALUES('") + access->level + "', " + me->Escape(access->nc->display) + ", " + me->Escape(ci->name) + ", " + access->last_seen + ", " + me->Escape(access->creator) + ") ON DUPLICATE KEY UPDATE level=VALUES(level), last_seen=VALUES(last_seen), creator=VALUES(creator)");
me->RunQuery(Anope::string("INSERT INTO `anope_cs_access` (level, display, channel, last_seen, creator) VALUES(") + access->level + ", '" + me->Escape(access->nc->display) + "', '" + me->Escape(ci->name) + "', " + stringify(access->last_seen) + ", '" + me->Escape(access->creator) + "') ON DUPLICATE KEY UPDATE level=VALUES(level), last_seen=VALUES(last_seen), creator=VALUES(creator)");
}
for (unsigned j = 0, end = ci->GetAkickCount(); j < end; ++j)
@@ -1513,7 +1530,7 @@ static void SaveDatabases()
for (int k = 0; k < CA_SIZE; ++k)
{
me->RunQuery("INSERT INTO `anope_cs_levels` (channel, position, level) VALUES(" + me->Escape(ci->name) + ", '" + stringify(k) + "', '" + stringify(ci->levels[k]) + "') ON DUPLICATE KEY UPDATE position=VALUES(position), level=VALUES(level)");
me->RunQuery("INSERT INTO `anope_cs_levels` (channel, position, level) VALUES('" + me->Escape(ci->name) + "', " + stringify(k) + ", " + stringify(ci->levels[k]) + ") ON DUPLICATE KEY UPDATE position=VALUES(position), level=VALUES(level)");
}
for (unsigned j = 0, end = ci->memos.memos.size(); j < end; ++j)
+1
View File
@@ -156,6 +156,7 @@ class CommandHSActivate : public Command
if (it != Requests.end())
{
na->hostinfo.SetVhost(it->second->ident, it->second->host, u->nick, it->second->time);
FOREACH_MOD(I_OnSetVhost, OnSetVhost(na));
if (HSRequestMemoUser)
memo_send(u, na->nick, _("[auto memo] Your requested vHost has been approved."), 2);
+1 -1
View File
@@ -29,7 +29,7 @@ class HelpChannel : public Module
{
User *u = finduser(param);
if (u)
if (u && check_access(u, c->ci, CA_OPDEOPME))
u->SetMode(OperServ, UMODE_HELPOP);
}
+7 -6
View File
@@ -450,7 +450,11 @@ bool event_nick(const Anope::string &source, const std::vector<Anope::string> &p
if (params.size() != 2)
{
user = do_nick(source, params[0], params[4], params[5], params[6], params[9], Anope::string(params[2]).is_pos_number_only() ? convertTo<time_t>(params[2]) : 0, params[8], "", "", params[3]);
/* Currently bahamut has no ipv6 support */
sockaddrs ip;
ip.ntop(AF_INET, params[8].c_str());
user = do_nick(source, params[0], params[4], params[5], params[6], params[9], Anope::string(params[2]).is_pos_number_only() ? convertTo<time_t>(params[2]) : 0, ip.addr(), "", "", params[3]);
if (user)
{
NickAlias *na;
@@ -585,12 +589,9 @@ bool event_quit(const Anope::string &source, const std::vector<Anope::string> &p
/* EVENT: MODE */
bool event_mode(const Anope::string &source, const std::vector<Anope::string> &params)
{
if (params.size() < 3)
return true;
if (params[0][0] == '#' || params[0][0] == '&')
if (params.size() > 2 && (params[0][0] == '#' || params[0][0] == '&'))
do_cmode(source, params[0], params[2], params[1]);
else
else if (params.size() > 1)
do_umode(source, params[0], params[1]);
return true;
}
+3 -1
View File
@@ -433,6 +433,8 @@ bool event_fjoin(const Anope::string &source, const std::vector<Anope::string> &
if (keep_their_modes)
Status.push_back(cm);
}
/* Erase the , */
buf.erase(buf.begin());
User *u = finduser(buf);
if (!u)
@@ -887,7 +889,7 @@ bool event_capab(const Anope::string &source, const std::vector<Anope::string> &
}
}
}
else if (capab.find("PREIX=(") != Anope::string::npos)
else if (capab.find("PREFIX=(") != Anope::string::npos)
{
Anope::string modes(capab.begin() + 8, capab.begin() + capab.find(')'));
Anope::string chars(capab.begin() + capab.find(')') + 1, capab.end());
+3 -2
View File
@@ -975,7 +975,10 @@ bool event_capab(const Anope::string &source, const std::vector<Anope::string> &
else if (modename.equals_cs("regdeaf"))
um = new UserMode(UMODE_REGPRIV, "UMODE_REGPRIV", modechar[0]);
else if (modename.equals_cs("servprotect"))
{
um = new UserMode(UMODE_PROTECTED, "UMODE_PROTECTED", modechar[0]);
ircd->pseudoclient_mode = "+Ik";
}
else if (modename.equals_cs("showwhois"))
um = new UserMode(UMODE_WHOIS, "UMODE_WHOIS", modechar[0]);
else if (modename.equals_cs("snomask"))
@@ -1017,8 +1020,6 @@ bool event_capab(const Anope::string &source, const std::vector<Anope::string> &
has_chghostmod = true;
else if (module.equals_cs("m_chgident.so"))
has_chgidentmod = true;
else if (module.equals_cs("m_servprotect.so"))
ircd->pseudoclient_mode = "+Ik";
}
}
else if (params[0].equals_cs("CAPABILITIES"))
+1 -1
View File
@@ -247,7 +247,7 @@ class RatboxProto : public IRCDProto
void SendTopic(BotInfo *bi, Channel *c)
{
bool needjoin = c->FindUser(bi) != NULL;
bool needjoin = c->FindUser(bi) == NULL;
if (needjoin)
{
ChannelStatus status;
+1 -1
View File
@@ -1,4 +1,4 @@
#include "anope.h"
#include "services.h"
Base::Base()
{
+26
View File
@@ -72,9 +72,35 @@ BotInfo::~BotInfo()
ci->bi = NULL;
}
for (CommandMap::const_iterator it = this->Commands.begin(), it_end = this->Commands.end(); it != it_end; ++it)
{
Command *c = it->second;
if (c->module)
c->module->DelCommand(this, c);
}
BotListByNick.erase(this->nick);
if (!this->uid.empty())
BotListByUID.erase(this->uid);
if (this->HasFlag(BI_CORE))
{
if (this == ChanServ)
ChanServ = NULL;
else if (this == BotServ)
BotServ = NULL;
else if (this == HostServ)
HostServ = NULL;
else if (this == OperServ)
OperServ = NULL;
else if (this == MemoServ)
MemoServ = NULL;
else if (this == NickServ)
NickServ = NULL;
else if (this == Global)
Global = NULL;
}
}
+8 -8
View File
@@ -90,7 +90,7 @@ void botchanmsgs(User *u, ChannelInfo *ci, const Anope::string &buf)
/* If it's a /me, cut the CTCP part because the ACTION will cause
* problems with the caps or badwords kicker
*/
if (!realbuf.substr(0, 8).equals_ci("\1ACTION ") && realbuf[buf.length() - 1] == '\1')
if (realbuf.substr(0, 8).equals_ci("\1ACTION ") && realbuf[realbuf.length() - 1] == '\1')
{
realbuf.erase(0, 8);
realbuf.erase(realbuf.length() - 1);
@@ -109,15 +109,15 @@ void botchanmsgs(User *u, ChannelInfo *ci, const Anope::string &buf)
* way.
*/
bool Allow = false;
if (!ci->botflags.HasFlag(BS_DONTKICKOPS) && !ci->botflags.HasFlag(BS_DONTKICKVOICES))
Allow = true;
bool Allow = true;
if (check_access(u, ci, CA_NOKICK))
Allow = false;
else if (ci->botflags.HasFlag(BS_DONTKICKOPS) && (ci->c->HasUserStatus(u, CMODE_HALFOP) || ci->c->HasUserStatus(u, CMODE_OP) || ci->c->HasUserStatus(u, CMODE_PROTECT) || ci->c->HasUserStatus(u, CMODE_OWNER)))
Allow = true;
Allow = false;
else if (ci->botflags.HasFlag(BS_DONTKICKVOICES) && ci->c->HasUserStatus(u, CMODE_VOICE))
Allow = true;
Allow = false;
if (!check_access(u, ci, CA_NOKICK) && Allow)
if (Allow)
{
/* Bolds kicker */
if (ci->botflags.HasFlag(BS_KICK_BOLDS) && realbuf.find(2) != Anope::string::npos)
@@ -177,7 +177,7 @@ void botchanmsgs(User *u, ChannelInfo *ci, const Anope::string &buf)
* percentage of caps to kick for; the rest is ignored. -GD
*/
if (i && l && i >= ci->capsmin && i * 100 / (i + l) >= ci->capspercent)
if ((i || l) && i >= ci->capsmin && i * 100 / (i + l) >= ci->capspercent)
{
check_ban(ci, u, TTB_CAPS);
bot_kick(ci, u, BOT_REASON_CAPS);
+10 -1
View File
@@ -451,9 +451,10 @@ void cs_remove_nick(const NickCore *nc)
ChanAccess *ca;
AutoKick *akick;
for (registered_channel_map::const_iterator it = RegisteredChannelList.begin(), it_end = RegisteredChannelList.end(); it != it_end; ++it)
for (registered_channel_map::const_iterator it = RegisteredChannelList.begin(), it_end = RegisteredChannelList.end(); it != it_end;)
{
ChannelInfo *ci = it->second;
++it;
if (ci->founder == nc)
{
@@ -539,6 +540,14 @@ int check_access(User *user, ChannelInfo *ci, int what)
level = get_access(user, ci);
limit = ci->levels[what];
// Set should never be disabled, if it is it is db-converter screwup
// This all needs rewritten anyway...
if (what == CA_SET && limit == ACCESS_INVALID)
{
ci->levels[what] = ACCESS_FOUNDER;
limit = ACCESS_FOUNDER;
}
/* Resetting the last used time */
if (level > 0)
ci->last_used = Anope::CurTime;
+10 -6
View File
@@ -355,14 +355,18 @@ ServerConfig::ServerConfig() : errstr(""), config_data()
while (f.is_open() && getline(f, server.str()))
{
if (server.find("nameserver ") == 0)
if (server.find("nameserver") == 0)
{
if (server.substr(11).is_pos_number_only())
size_t ip = server.find_first_of("123456789");
if (ip != Anope::string::npos)
{
this->NameServer = server.substr(11);
Log(LOG_DEBUG) << "Nameserver set to " << this->NameServer;
success = true;
break;
if (server.substr(ip).is_pos_number_only())
{
this->NameServer = server.substr(ip);
Log(LOG_DEBUG) << "Nameserver set to " << this->NameServer;
success = true;
break;
}
}
}
}
+33
View File
@@ -608,3 +608,36 @@ void DNSRequestTimeout::Tick(time_t)
delete this->request;
}
DNSRecord DNSManager::BlockingQuery(const Anope::string &mask, QueryType qt)
{
DNSRecord result(mask);
addrinfo *addrresult, hints;
result.result = mask;
result.type = qt;
int type = AF_UNSPEC;
if (qt == DNS_QUERY_A)
type = AF_INET;
else if (qt == DNS_QUERY_AAAA)
type = AF_INET6;
memset(&hints, 0, sizeof(hints));
hints.ai_family = type;
if (getaddrinfo(mask.c_str(), NULL, &hints, &addrresult) == 0)
{
sockaddrs addr;
memcpy(&addr, addrresult->ai_addr, addrresult->ai_addrlen);
try
{
result.result = addr.addr();
}
catch (const SocketException &) { }
freeaddrinfo(addrresult);
}
return result;
}
+1 -1
View File
@@ -8,7 +8,7 @@
* for use in Anope.
*/
#include "anope.h"
#include "services.h"
/*
*
+33 -21
View File
@@ -23,8 +23,28 @@ void introduce_user(const Anope::string &user)
throw FatalException("introduce_user loop detected");
lasttime = now;
if (user.empty())
ircdproto->SendBOB();
if (!user.empty())
{
User *u = finduser(user);
if (u)
{
ircdproto->SendClientIntroduction(u, ircd->pseudoclient_mode);
BotInfo *bi = findbot(u->nick);
if (bi)
{
XLine x(bi->nick, "Reserved for services");
ircdproto->SendSQLine(&x);
for (UChannelList::const_iterator cit = bi->chans.begin(), cit_end = bi->chans.end(); cit != cit_end; ++cit)
ircdproto->SendJoin(bi, *cit);
}
}
return;
}
ircdproto->SendBOB();
for (unsigned i = 0; i < Me->GetLinks().size(); ++i)
{
@@ -41,30 +61,22 @@ void introduce_user(const Anope::string &user)
{
User *u = it->second;
if (user.empty() || u->nick.equals_ci(user))
ircdproto->SendClientIntroduction(u, ircd->pseudoclient_mode);
BotInfo *bi = findbot(u->nick);
if (bi)
{
ircdproto->SendClientIntroduction(u, ircd->pseudoclient_mode);
XLine x(bi->nick, "Reserved for services");
ircdproto->SendSQLine(&x);
BotInfo *bi = findbot(u->nick);
if (bi)
{
XLine x(bi->nick, "Reserved for services");
ircdproto->SendSQLine(&x);
for (UChannelList::const_iterator cit = bi->chans.begin(), cit_end = bi->chans.end(); cit != cit_end; ++cit)
{
ircdproto->SendJoin(bi, *cit);
}
}
for (UChannelList::const_iterator cit = bi->chans.begin(), cit_end = bi->chans.end(); cit != cit_end; ++cit)
ircdproto->SendJoin(bi, *cit);
}
}
if (user.empty())
{
/* Load MLock from the database now that we know what modes exist */
for (registered_channel_map::iterator it = RegisteredChannelList.begin(), it_end = RegisteredChannelList.end(); it != it_end; ++it)
it->second->LoadMLock();
}
/* Load MLock from the database now that we know what modes exist */
for (registered_channel_map::iterator it = RegisteredChannelList.begin(), it_end = RegisteredChannelList.end(); it != it_end; ++it)
it->second->LoadMLock();
}
/*************************************************************************/
+13 -9
View File
@@ -1366,7 +1366,7 @@ Anope::string language_strings[LANG_STRING_COUNT] = {
/* CHAN_PROTECT_SYNTAX */
_("PROTECT #channel [nick]"),
/* CHAN_OWNER_SYNTAX */
_("OWNER #channel"),
_("OWNER #channel [\037nick\037]"),
/* CHAN_DEOP_SYNTAX */
_("DEOP #channel [nick]"),
/* CHAN_DEHALFOP_SYNTAX */
@@ -1376,7 +1376,7 @@ Anope::string language_strings[LANG_STRING_COUNT] = {
/* CHAN_DEPROTECT_SYNTAX */
_("DEROTECT #channel [nick]"),
/* CHAN_DEOWNER_SYNTAX */
_("DEOWNER #channel"),
_("DEOWNER #channel [\037nick\037]"),
/* CHAN_KICK_SYNTAX */
_("KICK #channel nick [reason]"),
/* CHAN_BAN_SYNTAX */
@@ -2507,7 +2507,7 @@ Anope::string language_strings[LANG_STRING_COUNT] = {
/* NEWS_LOGON_DEL_SYNTAX */
_("Syntax: LOGONNEWS DEL {num | ALL}"),
/* NEWS_LOGON_DEL_NOT_FOUND */
_("Logon news item #%d not found!"),
_("Logon news item #%s not found!"),
/* NEWS_LOGON_DELETED */
_("Logon news item #%d deleted."),
/* NEWS_LOGON_DEL_NONE */
@@ -2527,7 +2527,7 @@ Anope::string language_strings[LANG_STRING_COUNT] = {
/* NEWS_OPER_DEL_SYNTAX */
_("Syntax: OPERNEWS DEL {num | ALL}"),
/* NEWS_OPER_DEL_NOT_FOUND */
_("Oper news item #%d not found!"),
_("Oper news item #%s not found!"),
/* NEWS_OPER_DELETED */
_("Oper news item #%d deleted."),
/* NEWS_OPER_DEL_NONE */
@@ -2547,7 +2547,7 @@ Anope::string language_strings[LANG_STRING_COUNT] = {
/* NEWS_RANDOM_DEL_SYNTAX */
_("Syntax: RANDOMNEWS DEL {num | ALL}"),
/* NEWS_RANDOM_DEL_NOT_FOUND */
_("Random news item #%d not found!"),
_("Random news item #%s not found!"),
/* NEWS_RANDOM_DELETED */
_("Random news item #%d deleted."),
/* NEWS_RANDOM_DEL_NONE */
@@ -3269,6 +3269,8 @@ Anope::string language_strings[LANG_STRING_COUNT] = {
/* NICK_SERVADMIN_HELP_UNSUSPEND */
_("Syntax: UNSUSPEND nickname\n"
"UNSUSPENDS a nickname from being used."),
/* CHAN_HELP_CMD_REGISTER */
_(" REGISTER Register a channel"),
/* CHAN_HELP_CMD_FORBID */
_(" FORBID Prevent a channel from being used"),
/* CHAN_HELP_CMD_SUSPEND */
@@ -4038,15 +4040,17 @@ Anope::string language_strings[LANG_STRING_COUNT] = {
"By default, limited to the founder, or to SOPs or those with \n"
"level 10 and above on the channel for self deprotecting."),
/* CHAN_HELP_OWNER */
_("Syntax: OWNER #channel\n"
_("Syntax: OWNER #channel [\037nick\037]\n"
" \n"
"Gives you owner status on channel.\n"
"Gives the selected nick owner status on channel. If nick is not\n"
"given, it will give you owner.\n"
" \n"
"Limited to those with founder access on the channel."),
/* CHAN_HELP_DEOWNER */
_("Syntax: DEOWNER #channel\n"
_("Syntax: DEOWNER #channel [\037nick\037]\n"
" \n"
"Removes your owner status on channel.\n"
"Removes owner status from the selected nick on channel. If nick\n"
"is not given, it will deowner you.\n"
" \n"
"Limited to those with founder access on the channel."),
/* CHAN_HELP_INVITE */
+3 -1
View File
@@ -361,10 +361,12 @@ static bool Connect()
return true;
}
DNSRecord req = DNSManager::BlockingQuery(uplink_server->host, uplink_server->ipv6 ? DNS_QUERY_AAAA : DNS_QUERY_A);
try
{
new UplinkSocket(uplink_server->ipv6);
UplinkSock->Connect(uplink_server->host, uplink_server->port, Config->LocalHost);
UplinkSock->Connect(req.result, uplink_server->port, Config->LocalHost);
}
catch (const SocketException &ex)
{
+3 -3
View File
@@ -174,9 +174,7 @@ int m_privmsg(const Anope::string &source, const Anope::string &receiver, const
ircdproto->SendCTCP(bi, u->nick, "VERSION Anope-%s %s :%s - (%s) -- %s", Anope::Version().c_str(), Config->ServerName.c_str(), ircd->name, Config->EncModuleList.begin()->c_str(), Anope::Build().c_str());
}
}
if (bi == NickServ || bi == MemoServ || bi == BotServ)
mod_run_cmd(bi, u, message);
else if (bi == ChanServ)
if (bi == ChanServ)
{
if (!is_oper(u) && Config->CSOpersOnly)
u->SendMessage(ChanServ, ACCESS_DENIED);
@@ -204,6 +202,8 @@ int m_privmsg(const Anope::string &source, const Anope::string &receiver, const
mod_run_cmd(bi, u, message);
}
}
else
mod_run_cmd(bi, u, message);
}
}
+3
View File
@@ -173,6 +173,9 @@ int Module::DelCommand(BotInfo *bi, Command *c)
if (!bi->Commands.erase(c->name))
return MOD_ERR_NOEXIST;
c->module = NULL;
c->service = NULL;
return MOD_ERR_OK;
}
+2 -2
View File
@@ -32,9 +32,9 @@ NickCore::~NickCore()
/* Clean up this nick core from any users online using it
* (ones that /nick but remain unidentified)
*/
for (std::list<User *>::iterator it = this->Users.begin(), it_end = this->Users.end(); it != it_end; ++it)
for (std::list<User *>::iterator it = this->Users.begin(); it != this->Users.end();)
{
User *user = *it;
User *user = *it++;
ircdproto->SendAccountLogout(user, user->Account());
user->RemoveMode(NickServ, UMODE_REGISTERED);
ircdproto->SendUnregisteredNick(user);
+65 -17
View File
@@ -286,6 +286,8 @@ bool XLineManager::DelXLine(XLine *x)
if (it != this->XLines.end())
{
this->Del(x);
delete x;
this->XLines.erase(it);
@@ -311,9 +313,8 @@ XLine *XLineManager::GetEntry(unsigned index)
*/
void XLineManager::Clear()
{
for (std::vector<XLine *>::iterator it = this->XLines.begin(), it_end = this->XLines.end(); it != it_end; ++it)
delete *it;
this->XLines.clear();
while (!this->XLines.empty())
this->DelXLine(this->XLines.front());
}
/** Add an entry to this XLine Manager
@@ -352,9 +353,9 @@ std::pair<int, XLine *> XLineManager::CanAdd(const Anope::string &mask, time_t e
ret.first = 0;
ret.second = NULL;
for (unsigned i = 0, end = this->GetCount(); i < end; ++i)
for (unsigned i = this->GetCount(); i > 0; --i)
{
XLine *x = this->GetEntry(i);
XLine *x = this->GetEntry(i - 1);
ret.second = x;
if (x->Mask.equals_ci(mask))
@@ -380,7 +381,6 @@ std::pair<int, XLine *> XLineManager::CanAdd(const Anope::string &mask, time_t e
else if (Anope::Match(x->Mask, mask) && (!expires || x->Expires <= expires))
{
this->DelXLine(x);
--i;
}
}
@@ -416,7 +416,8 @@ XLine *XLineManager::Check(User *u)
if (x->Expires && x->Expires < Anope::CurTime)
{
OnExpire(x);
this->OnExpire(x);
this->Del(x);
delete x;
this->XLines.erase(XLines.begin() + i - 1);
continue;
@@ -508,8 +509,8 @@ XLine *SGLineManager::Add(BotInfo *bi, User *u, const Anope::string &mask, time_
this->AddXLine(x);
if (Config->AkillOnAdd)
ircdproto->SendAkill(x);
if (UplinkSock && Config->AkillOnAdd)
this->Send(x);
return x;
}
@@ -530,6 +531,11 @@ void SGLineManager::OnExpire(XLine *x)
ircdproto->SendGlobops(OperServ, "AKILL on %s has expired", x->Mask.c_str());
}
void SGLineManager::Send(XLine *x)
{
ircdproto->SendAkill(x);
}
XLine *SNLineManager::Add(BotInfo *bi, User *u, const Anope::string &mask, time_t expires, const Anope::string &reason)
{
if (!mask.empty() && mask.find_first_not_of("*?") == Anope::string::npos)
@@ -576,7 +582,7 @@ XLine *SNLineManager::Add(BotInfo *bi, User *u, const Anope::string &mask, time_
User *user = it->second;
++it;
if (!is_oper(user) && Anope::Match(user->realname, x->Mask))
if (!is_oper(user) && user->server != Me && Anope::Match(user->realname, x->Mask))
kill_user(Config->ServerName, user->nick, rreason);
}
}
@@ -591,8 +597,7 @@ void SNLineManager::Del(XLine *x)
void SNLineManager::OnMatch(User *u, XLine *x)
{
ircdproto->SendSGLine(x);
this->Send(x);
Anope::string reason = "G-Lined: " + x->Reason;
kill_user(Config->s_OperServ, u->nick, reason);
}
@@ -603,6 +608,36 @@ void SNLineManager::OnExpire(XLine *x)
ircdproto->SendGlobops(OperServ, "SNLINE on \2%s\2 has expired", x->Mask.c_str());
}
void SNLineManager::Send(XLine *x)
{
ircdproto->SendSGLine(x);
}
XLine *SNLineManager::Check(User *u)
{
for (unsigned i = this->XLines.size(); i > 0; --i)
{
XLine *x = this->XLines[i - 1];
if (x->Expires && x->Expires < Anope::CurTime)
{
this->OnExpire(x);
this->Del(x);
delete x;
this->XLines.erase(XLines.begin() + i - 1);
continue;
}
if (Anope::Match(u->realname, x->Mask))
{
this->OnMatch(u, x);
return x;
}
}
return NULL;
}
XLine *SQLineManager::Add(BotInfo *bi, User *u, const Anope::string &mask, time_t expires, const Anope::string &reason)
{
if (mask.find_first_not_of("*") == Anope::string::npos)
@@ -664,7 +699,7 @@ XLine *SQLineManager::Add(BotInfo *bi, User *u, const Anope::string &mask, time_
UserContainer *uc = *it;
++it;
if (is_oper(uc->user))
if (is_oper(uc->user) || uc->user->server == Me)
continue;
c->Kick(NULL, uc->user, "%s", reason.c_str());
}
@@ -677,13 +712,14 @@ XLine *SQLineManager::Add(BotInfo *bi, User *u, const Anope::string &mask, time_
User *user = it->second;
++it;
if (!is_oper(user) && Anope::Match(user->nick, x->Mask))
if (!is_oper(user) && user->server != Me && Anope::Match(user->nick, x->Mask))
kill_user(Config->ServerName, user->nick, rreason);
}
}
}
ircdproto->SendSQLine(x);
if (UplinkSock)
this->Send(x);
return x;
}
@@ -707,11 +743,16 @@ void SQLineManager::OnExpire(XLine *x)
ircdproto->SendGlobops(OperServ, "SQLINE on \2%s\2 has expired", x->Mask.c_str());
}
void SQLineManager::Send(XLine *x)
{
ircdproto->SendSQLine(x);
}
bool SQLineManager::Check(Channel *c)
{
if (ircd->chansqline && SQLine)
{
for (std::vector<XLine *>::const_iterator it = SGLine->GetList().begin(), it_end = SGLine->GetList().end(); it != it_end; ++it)
for (std::vector<XLine *>::const_iterator it = SQLine->GetList().begin(), it_end = SQLine->GetList().end(); it != it_end; ++it)
{
XLine *x = *it;
@@ -765,7 +806,8 @@ XLine *SZLineManager::Add(BotInfo *bi, User *u, const Anope::string &mask, time_
this->AddXLine(x);
ircdproto->SendSZLine(x);
if (UplinkSock)
this->Send(x);
return x;
}
@@ -785,3 +827,9 @@ void SZLineManager::OnExpire(XLine *x)
if (Config->WallSZLineExpire)
ircdproto->SendGlobops(OperServ, "SZLINE on \2%s\2 has expired", x->Mask.c_str());
}
void SZLineManager::Send(XLine *x)
{
ircdproto->SendSZLine(x);
}
+8 -3
View File
@@ -400,10 +400,15 @@ void ChannelInfo::LoadMLock()
this->c = new Channel(this->name, this->time_registered);
if (!this->bi && ChanServ && ModeManager::FindChannelModeByName(CMODE_PERM) == NULL)
ChanServ->Assign(NULL, this);
else if (this->bi)
this->bi->Join(c);
else
{
if (!this->bi)
whosends(this)->Assign(NULL, this);
if (this->c->FindUser(this->bi) == NULL)
this->bi->Join(this->c);
}
check_modes(this->c);
this->CheckTopic();
this->RestoreTopic();
}
}
+2 -2
View File
@@ -33,9 +33,9 @@ void send_cmd(const Anope::string &source, const char *fmt, ...)
if (!UplinkSock)
{
if (!source.empty())
Log(LOG_DEBUG) << "Attemtped to send \"" << source << " " << buf << "\" with UplinkSock NULL";
Log(LOG_DEBUG) << "Attempted to send \"" << source << " " << buf << "\" with UplinkSock NULL";
else
Log(LOG_DEBUG) << "Attemtped to send \"" << buf << "\" with UplinkSock NULL";
Log(LOG_DEBUG) << "Attempted to send \"" << buf << "\" with UplinkSock NULL";
return;
}
+4 -5
View File
@@ -114,7 +114,7 @@ void add_session(const Anope::string &nick, const Anope::string &host, const Ano
if (exception)
{
kill = false;
if (session->count >= exception->limit)
if (exception->limit && session->count >= exception->limit)
kill = true;
}
}
@@ -210,17 +210,16 @@ void del_session(const Anope::string &host)
void expire_exceptions()
{
for (std::vector<Exception *>::iterator it = exceptions.begin(), it_end = exceptions.end(); it != it_end; )
for (unsigned i = exceptions.size(); i > 0; --i)
{
Exception *e = *it;
std::vector<Exception *>::iterator curr_it = it++;
Exception *e = exceptions[i - 1];
if (!e->expires || e->expires > Anope::CurTime)
continue;
if (Config->WallExceptionExpire)
ircdproto->SendGlobops(OperServ, "Session limit exception for %s has expired.", e->mask.c_str());
delete e;
exceptions.erase(curr_it);
exceptions.erase(exceptions.begin() + i - 1);
}
}
+6 -8
View File
@@ -435,16 +435,14 @@ bool BufferedSocket::ProcessRead()
*/
bool BufferedSocket::ProcessWrite()
{
if (WriteBuffer.empty())
{
if (this->WriteBuffer.empty())
return true;
}
if (this->IO->Send(this, WriteBuffer) == -1)
{
int count = this->IO->Send(this, this->WriteBuffer);
if (count == -1)
return false;
}
WriteBuffer.clear();
SocketEngine->ClearWritable(this);
this->WriteBuffer = this->WriteBuffer.substr(count);
if (this->WriteBuffer.empty())
SocketEngine->ClearWritable(this);
return true;
}
+8 -13
View File
@@ -859,19 +859,14 @@ int main(int argc, char *argv[])
process_mlock_modes(fs, ci->mlock_off, ircd);
fs << std::endl;
}
if (ci->mlock_limit || (ci->mlock_key && *ci->mlock_key) || (ci->mlock_flood && *ci->mlock_flood) || (ci->mlock_redirect && *ci->mlock_redirect))
{
fs << "MD MLP";
if (ci->mlock_limit)
fs << " CMODE_LIMIT " << ci->mlock_limit;
if (ci->mlock_key && *ci->mlock_key)
fs << " CMODE_KEY " << ci->mlock_key;
if (ci->mlock_flood && *ci->mlock_flood)
fs << " CMODE_FLOOD " << ci->mlock_flood;
if (ci->mlock_redirect && *ci->mlock_redirect)
fs << " CMODE_REDIRECT " << ci->mlock_redirect;
fs << std::endl;
}
if (ci->mlock_limit)
fs << "MD MLP CMODE_LIMIT " << ci->mlock_limit << std::endl;
if (ci->mlock_key && *ci->mlock_key)
fs << "MD MLP CMODE_KEY " << ci->mlock_key << std::endl;
if (ci->mlock_flood && *ci->mlock_flood)
fs << "MD MLP CMODE_FLOOD " << ci->mlock_flood << std::endl;
if (ci->mlock_redirect && *ci->mlock_redirect)
fs << "MD MLP CMODE_REDIRECT " << ci->mlock_redirect << std::endl;
if (ci->memos.memocount)
{
Memo *memos = ci->memos.memos;
+2
View File
@@ -191,6 +191,8 @@ int main(int argc, char *argv[])
if (line.substr(0, 2) == "NC")
{
std::vector<std::string> parts = BuildStringVector(line);
if (parts.size() < 3)
continue;
std::string password = parts[2];
size_t colon = password.find(':');
if (colon != std::string::npos && password.substr(0, colon) != "plain")
+2 -1
View File
@@ -2,7 +2,8 @@
VERSION_MAJOR="1"
VERSION_MINOR="9"
VERSION_PATCH="3"
VERSION_EXTRA=""
VERSION_EXTRA="-p1"
VERSION="$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH$VERSION_EXTRA"