1
0
mirror of https://github.com/anope/anope.git synced 2026-06-17 22:24:48 +02:00

Compare commits

..

69 Commits

Author SHA1 Message Date
sjaz f2598bdb6e Initialise 1.8.2-SVN and update README.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2371 5417fbe8-f217-4b02-8779-1006273d7864
2009-07-11 12:52:18 +00:00
adam- 101fe6882d Added ChanServ HELP CLEAR INVITES to documentation
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2365 5417fbe8-f217-4b02-8779-1006273d7864
2009-07-10 05:32:13 +00:00
adam- a30afed7b2 Fix a crash when mysql is used without MysqlSecure defined. Thanks to
jerrcs for finding and testing


git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2364 5417fbe8-f217-4b02-8779-1006273d7864
2009-07-07 21:02:38 +00:00
adam- feedbd6b0d Fix unsetting founder_chans when logging out other users
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2362 5417fbe8-f217-4b02-8779-1006273d7864
2009-07-06 16:03:48 +00:00
DukePyrolator 05bc74d9cb updated german language file. thanks to Han`
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2360 5417fbe8-f217-4b02-8779-1006273d7864
2009-07-05 15:13:55 +00:00
sjaz e0cc7a6c0b Initialise 1.8.1 SVN
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2359 5417fbe8-f217-4b02-8779-1006273d7864
2009-07-04 13:41:09 +00:00
sjaz 2fdcb30beb Anope 1.8.1 Release
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2357 5417fbe8-f217-4b02-8779-1006273d7864
2009-07-04 12:28:19 +00:00
sjaz feff8c1fb1 Small amendment to version.log to complete a few missing entries.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2356 5417fbe8-f217-4b02-8779-1006273d7864
2009-07-04 12:26:52 +00:00
jantje_85 ea05ff108a Fixed several bugs in messages.c regarding parsing TS6 encoded commands. This is a prerequisite for an InspIRCd 1.2 protocol module.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2337 5417fbe8-f217-4b02-8779-1006273d7864
2009-06-26 19:18:30 +00:00
sjaz bcae4f00e1 Update to allow windows build to function with the removal of inspircd10.c
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2329 5417fbe8-f217-4b02-8779-1006273d7864
2009-06-20 19:54:44 +00:00
cyberbotx 01f65c7e64 Fix memory leak in NS SUSPEND, patch by Adam.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2327 5417fbe8-f217-4b02-8779-1006273d7864
2009-06-15 20:28:57 +00:00
jantje_85 958521b8c6 Added a few missing entries to Changes.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2325 5417fbe8-f217-4b02-8779-1006273d7864
2009-06-15 10:55:05 +00:00
cyberbotx 06d5233502 Bugfix for bug #1082, remove check for NSModeOnID from NS UPDATE, it's not logical to check for NSModeOnID since you must be identified to use NS UPDATE anyways.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2322 5417fbe8-f217-4b02-8779-1006273d7864
2009-06-12 03:11:18 +00:00
cyberbotx a4b40f6f67 Fix potential crash in Charybdis protocol module, patch by Adam.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2321 5417fbe8-f217-4b02-8779-1006273d7864
2009-06-11 21:41:08 +00:00
cyberbotx 1d4f61e089 Change default of UnRestrictSAdmin to be enabled, so hopefully we get less users complaining about their +a being removed and being unable to use /sa* commands.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2316 5417fbe8-f217-4b02-8779-1006273d7864
2009-06-10 05:38:11 +00:00
sjaz 8ff16f17cc Fix to fix the broken langfiles in my last commit. Langfiles 1 - Me 0 (Spaces != Tab)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2308 5417fbe8-f217-4b02-8779-1006273d7864
2009-06-02 21:29:46 +00:00
sjaz 2bb115f6e4 [#1081] - Fixing CS HELP output to not imply you can invite anyone bar yourself into a channel.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2307 5417fbe8-f217-4b02-8779-1006273d7864
2009-06-02 21:20:26 +00:00
cyberbotx e46b0f0ccd Change sizeof() to strlen() in db_mysql_secure(), patch by DukePyrolator.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2301 5417fbe8-f217-4b02-8779-1006273d7864
2009-05-17 05:57:08 +00:00
cyberbotx 572d1a94bd Fix bug #1078, MySQL query should no longer fail when password and salt are too long, patch from Adam.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2299 5417fbe8-f217-4b02-8779-1006273d7864
2009-05-10 23:01:07 +00:00
sjaz 9210aae6f9 Patch to allow jupe on all bar uplink and self. Thanks Adam. (Bug #1076)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2297 5417fbe8-f217-4b02-8779-1006273d7864
2009-05-08 15:10:05 +00:00
sjaz d4b6968108 Fix link to Link Block Generator on our site. Good find whoever it was :)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2294 5417fbe8-f217-4b02-8779-1006273d7864
2009-05-07 17:33:53 +00:00
sjaz 672acf306f Patch from DukeP - founderstatus (gained by /cs identify) is not removed on logout, and on remote logout the nicktracking and the timers are removed from the wrong user
(u instead of u2). Cheers! :)


git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2293 5417fbe8-f217-4b02-8779-1006273d7864
2009-05-06 07:52:57 +00:00
sjaz a408ceee74 Backport from 1.9 to document the use of /ms set notify mail and nomail (Adam)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2289 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-26 16:37:38 +00:00
sjaz 55a564a0b4 Patch to rectify Syntax output from langfiles and update certain modules to use syntax_error rather than notice_lang. (Adam)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2287 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-22 18:10:38 +00:00
jantje_85 027567b4b0 Don't enfoce akick/forbidden/etc.. settings on clients on ulined servers.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2284 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-17 22:39:18 +00:00
cyberbotx 25e81f6ea9 Backport of r2271, remove files from the modules runtime directory on startup, just in case files were left behind during a previous run.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2272 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-11 06:57:52 +00:00
sjaz ea090fae8d [#1039] Patch to update documentation on CS RESTRICTED to reflect historical behaviour.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2262 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-06 16:30:34 +00:00
jantje_85 74c5d989bc Backport of bugfix for bug #1004 from SVN r2003, Modechanges from ulined server are no longer being blocked by SECUREOPS.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2253 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-03 19:45:24 +00:00
jantje_85 1dec3ee8fb Fixed non-standard C-style comment.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2251 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-03 18:25:20 +00:00
jantje_85 446a6f6ea5 Updated example.conf regarding removal of the inspirc10 protocol module and SRA requirement for SuperAdmin.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2250 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-03 18:13:37 +00:00
jantje_85 9d89891a90 Someone seems to have forgotten about Changes.. added most significant commits to Changes.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2249 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-03 18:07:13 +00:00
cyberbotx 1cbfdac929 Backport of bugfix for bug #1050 from SVN r2163, patch from Adam, MS STAFF's syntax shows correctly, required adding a language string as well, currently they are all English until they can be properly translated.
Also update version.log with previous 4 revisions as well.

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2245 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-03 02:57:40 +00:00
cyberbotx 49d1d9e79b Fix compile error with inspircd11 module.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2240 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-02 22:51:21 +00:00
rburchell eb4510946f Modified patch to change vhost removal to work correctly in all cases, originally by Szymek.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2221 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-30 09:47:20 +00:00
rburchell 104b52b06e Correctly initialise variables in jointhrottle check, noted by Szymek.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2220 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-30 09:46:36 +00:00
rburchell 697f535f8b Remove insp1.0 protocol modules. 1.0 has been unsupported by upstream for a very long time, and they contain a number of bugs since fixed in the 1.1 module.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2219 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-30 09:46:08 +00:00
cyberbotx 35ca9adc25 Backport of bugfix for bug #1073 from SVN r2217, fantasy commands in CTCP ACTIONs will now be ignored instead of processed.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2218 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-30 06:17:26 +00:00
cyberbotx 8f3958d0f4 Correct backport of bug #1065, patch from DukePyrolator, there is no nc on the User struct in 1.8.x, use nickTrack instead, oops.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2199 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-23 17:05:52 +00:00
cyberbotx 57fb28e70a Backport of bugfix for bug #1044 from SVN r2195, CS SET MLOCK no longer requires a parameter, and leaving out the parameter renders the mlock to +r as it should be.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2196 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-23 04:57:15 +00:00
cyberbotx 1ba8e796c7 Backport of bugfix for buf #1065 from SVN r2192, original patch from DukePyrolator, force a user off a nick when it is suspended.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2193 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-23 02:54:46 +00:00
cyberbotx 645c224ff7 Backport of bugfix for bug #1064 from SVN r2188, original patch from DukePyrolator, fixes NS RECOVER so it doesn't display "(null)" in some places.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2189 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-23 00:46:53 +00:00
cyberbotx 66a9b8605f Backport of bugfix for bug #1062 from SVN r2185 and 2186, patch from Adam, BS ASSIGN, BS ACT, and BS SAY should no longer send error messags to users without access.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2187 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-23 00:35:45 +00:00
sjaz 9ee3f37bee Updated version.log with changes since 1.8.0 Release.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2183 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-22 09:50:41 +00:00
sjaz 9d7edd3055 Fix memleak in channels.c from DukePyrolator. (Same fix applied to 1.9 earlier). Thanks DP!
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2182 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-22 09:40:57 +00:00
cyberbotx 2af1c0a5e9 Backport of bugfix for bug #1043 from SVN r2178, patch from Adam, CS LIST will no longer show suspended channels to normal users.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2181 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-22 01:31:43 +00:00
cyberbotx 08c8a883ef Backport of bugfix for bug #1030 from SVN r2179, patch from Adam, deleting from the channel access list now logs a message about the deleted items.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2180 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-22 01:31:20 +00:00
sjaz 7cc23d874f #1054 Backported fix from 1.9 to hide password in log/logchan whilst user is ignored.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2175 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-18 21:21:00 +00:00
sjaz 324b4ee85e Patch from DukePyrolator to log an entry for when NSMemoReceipt isn't defined in the config.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2166 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-15 18:25:42 +00:00
cyberbotx 3ba4d4e97d Backport of bugfix for bug #1025 from SVN r2148, the message for "no such entry" should show whatever was passed in to the command, not -1 every time.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2152 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-09 23:29:35 +00:00
cyberbotx 9bb905229d Backport of bugfix for bug #1020 from SVN r2150, read and write the mlock for flood and redirect regardless of the IRCd's setting for the mode.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2151 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-09 23:23:27 +00:00
robbeh f98a3a85d6 Applied adams patch for re-ordering lists
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2145 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-07 17:45:11 +00:00
cyberbotx ef83568646 Backport of fix from r2131, inspircd11 module should send the current timestamp, not the timestamp that the akill was set at.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2132 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-23 03:20:20 +00:00
cyberbotx 64fee38976 Backport fix in sgets which lacked FD_ZERO() call before FD_SET().
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2127 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-23 01:47:26 +00:00
rburchell 4768beb328 Fix compile caused by careless backport, thanks DP.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2110 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-18 23:22:42 +00:00
rburchell 60c88393a0 Backport: Correctly lower TS (if the ircd provided it) on reciept of JOIN messages. This fixes dropped mode changes coming from services on TS6 (and TS6-alike) ircds for channels where TS is dropped elsewhere on the network.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2024 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-12 22:15:58 +00:00
rburchell 07892e8b4b Backport from 1.9.1 - inspircd11: Pass chants in JOIN message to not blow away timestamps.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2023 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-12 21:54:33 +00:00
rburchell 6c801d5780 Patch by Adam fixing #1006 (originally caused by #922): modes set by ChanServ are reversed. Thanks!
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@1946 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-07 22:32:02 +00:00
robbeh 0b76c8b5e6 Applied patch by mooncup to re-apply the cloaked host when using /hs off for unreal32
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@1943 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-04 17:27:59 +00:00
jantje_85 942b1a8800 Giving credits for +j support..
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@1941 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-01 02:00:28 +00:00
jantje_85 308d7937ef Bug 1001: Added support for internal tracking of +j channel mode (throttling).
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@1940 5417fbe8-f217-4b02-8779-1006273d7864
2009-01-29 02:02:44 +00:00
rburchell 9c2591c20a Manual backport of r1935 / 183bf6525b84: check noexpire/readonly in expire_all(), otherwise stuff will get expired on shutdown.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@1937 5417fbe8-f217-4b02-8779-1006273d7864
2009-01-26 20:11:11 +00:00
rburchell 6c51b17ef1 Don't allow an empty ident when reading HS vident. Rob, this needs review before I want to push it to SVN.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@1936 5417fbe8-f217-4b02-8779-1006273d7864
2009-01-26 20:10:44 +00:00
cyberbotx 5a191ce5a6 Backport of fix for bug 1000, do not allow a nick to be grouped if the IRCd protocol deems the nick invalid.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@1926 5417fbe8-f217-4b02-8779-1006273d7864
2009-01-22 11:49:08 +00:00
cyberbotx a68730adb1 Fixed check for backtrace() in configure.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@1924 5417fbe8-f217-4b02-8779-1006273d7864
2009-01-18 21:05:42 +00:00
jantje_85 9d24e8f35c Initialized 1.8 SVN.
Fixed MySQL dumping failing on unsafe queries. [Bug #994]

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@1923 5417fbe8-f217-4b02-8779-1006273d7864
2009-01-17 14:52:23 +00:00
sjaz 4a8bc79a06 Update install.js with correct url for windows build help links.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@1915 5417fbe8-f217-4b02-8779-1006273d7864
2009-01-03 17:14:32 +00:00
sjaz b37da9de9e More housekeeping contact address updates.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@1913 5417fbe8-f217-4b02-8779-1006273d7864
2009-01-03 16:31:29 +00:00
sjaz a632cdc732 Update copyright & contact information within files.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@1912 5417fbe8-f217-4b02-8779-1006273d7864
2009-01-03 16:17:00 +00:00
sjaz c777c8d9aa Anope Stable Branch
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@1902 5417fbe8-f217-4b02-8779-1006273d7864
2009-01-01 12:00:20 +00:00
365 changed files with 92919 additions and 73458 deletions
+1 -1
View File
@@ -9,7 +9,7 @@
CURVER
This program will help you to compile your Services, and ask you
questions regarding the compile-time settings of it during the
process. For more options type SOURCE_DIR/Config --help
process. For more options type ./Config --help
Anope is a set of Services for IRC networks that allows users to
manage their nicks and channels in a secure and efficient way,
-5
View File
@@ -1,5 +0,0 @@
/autom4te.cache
Makefile
config.cache
config.log
config.status
-586
View File
@@ -1,586 +0,0 @@
# This usage of CMake requires at least version 2.4 (checks are made to determine what to use when certain versions lack functions)
cmake_minimum_required(VERSION 2.4 FATAL_ERROR)
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
# If the Source dir and the Binary dir are the same, we are building in-source, which we will disallow due to Autotools being there (but only on non-Windows)
if(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR} AND NOT WIN32)
message(FATAL_ERROR "You can not use CMake to build Anope from the root of it's source tree! Remove the CMakeCache.txt file from this directory, then create a separate directory (either below this directory or elsewhere), and then re-run CMake from there.")
endif(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR} AND NOT WIN32)
# Detect is we are using CMake 2.6 or better, these versions include functions that require less work than CMake 2.4 does
if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
set(CMAKE26_OR_BETTER TRUE)
set(CMAKE244_OR_BETTER TRUE)
set(CMAKE242_OR_BETTER TRUE)
else(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
set(CMAKE26_OR_BETTER FALSE)
# Also detect if we are using CMake 2.4.4 or better, the CheckCXXCompilerFlag module is non-existant in earlier versions
if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} GREATER 2.4.3)
set(CMAKE244_OR_BETTER TRUE)
set(CMAKE242_OR_BETTER TRUE)
else(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} GREATER 2.4.3)
set(CMAKE244_OR_BETTER FALSE)
# ALSO detect if we are using CMake 2.4.2 or better, the APPEND sub-command of list() is non-existant in earlier versions
if(CMAKE_PATCH_VERSION GREATER 1)
set(CMAKE242_OR_BETTER TRUE)
else(CMAKE_PATCH_VERSION GREATER 1)
set(CMAKE242_OR_BETTER FALSE)
endif(CMAKE_PATCH_VERSION GREATER 1)
endif(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} GREATER 2.4.3)
endif(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
# If the user specifies -DCMAKE_BUILD_TYPE on the command line, take their definition
# and dump it in the cache along with proper documentation, otherwise set CMAKE_BUILD_TYPE
# to Debug prior to calling PROJECT()
# Only do this if not using Visual Studio
if(NOT MSVC)
if(CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.")
else(CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE DEBUG CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.")
endif(CMAKE_BUILD_TYPE)
endif(NOT MSVC)
# Set the project as C++ primarily, but have C enabled for the checks required later
project(Anope CXX)
enable_language(C)
# If running under MinGW, we have to force the resource compiler settings (hopefully this will be fixed in a later version of CMake)
if(MINGW)
set(CMAKE_RC_COMPILER_INIT windres)
enable_language(RC)
set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> <FLAGS> <DEFINES> -o <OBJECT> <SOURCE>")
endif(MINGW)
# Include the checking functions used later in this CMakeLists.txt
include(CheckFunctionExists)
include(CheckIncludeFile)
include(CheckTypeSize)
include(CheckLibraryExists)
if(CMAKE244_OR_BETTER)
include(CheckCXXCompilerFlag)
else(CMAKE244_OR_BETTER)
include(TestCXXAcceptsFlag)
endif(CMAKE244_OR_BETTER)
# Add an optional variable for using run-cc.pl for building, Perl will be checked later regardless of this setting
option(USE_RUN_CC_PL "Use run-cc.pl for building" OFF)
# Use the following directories as includes
include_directories(${Anope_SOURCE_DIR}/include ${Anope_BINARY_DIR}/include ${Anope_BINARY_DIR}/lang)
# If using Windows, always add the _WIN32 define
if(WIN32)
add_definitions(-D_WIN32)
endif(WIN32)
# If using Visual Studio, set the C++ flags accordingly
if(MSVC)
# Remove the default exception handling flags, also remove default warning level flag
string(REPLACE "/EHsc " "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
string(REPLACE "/GX " "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
string(REPLACE "/W3 " "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
# Set the compile flags to have warnings on the max setting (but disable a few annoying ones), exception handling turned on, the proper defines
set(CXXFLAGS "${CXXFLAGS} /W4 /wd4251 /wd4706 /wd4800 /wd4996 /EHs")
add_definitions(-DMSVCPP -D_CRT_SECURE_NO_WARNINGS)
# Otherwise, we're not using Visual Studio
else(MSVC)
# Set the compile flags to have all warnings on (including shadowed variables)
set(CXXFLAGS "${CXXFLAGS} -Wall -Wshadow")
# If on a *nix system, also set the compile flags to remove GNU extensions (favor ISO C++) as well as reject non-ISO C++ code, also remove all leading underscores in exported symbols
if(UNIX)
set(CXXFLAGS "${CXXFLAGS} -ansi -pedantic -fno-leading-underscore")
# Set the module-specific compile flags to the same setting as the compile flags
set(MODULE_CXXFLAGS "${CXXFLAGS}")
# If we aren't on a *nix system, we are using MinGW
else(UNIX)
# Also, if we are building under MinGW, add another define for MinGW
if(MINGW)
add_definitions(-DMINGW)
endif(MINGW)
endif(UNIX)
endif(MSVC)
# If CMake has found that the given system requires a special library for dl* calls, include it with the linker flags
if(CMAKE_DL_LIBS)
set(LDFLAGS "${LDFLAGS} -l${CMAKE_DL_LIBS}")
endif(CMAKE_DL_LIBS)
# Under MinGW, the -shared flag isn't properly set in the module-specific linker flags, add it from the C flags for shared libraries
if(MINGW)
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS}")
endif(MINGW)
# Under Windows, we set the executable name for Anope to be anope
if(WIN32)
set(PROGRAM_NAME anope)
# Under *nix, we set the executable name for Anope to be services
else(WIN32)
set(PROGRAM_NAME services)
endif(WIN32)
# If we are not using Visual Studio, we'll run the following checks
if(NOT MSVC)
# Check if the C++ compiler can accept the -pipe flag, and add it to the compile flags if it works
if(CMAKE244_OR_BETTER)
# If using CMake 2.4.4 or better, we can use check_cxx_compiler_flag
check_cxx_compiler_flag(-pipe HAVE_PIPE_FLAG)
else(CMAKE244_OR_BETTER)
# If using CMake 2.4.3 or older, we will use check_cxx_accepts_flags instead
check_cxx_accepts_flag(-pipe HAVE_PIPE_FLAG)
endif(CMAKE244_OR_BETTER)
# If the flag was accepted, add it to the list of flags
if(HAVE_PIPE_FLAG)
set(CXXFLAGS "${CXXFLAGS} -pipe")
endif(HAVE_PIPE_FLAG)
# The following are additional library checks, they are not required for Windows
if(NOT WIN32)
# Check if socket is within the socket library (if the library exists), and add it to the linker flags if needed
check_library_exists(socket socket "" HAVE_SOCKET_LIB)
if(HAVE_SOCKET_LIB)
set(LDFLAGS "${LDFLAGS} -lsocket")
endif(HAVE_SOCKET_LIB)
endif(NOT WIN32)
endif(NOT MSVC)
# If DEFUMASK wasn't passed to CMake, set a default depending on if RUNGROUP was passed in or not
if(NOT DEFUMASK)
if(RUNGROUP)
set(DEFUMASK "007")
else(RUNGROUP)
set(DEFUMASK "077")
endif(RUNGROUP)
endif(NOT DEFUMASK)
# Check for the existance of the following include files
check_include_file(sys/types.h HAVE_SYS_TYPES_H)
check_include_file(strings.h HAVE_STRINGS_H)
check_include_file(sys/select.h HAVE_SYS_SELECT_H)
# Check for the existance of the following functions
check_function_exists(gethostbyname HAVE_GETHOSTBYNAME)
check_function_exists(gettimeofday HAVE_GETTIMEOFDAY)
check_function_exists(setgrent HAVE_SETGRENT)
check_function_exists(strcasecmp HAVE_STRCASECMP)
check_function_exists(stricmp HAVE_STRICMP)
check_function_exists(strlcat HAVE_STRLCAT)
check_function_exists(strlcpy HAVE_STRLCPY)
check_function_exists(umask HAVE_UMASK)
check_function_exists(backtrace HAVE_BACKTRACE)
# Check for the existance of the following types
check_type_size(uint8_t UINT8_T)
check_type_size(u_int8_t U_INT8_T)
check_type_size(int16_t INT16_T)
check_type_size(uint16_t UINT16_T)
check_type_size(u_int16_t U_INT16_T)
check_type_size(int32_t INT32_T)
check_type_size(uint32_t UINT32_T)
check_type_size(u_int32_t U_INT32_T)
# Only CMake 2.6.x and later contain the STRIP sub-command for string()
if(CMAKE26_OR_BETTER)
# Strip the leading and trailing spaces from the compile flags
if(CXXFLAGS)
string(STRIP ${CXXFLAGS} CXXFLAGS)
endif(CXXFLAGS)
# Strip the leading and trailing spaces from the linker flags
if(LDFLAGS)
string(STRIP ${LDFLAGS} LDFLAGS)
endif(LDFLAGS)
endif(CMAKE26_OR_BETTER)
# A macro to handle appending to lists
macro(append_to_list LIST)
if(CMAKE242_OR_BETTER)
# For CMake 2.4.2 or better, we can just use the APPEND sub-command of list()
list(APPEND ${LIST} ${ARGN})
else(CMAKE242_OR_BETTER)
# For CMake 2.4.x before 2.4.2, we have to do this manually use set() instead
set(${LIST} ${${LIST}} ${ARGN})
endif(CMAKE242_OR_BETTER)
endmacro(append_to_list)
# A macro to handle reading specific lines from a file
macro(read_from_file FILE REGEX STRINGS)
if(CMAKE26_OR_BETTER)
# For CMake 2.6.x or better, we can just use this function to get the lines that match the given regular expression
file(STRINGS ${FILE} RESULT REGEX ${REGEX})
else(CMAKE26_OR_BETTER)
# For CMake 2.4.x, we need to do this manually, firsly we read the file in
file(READ ${FILE} ALL_STRINGS)
# Next we replace all newlines with semicolons
string(REGEX REPLACE "\n" ";" ALL_STRINGS ${ALL_STRINGS})
# Clear the result list
set(RESULT)
# Iterate through all the lines of the file
foreach(STRING ${ALL_STRINGS})
# Check for a match against the given regular expression
string(REGEX MATCH ${REGEX} STRING_MATCH ${STRING})
# If we had a match, append the match to the list
if(STRING_MATCH)
append_to_list(RESULT ${STRING})
endif(STRING_MATCH)
endforeach(STRING)
endif(CMAKE26_OR_BETTER)
# Set the given STRINGS variable to the result
set(${STRINGS} ${RESULT})
endmacro(read_from_file)
# A macro to handle searching within a list
macro(find_in_list LIST ITEM_TO_FIND FOUND)
if(CMAKE26_OR_BETTER OR ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} GREATER 2.4.7)
# For CMake 2.6.x or better (as well as CMake 2.4.8 or better), we can use the FIND sub-command of list()
list(FIND ${LIST} ${ITEM_TO_FIND} ITEM_FOUND)
else(CMAKE26_OR_BETTER OR ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} GREATER 2.4.7)
# For CMake 2.4.x before 2.4.8, we have to do this ourselves (NOTE: This is very slow due to a lack of break() as well), firstly we set that we a temporary boolean
set(ITEM_FOUND -1)
set(POS 0)
# Iterate through the list
foreach(ITEM ${${LIST}})
# If the item we are looking at is the item we are trying to find, set that we've found the item
if(${ITEM} STREQUAL ${ITEM_TO_FIND})
set(ITEM_FOUND ${POS})
endif(${ITEM} STREQUAL ${ITEM_TO_FIND})
math(EXPR POS "${POS} + 1")
endforeach(ITEM)
endif(CMAKE26_OR_BETTER OR ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} GREATER 2.4.7)
# Set the given FOUND variable to the result
set(${FOUND} ${ITEM_FOUND})
endmacro(find_in_list)
# A macro to handle removing duplicates from a list
macro(remove_list_duplicates LIST)
if(CMAKE26_OR_BETTER)
# For CMake 2.6.x or better, this can be done automatically
list(REMOVE_DUPLICATES ${LIST})
else(CMAKE26_OR_BETTER)
# For CMake 2.4.x, we have to do this ourselves, firstly we'll clear a temporary list
set(NEW_LIST)
# Iterate through the old list
foreach(ITEM ${${LIST}})
# Check if the item is in the new list
find_in_list(NEW_LIST ${ITEM} FOUND_ITEM)
if(FOUND_ITEM EQUAL -1)
# If the item was not found, append it to the list
append_to_list(NEW_LIST ${ITEM})
endif(FOUND_ITEM EQUAL -1)
endforeach(ITEM)
# replace the old list with the new list
set(${LIST} ${NEW_LIST})
endif(CMAKE26_OR_BETTER)
endmacro(remove_list_duplicates)
# Search for the following programs
find_program(GREP grep)
find_program(SH sh)
find_program(CHGRP chgrp)
find_program(CHMOD chmod)
find_program(PERL perl)
# If perl is included on the system and the user wants to use run-cc.pl, change the commands for compiling and linking
if(PERL AND USE_RUN_CC_PL)
set(CMAKE_CXX_COMPILE_OBJECT "${PERL} ${Anope_SOURCE_DIR}/run-cc.pl -q ${CMAKE_CXX_COMPILE_OBJECT}")
set(CMAKE_CXX_LINK_EXECUTABLE "${PERL} ${Anope_SOURCE_DIR}/run-cc.pl -q ${CMAKE_CXX_LINK_EXECUTABLE}")
set(CMAKE_CXX_CREATE_SHARED_MODULE "${PERL} ${Anope_SOURCE_DIR}/run-cc.pl -q ${CMAKE_CXX_CREATE_SHARED_MODULE}")
endif(PERL AND USE_RUN_CC_PL)
# If a INSTDIR was passed in to CMake, use it as the install prefix, otherwise set the default install prefix to the services directory under the user's home directory
if(INSTDIR)
set(CMAKE_INSTALL_PREFIX "${INSTDIR}")
else(INSTDIR)
set(CMAKE_INSTALL_PREFIX "$ENV{HOME}/services")
endif(INSTDIR)
# Version number processing
# Find all lines in version.log that start with VERSION_
read_from_file(${Anope_SOURCE_DIR}/version.log "^VERSION_" VERSIONS)
# Iterate through the strings found
foreach(VERSION_STR ${VERSIONS})
# Get the length of the string
string(LENGTH ${VERSION_STR} VERSION_LEN)
# Subtract 16 from the string's length (8 for VERSION_, 5 more for the type, 2 for the space and leading quote, 1 for the trailing quote)
math(EXPR VERSION_NUM_LEN "${VERSION_LEN} - 16")
# Extract the type from the string
string(SUBSTRING ${VERSION_STR} 8 5 VERSION_TYPE)
# Extract the actual value from the string
string(SUBSTRING ${VERSION_STR} 15 ${VERSION_NUM_LEN} VERSION)
# Set the version type to the value extract from above
set(VERSION_${VERSION_TYPE} ${VERSION})
endforeach(VERSION_STR ${VERSIONS})
# Set the version variables based on what was found above
set(VERSION_COMMA "${VERSION_MAJOR},${VERSION_MINOR},${VERSION_PATCH},${VERSION_BUILD}")
set(VERSION_DOTTED_NOBUILD "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
set(VERSION_DOTTED "${VERSION_DOTTED_NOBUILD}.${VERSION_BUILD}")
set(VERSION_FULL "${VERSION_DOTTED}${VERSION_EXTRA}")
set(VERSION_FULL_NOBUILD "${VERSION_DOTTED_NOBUILD}${VERSION_EXTRA}")
# Only do the following for Windows
if(WIN32)
# Generate the win32.rc file using the above variables
configure_file(${Anope_SOURCE_DIR}/src/win32.rc.cmake ${Anope_BINARY_DIR}/src/win32.rc)
endif(WIN32)
# Calculate dependencies for each header
# I would've done this inside the CMakeLists.txt for the include directory, but since it's added AFTER everything else, it won't help...
# Firstly, find all the header files
file(GLOB_RECURSE ALL_HEADERS "*.h")
# Iterate through the headers
foreach(HEADER ${ALL_HEADERS})
# Don't process the file if it's in an obsolete directory
if(NOT HEADER MATCHES ".*obsolete.*")
append_to_list(TMP_HEADERS ${HEADER})
# In addition, also set up a variable to store the fullpath of the header, in a variable prefixed with just the header's filename for easy access later
get_filename_component(HEADER_FILENAME ${HEADER} NAME)
set(${HEADER_FILENAME}_FULLPATH ${HEADER})
endif(NOT HEADER MATCHES ".*obsolete.*")
endforeach(HEADER)
# Set the list of headers to be all the non-obsolete ones, then sort the list
set(ALL_HEADERS ${TMP_HEADERS})
if(CMAKE244_OR_BETTER)
list(SORT ALL_HEADERS)
endif(CMAKE244_OR_BETTER)
# This function will take a #include line and extract the filename minus the quotes
macro(extract_include_filename INCLUDE FILENAME)
# Detect if there is any trailing whitespace (basically see if the last character is a space or a tab)
string(LENGTH ${INCLUDE} INCLUDE_LEN)
math(EXPR LAST_CHAR_POS "${INCLUDE_LEN} - 1")
string(SUBSTRING ${INCLUDE} ${LAST_CHAR_POS} 1 LAST_CHAR)
# Only strip if the last character was a space or a tab
if(LAST_CHAR STREQUAL " " OR LAST_CHAR STREQUAL "\t")
# Strip away trailing whitespace from the line
string(REGEX REPLACE "[ \t]*$" "" INCLUDE_STRIPPED ${INCLUDE})
else(LAST_CHAR STREQUAL " " OR LAST_CHAR STREQUAL "\t")
# Just copy INCLUDE to INCLUDE_STRIPPED so the below code doesn't complain about a lack of INCLUDE_STRIPPED
set(INCLUDE_STRIPPED ${INCLUDE})
endif(LAST_CHAR STREQUAL " " OR LAST_CHAR STREQUAL "\t")
# Find the filename including the quotes, it should be at the end of the line after whitespace was stripped
string(REGEX MATCH "\".*\"$" FILE ${INCLUDE_STRIPPED})
# Get the length of the filename with quotes
string(LENGTH ${FILE} FILENAME_LEN)
# Subtract 2 from this length, for the quotes
math(EXPR FILENAME_LEN "${FILENAME_LEN} - 2")
# Overwrite the filename with a version sans quotes
string(SUBSTRING ${FILE} 1 ${FILENAME_LEN} FILE)
# Set the filename to the the given variable
set(${FILENAME} "${FILE}")
endmacro(extract_include_filename)
# Preparse step 1: get filenames sans paths
# Iterate through the headers
foreach(HEADER ${ALL_HEADERS})
# Find all the lines in the current header that have any form of #include on them, regardless of whitespace
read_from_file(${HEADER} "^[ \t]*#[ \t]*include[ \t]*\".*\"[ \t]*$" INCLUDES)
# Get the filename only of the header we just checked
get_filename_component(HEADER_FILENAME ${HEADER} NAME)
# Iterate through the strings containing #include (if any)
foreach(INCLUDE ${INCLUDES})
# Extract the filename from the #include line
extract_include_filename(${INCLUDE} FILENAME)
# Append this filename to the list of headers for the header we are checking
append_to_list(${HEADER_FILENAME}_HEADERS ${FILENAME})
endforeach(INCLUDE)
endforeach(HEADER)
# Preparse step 2: for every header from above that had includes, recursively find the headers each header relies on
# Iterate through the headers (again)
foreach(HEADER ${ALL_HEADERS})
# Get the filename only of the current header
get_filename_component(HEADER_FILENAME ${HEADER} NAME)
# If there were any include, we'll be checking them
if(${HEADER_FILENAME}_HEADERS)
# Set the variables, old for all previously found headers, new for all newly found headers
set(OLD_HEADERS)
set(HEADERS ${${HEADER_FILENAME}_HEADERS})
set(NEW_HEADERS)
# Loop as long as there are still headers to be parsed
while(HEADERS)
# Iterate through the list of the current headers
foreach(CURR_HEADER ${HEADERS})
# If that header has headers it relies on, we'll add them to the list of new headers
if(${CURR_HEADER}_HEADERS)
foreach(CURR_HEADERS_HEADER ${${CURR_HEADER}_HEADERS})
append_to_list(NEW_HEADERS ${CURR_HEADERS_HEADER})
endforeach(CURR_HEADERS_HEADER)
endif(${CURR_HEADER}_HEADERS)
endforeach(CURR_HEADER)
# Append the headers we checked to the old headers
append_to_list(OLD_HEADERS ${HEADERS})
# Set the headers to check to the new headers (it may be empty and that'll exit the loop)
set(HEADERS ${NEW_HEADERS})
# Erase the new headers
set(NEW_HEADERS)
endwhile(HEADERS)
# OLD_HEADERS will now contain all headers that the current header relies on, remove duplicate headers from the list and sort the list
remove_list_duplicates(OLD_HEADERS)
if(CMAKE244_OR_BETTER)
list(SORT OLD_HEADERS)
endif(CMAKE244_OR_BETTER)
# Set the current header's list of headers to the cleaned up list from above
set(${HEADER_FILENAME}_HEADERS ${OLD_HEADERS})
endif(${HEADER_FILENAME}_HEADERS)
endforeach(HEADER)
# The following headers are generated from CMake rules and won't be found with the above
append_to_list(ALL_HEADERS ${Anope_BINARY_DIR}/lang/language.h ${Anope_BINARY_DIR}/include/sysconf.h ${Anope_BINARY_DIR}/include/version.h)
set(language.h_FULLPATH ${Anope_BINARY_DIR}/lang/language.h)
set(sysconf.h_FULLPATH ${Anope_BINARY_DIR}/include/sysconf.h)
set(version.h_FULLPATH ${Anope_BINARY_DIR}/include/version.h)
# This function is used in most of the src (sub)directories to calculate the header file dependencies for the given source file
macro(calculate_depends SRC)
# Find all the lines in the given source file that have any form of #include on them, regardless of whitespace
read_from_file(${SRC} "^[ \t]*#[ \t]*include[ \t]*\".*\"[ \t]*$" INCLUDES)
# Reset the list of headers to empty
set(HEADERS)
# Iterate through the strings containing #include (if any)
foreach(INCLUDE ${INCLUDES})
# Extract the filename from the #include line
extract_include_filename(${INCLUDE} FILENAME)
# Append the filename to the list of headers
append_to_list(HEADERS ${FILENAME})
endforeach(INCLUDE)
# Set the list of new headers to empty (this will store all the headers that the above list depends on)
set(NEW_HEADERS)
# Iterate through the list of headers
foreach(HEADER ${HEADERS})
# If the current header has it's own headers to depend on, append those to the list of new headers
if(${HEADER}_HEADERS)
append_to_list(NEW_HEADERS ${${HEADER}_HEADERS})
endif(${HEADER}_HEADERS)
endforeach(HEADER)
# If there were new headers, append them to the list of headers
if(NEW_HEADERS)
append_to_list(HEADERS ${NEW_HEADERS})
endif(NEW_HEADERS)
# If after all the above there is a list of header, we'll process them, converting them to full paths
if(HEADERS)
# Remove duplicate headers from the list and sort the list
remove_list_duplicates(HEADERS)
if(CMAKE244_OR_BETTER)
list(SORT HEADERS)
endif(CMAKE244_OR_BETTER)
# Set the list of full path headers to empty
set(HEADERS_FULL)
# Iterate through the list of headers
foreach(HEADER ${HEADERS})
# Append the full path of the header to the full path headers list
append_to_list(HEADERS_FULL ${${HEADER}_FULLPATH})
endforeach(HEADER)
# Set the given source file to depend on the headers given
set_source_files_properties(${SRC} PROPERTIES OBJECT_DEPENDS "${HEADERS_FULL}")
endif(HEADERS)
endmacro(calculate_depends)
# A macro to update the environment variable CPACK_IGNORED_FILES which contains a list of files for CPack to ignore
macro(add_to_cpack_ignored_files ITEM)
# Temporary copy of the orignal item
set(REAL_ITEM "${ITEM}")
# If we have 2+ arguments, assume that the second one was something like TRUE (doesn't matter really) and convert periods so they will be \\. for CPack
if(${ARGC} GREATER 1)
string(REPLACE "." "\\\\." REAL_ITEM ${REAL_ITEM})
endif(${ARGC} GREATER 1)
# If the environment variable is already defined, just tack the item to the end
if(DEFINED ENV{CPACK_IGNORED_FILES})
set(ENV{CPACK_IGNORED_FILES} "$ENV{CPACK_IGNORED_FILES};${REAL_ITEM}")
# Otherwise set the environment variable to the item
else(DEFINED ENV{CPACK_IGNORED_FILES})
set(ENV{CPACK_IGNORED_FILES} "${REAL_ITEM}")
endif(DEFINED ENV{CPACK_IGNORED_FILES})
endmacro(add_to_cpack_ignored_files)
# Add the initial files to ignore which will be ignored regardless of if you are building in-source or out-of-source
add_to_cpack_ignored_files(".git\;config.cache\;.svn\;CMakeFiles\;sysconf.h$\;Makefile.inc$\;config.log\;config.status" TRUE)
# Add the files we don't want the periods converted for
add_to_cpack_ignored_files(".\\\\\\\\.so$;.\\\\\\\\.o$;.\\\\\\\\.s$;${Anope_SOURCE_DIR}/Makefile$")
# If the two directories are the same, we are building in-source, thus we need to ignore more files from the build
if(${Anope_SOURCE_DIR} STREQUAL ${Anope_BINARY_DIR})
# Add the files that need their periods converted
add_to_cpack_ignored_files("Makefile\;cmake_install.cmake\;sysconf.h$\;CMakeCache.txt\;install_manifest.txt" TRUE)
# Add the files we don't want the periods converted for
add_to_cpack_ignored_files(".\\\\\\\\.so$;CPack.;anope-${VERSION_FULL_NOBUILD}-source\\\\\\\\..")
# If using Visual Studio, add these files as well
if(MSVC)
add_to_cpack_ignored_files(".vcproj$\;.sln$\;.ncb$\;.suo$\;.dir$\;.ilk$\;.exp$\;.pdb$\;.lib$\;/debug$;/release$;/relwithdebinfo$;/minsizerel$" TRUE)
endif(MSVC)
endif(${Anope_SOURCE_DIR} STREQUAL ${Anope_BINARY_DIR})
# Go into the following directories and run their CMakeLists.txt as well
add_subdirectory(data)
add_subdirectory(docs)
add_subdirectory(lang)
add_subdirectory(src)
add_subdirectory(include)
# Get the filename of the Anope binary, to use later
get_target_property(SERVICES_BINARY ${PROGRAM_NAME} LOCATION)
get_filename_component(SERVICES_BINARY ${SERVICES_BINARY} NAME)
# At install time, create the following additional directories
install(CODE "file(MAKE_DIRECTORY \"\${CMAKE_INSTALL_PREFIX}/data/backups\")")
install(CODE "file(MAKE_DIRECTORY \"\${CMAKE_INSTALL_PREFIX}/data/logs\")")
install(CODE "file(MAKE_DIRECTORY \"\${CMAKE_INSTALL_PREFIX}/data/modules/runtime\")")
# On non-Windows platforms, if RUNGROUP is set, change the permissions of the below directories, as well as the group of the data directory
if(NOT WIN32 AND RUNGROUP)
install(CODE "execute_process(COMMAND ${CHMOD} 2775 \"\${CMAKE_INSTALL_PREFIX}/data/backups\")")
install(CODE "execute_process(COMMAND ${CHMOD} 2775 \"\${CMAKE_INSTALL_PREFIX}/data/logs\")")
install(CODE "execute_process(COMMAND ${CHMOD} 2775 \"\${CMAKE_INSTALL_PREFIX}/data/modules/runtime\")")
install(CODE "execute_process(COMMAND ${CHGRP} -R ${RUNGROUP} \"\${CMAKE_INSTALL_PREFIX}\")")
endif(NOT WIN32 AND RUNGROUP)
# On Windows platforms, install extra files
if(WIN32)
install(FILES ${Anope_SOURCE_DIR}/anope.bat
DESTINATION bin
)
install(FILES ${Anope_SOURCE_DIR}/Changes ${Anope_SOURCE_DIR}/Changes.conf ${Anope_SOURCE_DIR}/Changes.lang
DESTINATION .
)
endif(WIN32)
# Only process the CPack section if we have CPack
if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
# Override the module include path to include our directory, as we are using our own version of the NSIS template
set(CMAKE_MODULE_PATH ${Anope_SOURCE_DIR})
# Various options for CPack
set(CPACK_PACKAGE_NAME "Anope IRC Services")
set(CPACK_PACKAGE_VENDOR "Anope Team")
set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH "${VERSION_PATCH}${VERSION_EXTRA}")
set(CPACK_PACKAGE_FILE_NAME "anope-${VERSION_FULL_NOBUILD}")
set(CPACK_RESOURCE_FILE_LICENSE "${Anope_SOURCE_DIR}/docs/COPYING")
# The following doesn't actually do anything. :(
#set(CPACK_RESOURCE_FILE_README "${Anope_SOURCE_DIR}/docs/README")
# The following is primarily for NSIS
if(WIN32)
# Also for Windows, include installing the MSVCRT library
include(InstallRequiredSystemLibraries)
set(CPACK_GENERATOR "NSIS")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "Anope")
set(CPACK_PACKAGE_EXECUTABLES "")
set(CPACK_NSIS_MENU_LINKS
"bin\\\\${SERVICES_BINARY}" "Anope IRC Services"
"bin\\\\anope.bat\\\" \\\"-debug -nofork" "Anope IRC Services (Debug and Window Logging)"
"bin\\\\anope.bat\\\" \\\"-nofork" "Anope IRC Services (Window Logging)"
"bin\\\\anope.bat\\\" \\\"-nothird" "Anope IRC Services (No Third Party Modules)"
"http://www.anope.org" "Anope Web Site"
)
# The following doesn't work, but a bug report has been filed about it
#set(CPACK_CREATE_DESKTOP_LINK_${SERVICES_BINARY} TRUE)
set(CPACK_NSIS_MUI_ICON "${Anope_SOURCE_DIR}/src\\\\anope-icon.ico")
set(CPACK_NSIS_MUI_UNIICON "${Anope_SOURCE_DIR}/src\\\\anope-icon.ico")
set(CPACK_NSIS_INSTALLED_ICON_NAME "${SERVICES_BINARY}")
set(CPACK_NSIS_URL_INFO_ABOUT "http://www.anope.org")
set(CPACK_NSIS_COMPRESSOR "/SOLID lzma")
endif(WIN32)
set(CPACK_SOURCE_PACKAGE_FILE_NAME "anope-${VERSION_FULL_NOBUILD}-source")
set(CPACK_SOURCE_IGNORE_FILES "$ENV{CPACK_IGNORED_FILES}")
set(CPACK_MONOLITHIC_INSTALL TRUE)
include(CPack)
endif(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
-170
View File
@@ -1,170 +0,0 @@
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.
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 */
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.
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>}
}
Separation
Always put a space in between a keyword like if/while and the condition, for example:
if (foo == bar)
NOT
if(foo == bar)
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;
}
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.)
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".
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.
Use of STL
For more information on use of STL in InspIRCd, please see the separate STL FAQ.
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.
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.
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.
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.
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.
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.
+1280 -9
View File
File diff suppressed because it is too large Load Diff
+60
View File
@@ -1,3 +1,63 @@
Anope Version 1.8 SVN
---------------------
Anope Version 1.8.2
-------------------
** ADDED CONFIGURATION DIRECTIVES **
** MODIFIED CONFIGURATION DIRECTIVES **
** DELETED CONFIGURATION DIRECTIVES **
Anope Version 1.8.1
-------------------
** ADDED CONFIGURATION DIRECTIVES **
** MODIFIED CONFIGURATION DIRECTIVES **
# IRCDModule <module_name> [REQUIRED]
# The ircd protocol module should be used when connecting anope to your
# chosen IRCD. This should be one of the following options, or a file
# provided by your IRCD author.
#
# Bahamut 1.4.27 [or later] - "bahamut"
# Charybdis 1.0 [or later] - "charybdis"
# DreamForge 4.6.7 - "dreamforge"
# Hybrid IRCd 7.0 [experimental] - "hybrid"
# InspIRCd 1.1 [beta 8 or later] - "inspircd11"
# Plexus 3.0 [or later] - "plexus3"
# Plexus 2.0 [or later] - "plexus2"
# PTLink 6.15.0 [experimental] - "ptlink"
# RageIRCd 2.0.x - "rageircd"
# Ratbox 2.0.6 [or later] - "ratbox"
# ShadowIRCD 4.0x [beta 7 or later] - "shadowircd"
# Solid IRCD 3.4.x [3.4.6 or later] - "solidircd"
# UltimateIRCd 3.0.0 [or later] - "ultimate3"
# UltimateIRCd 2.8.2 [or later] - "ultimate2"
# Unreal 3.2 [beta-19 or later] - "unreal32"
# Unreal 3.1.1 [or later] - "unreal31"
# ViagraIRCd 1.3.x [or later] - "viagra"
#
#IRCDModule "unreal32"
# SuperAdmin [OPTIONAL]
# When enabled, Services Roots will be able to use SuperAdmin [ON|OFF]
# which will temporarily grant them extra privileges, such as being a
# founder of _all_ channels, ability to adjust another users modes etc..
#SuperAdmin
# UnRestrictSAdmin [OPTIONAL]
# On many ircd Anope removes the umode of +a from users whom are not
# Service Admin in Anope. This mode is NOT used by Anope for any form
# of access. Thus this option allows them to keep the mode without having
# to be a Service Admin in Anope
#UnRestrictSAdmin
** DELETED CONFIGURATION DIRECTIVES **
Anope Version 1.8.0
-------------------
** ADDED CONFIGURATION DIRECTIVES **
+19
View File
@@ -1,3 +1,22 @@
Anope Version 1.8 SVN
---------------------
Anope Version 1.8.2
-------------------
*** New Strings:
*** Mod Strings:
*** Del Strings:
Anope Version 1.8.1
-------------------
*** New Strings:
HOST_OFF
*** Mod Strings:
*** Del Strings:
Anope Version 1.8.0
-------------------
*** New Strings:
+12 -1
View File
@@ -1,7 +1,18 @@
Anope Version 1.8.0
Anope Version 1.8 SVN
---------------------
Anope Version 1.8.2
-------------------
- NONE
Anope Version 1.8.1
-------------------
- NONE
Anope Version 1.8.0
-------------------
ALTER TABLE `anope_ns_access` DROP INDEX display;
Anope Version 1.7.24
--------------------
- NONE
+176 -252
View File
@@ -2,7 +2,7 @@
#
# Configuration script for Services.
#
# Anope (c) 2003-2008 Anope team
# Anope (c) 2003-2007 Anope team
# Contact us at team@anope.org
#
# This program is free but copyrighted software; see the file COPYING for
@@ -14,133 +14,73 @@
###########################################################################
echo2 () {
$ECHO2 "$*$ECHO2SUF" # these are defined later
$ECHO2 "$*$ECHO2SUF" # these are defined later
}
exists () { # because some shells don't have test -e
if [ -f $1 -o -d $1 -o -p $1 -o -c $1 -o -b $1 ] ; then
return 0
else
return 1
fi
exists () { # because some shells don't have test -e
if [ -f $1 -o -d $1 -o -p $1 -o -c $1 -o -b $1 ] ; then
return 0
else
return 1
fi
}
Load_Cache () {
if [ -f $SOURCE_DIR/config.cache -a -r $SOURCE_DIR/config.cache -a ! "$IGNORE_CACHE" ] ; then
echo "Using defaults from config.cache. To ignore, $SOURCE_DIR/Config -nocache"
echo ""
. $SOURCE_DIR/config.cache
CAN_QUICK="yes"
else
CAN_QUICK="no"
fi
if [ -f config.cache -a -r config.cache -a ! "$IGNORE_CACHE" ] ; then
echo "Using defaults from config.cache. To ignore, ./Config -nocache"
echo ""
. config.cache
CAN_QUICK="yes"
else
CAN_QUICK="no"
fi
}
Run_Build_System () {
WITH_INST=""
WITH_RUN=""
WITH_PERM=""
BUILD_TYPE=""
RUN_CC_PL=""
GEN_TYPE=""
Run_Configure () {
WITH_BIN=""
WITH_DATA=""
WITH_ENC=""
WITH_RUN=""
WITH_PERM=""
WITH_MYSQL=""
if [ "$INSTDIR" != "" ] ; then
if [ "$BUILD_SYSTEM" = "cmake" ] ; then
WITH_INST="-DINSTDIR:STRING=$INSTDIR"
else
WITH_INST="--with-instdir=$INSTDIR"
fi
fi
if [ "$BINDEST" != "" ] ; then
WITH_BIN=" --with-bindir=$BINDEST"
WITH_DATA=" --with-datadir=$DATDEST"
fi
if [ "$RUNGROUP" != "" ] ; then
if [ "$BUILD_SYSTEM" = "cmake" ] ; then
WITH_RUN="-DRUNGROUP:STRING=$RUNGROUP"
else
WITH_RUN="--with-rungroup=$RUNGROUP"
fi
fi
if [ "$DATDEST" != "" ] ; then
WITH_DATA=" --with-datadir=$DATDEST"
fi
if [ "$UMASK" != "" ] ; then
if [ "$BUILD_SYSTEM" = "cmake" ] ; then
WITH_PERM="-DDEFUMASK:STRING=$UMASK"
else
WITH_PERM="--with-permissions=$UMASK"
fi
fi
if [ "$RUNGROUP" != "" ] ; then
WITH_RUN=" --with-rungroup=$RUNGROUP"
fi
if [ "$DEBUG" = "yes" ] ; then
if [ "$BUILD_SYSTEM" = "cmake" ] ; then
BUILD_TYPE="-DCMAKE_BUILD_TYPE:STRING=DEBUG"
else
BUILD_TYPE="--with-debugsym"
fi
else
if [ "$BUILD_SYSTEM" = "cmake" ] ; then
BUILD_TYPE="-DCMAKE_BUILD_TYPE:STRING=RELEASE"
fi
fi
if [ "$UMASK" != "" ] ; then
WITH_PERM=" --with-permissions=$UMASK"
fi
if [ "$USE_RUN_CC_PL" = "yes" ] ; then
if [ "$BUILD_SYSTEM" = "cmake" ] ; then
RUN_CC_PL="-DUSE_RUN_CC_PL:BOOLEAN=ON"
else
pwdsave=`pwd`
cd "`dirname $SOURCE_DIR/run-cc.pl`"
RUN_CC_PL="--with-makebin=`pwd`/run-cc.pl"
cd "$pwdsave"
fi
else
if [ "$BUILD_SYSTEM" = "cmake" ] ; then
RUN_CC_PL="-DUSE_RUN_CC_PL:BOOLEAN=OFF"
else
RUN_CC_PL="--with-makebin="
fi
fi
if [ "$MYSQL" != "yes" ] ; then
WITH_MYSQL=" --without-mysql"
fi
if [ "$BUILD_SYSTEM" = "cmake" ] ; then
case `uname -s` in
MINGW*)
GEN_TYPE="-G\"MSYS Makefiles\""
;;
esac
if [ "$SOURCE_DIR" = "." ] ; then
pwdsave=`pwd`
test -d build || mkdir build
cd "build"
REAL_SOURCE_DIR=".."
else
REAL_SOURCE_DIR="$SOURCE_DIR"
fi
echo "./configure $WITH_BIN $WITH_DATA $WITH_ENC $WITH_RUN $WITH_PERM $WITH_MYSQL"
echo "cmake $GEN_TYPE $WITH_INST $WITH_RUN $WITH_PERM $BUILD_TYPE $RUN_CC_PL $REAL_SOURCE_DIR"
cmake $GEN_TYPE $WITH_INST $WITH_RUN $WITH_PERM $BUILD_TYPE $RUN_CC_PL $REAL_SOURCE_DIR
echo ""
if [ "$SOURCE_DIR" = "." ] ; then
echo "Now cd build, then run make to build Anope."
cd "$pwdsave"
else
echo "Now run make to build Anope."
fi
else
echo "./configure $WITH_INST $WITH_RUN $WITH_PERM $BUILD_TYPE $RUN_CC_PL"
./configure $WITH_INST $WITH_RUN $WITH_PERM $BUILD_TYPE $RUN_CC_PL
fi
./configure $WITH_BIN $WITH_DATA $WITH_ENC $WITH_RUN $WITH_PERM $WITH_MYSQL
}
ECHO2SUF=''
if [ "`echo -n a ; echo -n b`" = "ab" ] ; then
ECHO2='echo -n'
elif [ "`echo 'a\c' ; echo 'b\c'`" = "ab" ] ; then
ECHO2='echo' ; ECHO2SUF='\c'
ECHO2='echo' ; ECHO2SUF='\c'
elif [ "`printf 'a' 2>&1 ; printf 'b' 2>&1`" = "ab" ] ; then
ECHO2='printf "%s"'
ECHO2='printf "%s"'
else
# oh well...
ECHO2='echo'
# oh well...
ECHO2='echo'
fi
export ECHO2 ECHO2SUF
@@ -148,62 +88,50 @@ export ECHO2 ECHO2SUF
# Init values
###########################################################################
BUILD_SYSTEM="cmake"
INSTDIR=$HOME/services
BINDEST=$HOME/services
DATDEST=$HOME/services
RUNGROUP=
UMASK=
DEBUG="yes"
USE_RUN_CC_PL="no"
IRCTYPE="no default"
CAN_QUICK="no"
SOURCE_DIR=`dirname $0`
###########################################################################
# Check out the options
###########################################################################
while [ $# -ge 1 ] ; do
if [ $1 = "--help" ] ; then
echo "Config utility for Anope"
echo "------------------------"
echo "Syntax: ./Config [options]"
echo "-nocache Ignore settings saved in config.cache"
echo "-nointro Skip intro (disclaimer, etc)"
echo "-quick Skip questions, go straight to cmake"
exit 0
elif [ $1 = "-nocache" ] ; then
IGNORE_CACHE="1"
elif [ $1 = "-nointro" ] ; then
NO_INTRO="1"
elif [ $1 = "-quick" -o $1 = "-q" ] ; then
Load_Cache
if [ "$CAN_QUICK" = "yes" ] ; then
Run_Build_System
else
echo ""
echo "Can't find cache file (config.cache), aborting..."
fi
exit 0
fi
shift 1
if [ $1 = "--help" ] ; then
echo "Config utility for Anope"
echo "------------------------"
echo "Syntax: ./Config [options]"
echo "-nocache Ignore settings saved in config.cache"
echo "-nointro Skip intro (disclaimer, etc)"
echo "-quick Skip questions, go straight to configure"
exit 0
elif [ $1 = "-nocache" ] ; then
IGNORE_CACHE="1"
elif [ $1 = "-nointro" ] ; then
NO_INTRO="1"
elif [ $1 = "-quick" -o $1 = "-q" ] ; then
Load_Cache
if [ $CAN_QUICK = "yes" ] ; then
Run_Configure
else
echo ""
echo "Can't find cache file (config.cache), aborting..."
fi
exit 0
fi
shift 1
done
###########################################################################
if [ ! "$NO_INTRO" ] ; then
case `uname -s` in
MINGW*)
PAGER=less
;;
*)
PAGER=more
clear
;;
esac
. $SOURCE_DIR/version.log
cat $SOURCE_DIR/.BANNER | sed "s/CURVER/$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH$VERSION_EXTRA/" | sed "s@SOURCE_DIR@$SOURCE_DIR@" | $PAGER
echo ""
clear
. ./version.log
cat .BANNER | sed "s/CURVER/$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH$VERSION_EXTRA/" | more
echo ""
else
echo ""
echo ""
fi
echo "Beginning Services configuration."
@@ -212,9 +140,8 @@ echo ""
###########################################################################
# Load the cache
###########################################################################
if [ ! "$IGNORE_CACHE" ] ; then
Load_Cache
Load_Cache
fi
# Ask the user anything we need to know ahead of time.
@@ -225,36 +152,12 @@ export ok INPUT
ok=0
echo "Note: press Return for the default, or enter a new value."
echo "Are you using configure or cmake?"
while [ $ok -eq 0 ] ; do
echo2 "[$BUILD_SYSTEM] "
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
if [ ! "$INPUT" ] ; then
INPUT=$BUILD_SYSTEM
fi
case $INPUT in
cmake)
ok=1
;;
configure)
ok=1
;;
*)
echo "That is not a valid choice!"
ok=0
;;
esac
done
BUILD_SYSTEM=$INPUT
echo ""
ok=0
echo "In what directory do you want the binaries to be installed?"
while [ $ok -eq 0 ] ; do
echo2 "[$INSTDIR] "
echo2 "[$BINDEST] "
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
if [ ! "$INPUT" ] ; then
INPUT=$INSTDIR
INPUT=$BINDEST
fi
if [ ! -d "$INPUT" ] ; then
if exists "$INPUT" ; then
@@ -275,127 +178,148 @@ while [ $ok -eq 0 ] ; do
ok=1
fi
done
INSTDIR=$INPUT
BINDEST=$INPUT
DATDEST=$INPUT
echo ""
####
ok=0
echo "Where do you want the data files to be installed?"
while [ $ok -eq 0 ] ; do
echo2 "[$DATDEST] "
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
if [ ! "$INPUT" ] ; then
INPUT=$DATDEST
fi
if [ ! -d "$INPUT" ] ; then
if exists "$INPUT" ; then
echo "$INPUT exists, but is not a directory!"
else
echo "$INPUT does not exist. Create it?"
echo2 "[y] "
read YN
if [ "$YN" != "n" ] ; then
if mkdir -p $INPUT ; then
ok=1
fi
fi
fi
elif exists "$INPUT/include/services.h" ; then
echo "You cannot use the Services source directory as a target directory."
else
ok=1
fi
done
DATDEST=$INPUT
echo ""
####
OLD_RUNGROUP="$RUNGROUP"
if [ "$RUNGROUP" ] ; then
echo "Which group should all Services data files be owned by? (If Services"
echo "should not force files to be owned by a particular group, type \"none\""
echo "(without the quotes) and press Return.)"
echo "Which group should all Services data files be owned by? (If Services"
echo "should not force files to be owned by a particular group, type "\"none\"
echo "(without the quotes) and press Return.)"
else
echo "Which group should all Services data files be owned by? (If Services"
echo "should not force files to be owned by a particular group, just press"
echo "Return.)"
echo "Which group should all Services data files be owned by? (If Services"
echo "should not force files to be owned by a particular group, just press"
echo "Return.)"
fi
echo2 "[$RUNGROUP] "
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
if [ "$INPUT" ] ; then
if [ "$INPUT" = "none" ] ; then
RUNGROUP=""
else
RUNGROUP="$INPUT"
fi
if [ "$INPUT" = "none" ] ; then
RUNGROUP=""
else
RUNGROUP="$INPUT"
fi
fi
echo ""
####
if [ ! "$UMASK" -o "$RUNGROUP" != "$OLD_RUNGROUP" ] ; then
if [ "$RUNGROUP" ] ; then
UMASK=007
else
UMASK=077
fi
if [ "$RUNGROUP" ] ; then
UMASK=007
else
UMASK=077
fi
fi
ok=0
echo "What should the default umask for data files be (in octal)?"
echo "(077 = only accessible by owner; 007 = accessible by owner and group)"
while [ $ok -eq 0 ] ; do
echo2 "[$UMASK] "
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
if [ ! "$INPUT" ] ; then
INPUT=$UMASK
fi
if [ `echo "$INPUT" | grep -c '[^0-7]'` -gt 0 ] ; then
echo "$UMASK is not a valid octal number!"
else
if [ "`echo $INPUT | cut -c1`" != "0" ] ; then
INPUT=0$INPUT
fi
ok=1
fi
echo2 "[$UMASK] "
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
if [ ! "$INPUT" ] ; then
INPUT=$UMASK
fi
if [ `echo "$INPUT" | grep -c '[^0-7]'` -gt 0 ] ; then
echo "$UMASK is not a valid octal number!"
else
if [ "`echo $INPUT | cut -c1`" != "0" ] ; then
INPUT=0$INPUT
fi
ok=1
fi
done
UMASK=$INPUT
echo ""
####
TEMP_YN="n"
if [ "$DEBUG" = "yes" ] ; then
TEMP_YN="y"
fi
echo "Would you like to build a debug version of Anope?"
echo2 "[$TEMP_YN] "
read YN
if [ "$YN" ] ; then
if [ "$YN" = "y" ] ; then
DEBUG="yes"
else
DEBUG="no"
fi
fi
ok=0
DEF=yes
echo "Allow anope to automatically check for mysql libaries?"
echo "unless you get errors with make, there is no need to"
echo "change this setting."
while [ $ok -eq 0 ] ; do
echo2 "[$DEF] "
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
if [ ! "$INPUT" ] ; then
INPUT=$DEF
fi
case $INPUT in
n*|N*)
MYSQL=
ok=1
;;
y*|Y*)
MYSQL="yes"
ok=1
;;
*)
echo "Please enter 'yes' or 'no'."
;;
esac
done
echo ""
####
TEMP_YN="n"
if [ "$USE_RUN_CC_PL" = "yes" ] ; then
TEMP_YN="y"
fi
echo "You can optionally have the build run through run-cc.pl, which will"
echo "cause warnings and errors (if any) to be colored yellow and run,"
echo "respectively. This relies on Perl being installed, so if you say yes"
echo "to this without Perl, the option will be ignored."
echo "NOTE: If you are using MinGW, it is NOT recommended to say yes to"
echo "this, it may fail."
echo "Would you like to utilize run-cc.pl?"
echo2 "[$TEMP_YN] "
read YN
if [ "$YN" ] ; then
if [ "$YN" = "y" ] ; then
USE_RUN_CC_PL="yes"
else
USE_RUN_CC_PL="no"
fi
fi
echo ""
####
################################################################################
# Store values
################################################################################
echo2 "Saving configuration results in config.cache... "
cat <<EOT >$SOURCE_DIR/config.cache
BUILD_SYSTEM="$BUILD_SYSTEM"
INSTDIR="$INSTDIR"
cat <<EOT >config.cache
BINDEST="$BINDEST"
DATDEST="$DATDEST"
RUNGROUP="$RUNGROUP"
UMASK=$UMASK
DEBUG="$DEBUG"
USE_RUN_CC_PL="$USE_RUN_CC_PL"
IRCTYPE="$IRCTYPE"
IRCTYPE_DEF="$IRCTYPE_DEF"
MYSQL="$MYSQL"
EOT
echo "done."
################################################################################
# Build the build system string
# Build the configure string
################################################################################
Run_Build_System
Run_Configure
+2 -2
View File
@@ -1,3 +1,3 @@
@echo off
cscript /nologo "%~dp0\install.js"
pause
cscript /nologo install.js
+69 -40
View File
@@ -1,102 +1,131 @@
CC=g++ # probably wrong but oh well.
CC=@CC@
INCLUDEDIR=../include
ANOPELIBS=@ANOPELIBS@
CFLAGS=@CFLAGS@ -Wall -ansi -pedantic -Wshadow
CFLAGS=@CFLAGS@
STRICT=-Wall -ansi -pedantic
PROFILE=-pg
LDPROFILE=
SHELL=/bin/sh
INSTDIR=@INSTDIR@
MAKEBIN=@MAKEBIN@
SUBDIRS=src
BINDEST=@BINDEST@
DATDEST=@DATDEST@
INSTALL=@INSTALL@
RM=@RM@
CP=@CP@
TOUCH=@TOUCH@
MODULE_PATH=@MODULE_PATH@
MYSQL=@MYSQL@
RDB=@RDB@
LDFLAGS=@LDFLAGS@
RUNGROUP=@RUNGROUP@
SHARED=@SHARED@
MODULEFLAGS=@MODULEFLAGS@
all: language headers build core protocols tools modules
all: language headers build core protocols tools modules
strict: language headers strict_build strict_core strict_protocols strict_tools strict_modules
profile: language headers profile_build profile_core profile_protocols profile_tools profile_modules
MAKEARGS = 'CFLAGS=${CFLAGS}' 'CC=${CC}' 'ANOPELIBS=${ANOPELIBS}' \
'LDFLAGS=${LDFLAGS}' 'INSTDIR=${INSTDIR}' 'INSTALL=${INSTALL}' \
'LDFLAGS=${LDFLAGS}' 'BINDEST=${BINDEST}' 'INSTALL=${INSTALL}' \
'INCLUDEDIR=${INCLUDEDIR}' 'RM=${RM}' 'CP=${CP}' \
'TOUCH=${TOUCH}' 'SHELL=${SHELL}' \
'RUNGROUP=${RUNGROUP}' \
'SHARED=${SHARED}' 'MODULEFLAGS=${MODULEFLAGS}' \
'MAKEBIN=${MAKEBIN}'
'TOUCH=${TOUCH}' 'SHELL=${SHELL}' 'DATDEST=${DATDEST}' \
'RUNGROUP=${RUNGROUP}' 'MODULE_PATH=${MODULE_PATH}' 'RDB=${RDB}'\
'MYSQL=${MYSQL}' 'SHARED=${SHARED}' 'MODULEFLAGS=${MODULEFLAGS}'
build: language headers
@${MAKE} -C src ${MAKEARGS} all
@for i in $(SUBDIRS); do \
echo "*** Building $$i";\
( cd $$i; ${MAKE} ${MAKEARGS} all; ) \
done
strict_build:
@for i in $(SUBDIRS); do \
echo "*** Strict Building $$i";\
( cd $$i; ${MAKE} ${MAKEARGS} 'CFLAGS=${CFLAGS} $(STRICT)' all; ) \
done
profile_build:
@${MAKE} -C src ${MAKEARGS} 'CFLAGS=${CFLAGS} $(PROFILE)' 'LDFLAGS=${LDFLAGS} ${PROFILE}' all
@for i in $(SUBDIRS); do \
echo "*** Strict Building $$i";\
( cd $$i; ${MAKE} ${MAKEARGS} 'CFLAGS=${CFLAGS} $(PROFILE)' 'LDFLAGS=${LDFLAGS} ${PROFILE}' all; ) \
done
modules: build
@src/modules/configure src/modules
@${MAKE} -C src/modules ${MAKEARGS} all
(cd src/modules ; ./configure ; ${MAKE} ${MAKEARGS} all; )
@echo "*** All done, now (g)make install to install Anope/Modules";
clean_modules:
@${MAKE} -C src ${MAKEARGS} clean_modules
(cd src ; ${MAKE} ${MAKEARGS} clean_modules )
distclean_modules:
@${MAKE} -C src ${MAKEARGS} distclean_modules
(cd src ; ${MAKE} ${MAKEARGS} distclean_modules )
protocols: build
@echo "*** Building protocol support";
@src/protocol/configure src/protocol
@${MAKE} -C src/protocol ${MAKEARGS} all
(cd src/protocol ; ./configure ; ${MAKE} ${MAKEARGS} all; )
strict_protocols: build
@echo "*** Building protocol support";
(cd src/protocol ; ./configure ; ${MAKE} ${MAKEARGS} 'CFLAGS=${CFLAGS} $(STRICT)' all; )
profile_protocols: build
@echo "*** Building protocol support";
@src/protocol/configure src/protocol
@${MAKE} -C src/protocol ${MAKEARGS} 'CFLAGS=${CFLAGS} ${PROFILE}' 'PROFILE=${PROFILE}' all
(cd src/protocol ; ./configure ; ${MAKE} ${MAKEARGS} 'CFLAGS=${CFLAGS} ${PROFILE}' 'PROFILE=${PROFILE}' all; )
core: build
core: build
@echo "*** Building Core modules";
@${MAKE} -C src ${MAKEARGS} core
(cd src/ ; ${MAKE} ${MAKEARGS} core; )
profile_core: build
strict_core: build
@echo "*** Building Core modules";
@${MAKE} -C src ${MAKEARGS} 'CFLAGS=${CFLAGS} ${PROFILE}' 'PROFILE=${PROFILE}' core
(cd src/ ; ${MAKE} ${MAKEARGS} 'CFLAGS=${CFLAGS} $(STRICT)' core; )
profile_core: build
@echo "*** Building Core modules";
(cd src/ ; ${MAKE} ${MAKEARGS} 'CFLAGS=${CFLAGS} ${PROFILE}' 'PROFILE=${PROFILE}' core; )
tools: build
@${MAKE} -C src/tools ${MAKEARGS} all
(cd src/tools ; ${MAKE} ${MAKEARGS} all; )
@echo "*** All done, now (g)make install to install Anope/Modules/Tools";
strict_tools: strict_build
(cd src/tools ; ${MAKE} ${MAKEARGS} 'CFLAGS=${CFLAGS} $(STRICT)' all; )
@echo "*** All done, now (g)make install to install Anope/Modules/Tools";
profile_tools: profile_build
@${MAKE} -C src/tools ${MAKEARGS} 'CFLAGS=${CFLAGS} $(PROFILE)' all
(cd src/tools ; ${MAKE} ${MAKEARGS} 'CFLAGS=${CFLAGS} $(PROFILE)' all; )
@echo "*** All done, now (g)make install to install Anope/Modules/Tools";
strict_modules: strict_build
(cd src/modules ; ./configure ; ${MAKE} ${MAKEARGS} 'CFLAGS=$(CFLAGS) $(STRICT)' all; )
@echo "*** All done, now (g)make install to install Anope/Modules";
profile_modules: profile_build
@src/modules/configure src/modules
@${MAKE} -C src/modules ${MAKEARGS} 'CFLAGS=${CFLAGS} ${PROFILE}' 'PROFILE=${PROFILE}' all
(cd src/modules ; ./configure ; ${MAKE} ${MAKEARGS} 'CFLAGS=${CFLAGS} ${PROFILE}' 'PROFILE=${PROFILE}' all; )
@echo "*** All done, now (g)make install to install Anope/Modules";
language:
@$(MAKE) -C lang ${MAKEARGS} all language.h
(cd lang ; $(MAKE) ${MAKEARGS} all language.h ; )
headers:
@${MAKE} -C include ${MAKEARGS}
(cd include ; ${MAKE} ${MAKEARGS} )
clean:
${MAKE} -C lang ${MAKEARGS} clean
${MAKE} -C include ${MAKEARGS} clean
${MAKE} -C src ${MAKEARGS} clean
${MAKE} -C src/tools ${MAKEARGS} clean
(cd lang ; ${MAKE} ${MAKEARGS} clean )
(cd include ; ${MAKE} ${MAKEARGS} clean )
(cd src ; ${MAKE} ${MAKEARGS} clean )
(cd src/tools ; ${MAKE} ${MAKEARGS} clean )
distclean: clean
${MAKE} -C lang ${MAKEARGS} distclean
${MAKE} -C include ${MAKEARGS} distclean
${MAKE} -C src ${MAKEARGS} distclean
${MAKE} -C src/tools ${MAKEARGS} distclean
(cd lang ; ${MAKE} distclean )
(cd include ; ${MAKE} distclean )
(cd src ; ${MAKE} distclean )
(cd src/tools ; ${MAKE} distclean )
rm -f config.log config.status config.cache Makefile src/bin/anoperc
install: DUMMY
${MAKE} -C src ${MAKEARGS} install
${MAKE} -C src/tools ${MAKEARGS} install
(cd src ; ${MAKE} ${MAKEARGS} install)
(cd src/tools ; ${MAKE} ${MAKEARGS} install)
@echo "*** All done, Anope is now installed. Please read docs/INSTALL for details on what to do now.";
DUMMY:
+96
View File
@@ -0,0 +1,96 @@
# Makefile for Anope.
#
# (C) 2003-2009 Anope Team
# Contact us at team@anope.org
#
# This program is free but copyrighted software; see the file COPYING for
# details.
#
# Based on the original code of Epona by Lara.
# Based on the original code of Services by Andy Church.
include Makefile.inc.win32
###########################################################################
all: src core protocols languages tools modules install
src: include\version.h include\sysconf.h include\language.h include\sysconf.h
cd src && $(MAKE) && cd ..
install:
-@mkdir $(DATDEST)\backups
-@mkdir $(DATDEST)\logs
-@mkdir $(DATDEST)\languages
cd lang && $(MAKE) install && cd ..
cd src && $(MAKE) install && cd ..
cd src\modules && $(MAKE) install && cd ..
cd src\modules && $(MAKE) subs-install && cd ..
cd src\protocol && $(MAKE) install && cd ..
cd src\core && $(MAKE) install && cd ..
cd src\tools && $(MAKE) install && cd ..
-@echo ---
-@echo Anope has been installed successfully!
-@echo See docs\INSTALL for details on how to configure Anope for use.
-@echo ---
spotless:
cd lang && $(MAKE) spotless && cd ..
cd src && $(MAKE) spotless && cd ..
cd src\modules && $(MAKE) spotless && cd ..\..
cd src\protocol && $(MAKE) spotless && cd ..\..
cd src\core && $(MAKE) spotless && cd ..\..
cd src\tools && $(MAKE) spotless && cd ..\..
-@erase include\language.h include\version.h *.manifest *~ anope.exe version.sh.exe *.obj anopesmtp.exe
-@echo --
-@echo NOTICE:
-@echo You will need to run cscript /nologo install.js again
-@echo --
mypasql:
$(MYPASQL_BUILD)
distclean: spotless
clean: spotless
###########################################################################
languages: FRC
cd lang && $(MAKE) && cd ..
tools: FRC
cd src\tools && $(MAKE) && cd ..\..
core: FRC
cd src\core && $(MAKE) && cd ..\..
protocols: FRC
cd src\protocol && $(MAKE) && cd ..\..
modules: FRC
cd src\modules && $(MAKE) && cd ..\..
###########################################################################
include\sysconf.h:
copy include\sysconf.h.win32 include\sysconf.h
lang\language.h: lang\Makefile lang\index
cd lang && $(MAKE) language.h && cd ..
lang\index:
cd lang && $(MAKE) index && cd ..
include\language.h: lang\language.h
cd lang && copy language.h ..\include\language.h && cd ..
include\version.h: version.sh.exe version.log include\services.h include\pseudo.h include\messages.h
version.sh.exe
move version.h include\version.h
version.sh.exe:
$(CC) $(BASE_CFLAGS) include\version.sh.c /link $(LFLAGS)
FRC:
-825
View File
@@ -1,825 +0,0 @@
; CPack install script designed for a nmake build
;--------------------------------
; You must define these values
!define VERSION "@CPACK_PACKAGE_VERSION@"
!define INST_DIR "@CPACK_TEMPORARY_DIRECTORY@"
;--------------------------------
;Variables
Var MUI_TEMP
Var STARTMENU_FOLDER
Var SV_ALLUSERS
Var START_MENU
Var DO_NOT_ADD_TO_PATH
Var ADD_TO_PATH_ALL_USERS
Var ADD_TO_PATH_CURRENT_USER
Var INSTALL_DESKTOP
;--------------------------------
;Include Modern UI
!include "MUI2.nsh"
;Default installation folder
InstallDir "$PROGRAMFILES\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
;--------------------------------
;General
;Name and file
Name "@CPACK_PACKAGE_NAME@ @CPACK_PACKAGE_VERSION@"
OutFile "@CPACK_TOPLEVEL_DIRECTORY@/@CPACK_OUTPUT_FILE_NAME@"
;Set compression
SetCompressor @CPACK_NSIS_COMPRESSOR@
@CPACK_NSIS_DEFINES@
!include Sections.nsh
;--- Component support macros: ---
; The code for the add/remove functionality is from:
; http://nsis.sourceforge.net/Add/Remove_Functionality
; It has been modified slightly and extended to provide
; inter-component dependencies.
Var AR_SecFlags
Var AR_RegFlags
@CPACK_NSIS_SECTION_SELECTED_VARS@
; Loads the "selected" flag for the section named SecName into the
; variable VarName.
!macro LoadSectionSelectedIntoVar SecName VarName
SectionGetFlags ${${SecName}} $${VarName}
IntOp $${VarName} $${VarName} & ${SF_SELECTED} ;Turn off all other bits
!macroend
; Loads the value of a variable... can we get around this?
!macro LoadVar VarName
IntOp $R0 0 + $${VarName}
!macroend
; Sets the value of a variable
!macro StoreVar VarName IntValue
IntOp $${VarName} 0 + ${IntValue}
!macroend
!macro InitSection SecName
; This macro reads component installed flag from the registry and
;changes checked state of the section on the components page.
;Input: section index constant name specified in Section command.
ClearErrors
;Reading component status from registry
ReadRegDWORD $AR_RegFlags HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@\Components\${SecName}" "Installed"
IfErrors "default_${SecName}"
;Status will stay default if registry value not found
;(component was never installed)
IntOp $AR_RegFlags $AR_RegFlags & ${SF_SELECTED} ;Turn off all other bits
SectionGetFlags ${${SecName}} $AR_SecFlags ;Reading default section flags
IntOp $AR_SecFlags $AR_SecFlags & 0xFFFE ;Turn lowest (enabled) bit off
IntOp $AR_SecFlags $AR_RegFlags | $AR_SecFlags ;Change lowest bit
; Note whether this component was installed before
!insertmacro StoreVar ${SecName}_was_installed $AR_RegFlags
IntOp $R0 $AR_RegFlags & $AR_RegFlags
;Writing modified flags
SectionSetFlags ${${SecName}} $AR_SecFlags
"default_${SecName}:"
!insertmacro LoadSectionSelectedIntoVar ${SecName} ${SecName}_selected
!macroend
!macro FinishSection SecName
; This macro reads section flag set by user and removes the section
;if it is not selected.
;Then it writes component installed flag to registry
;Input: section index constant name specified in Section command.
SectionGetFlags ${${SecName}} $AR_SecFlags ;Reading section flags
;Checking lowest bit:
IntOp $AR_SecFlags $AR_SecFlags & ${SF_SELECTED}
IntCmp $AR_SecFlags 1 "leave_${SecName}"
;Section is not selected:
;Calling Section uninstall macro and writing zero installed flag
!insertmacro "Remove_${${SecName}}"
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@\Components\${SecName}" \
"Installed" 0
Goto "exit_${SecName}"
"leave_${SecName}:"
;Section is selected:
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@\Components\${SecName}" \
"Installed" 1
"exit_${SecName}:"
!macroend
!macro RemoveSection SecName
; This macro is used to call section's Remove_... macro
;from the uninstaller.
;Input: section index constant name specified in Section command.
!insertmacro "Remove_${${SecName}}"
!macroend
; Determine whether the selection of SecName changed
!macro MaybeSelectionChanged SecName
!insertmacro LoadVar ${SecName}_selected
SectionGetFlags ${${SecName}} $R1
IntOp $R1 $R1 & ${SF_SELECTED} ;Turn off all other bits
; See if the status has changed:
IntCmp $R0 $R1 "${SecName}_unchanged"
!insertmacro LoadSectionSelectedIntoVar ${SecName} ${SecName}_selected
IntCmp $R1 ${SF_SELECTED} "${SecName}_was_selected"
!insertmacro "Deselect_required_by_${SecName}"
goto "${SecName}_unchanged"
"${SecName}_was_selected:"
!insertmacro "Select_${SecName}_depends"
"${SecName}_unchanged:"
!macroend
;--- End of Add/Remove macros ---
;--------------------------------
;Interface Settings
!define MUI_ABORTWARNING
;----------------------------------------
; based upon a script of "Written by KiCHiK 2003-01-18 05:57:02"
;----------------------------------------
!verbose 3
!include "WinMessages.NSH"
!verbose 4
;====================================================
; get_NT_environment
; Returns: the selected environment
; Output : head of the stack
;====================================================
!macro select_NT_profile UN
Function ${UN}select_NT_profile
StrCmp $ADD_TO_PATH_ALL_USERS "1" 0 environment_single
DetailPrint "Selected environment for all users"
Push "all"
Return
environment_single:
DetailPrint "Selected environment for current user only."
Push "current"
Return
FunctionEnd
!macroend
!insertmacro select_NT_profile ""
!insertmacro select_NT_profile "un."
;----------------------------------------------------
!define NT_current_env 'HKCU "Environment"'
!define NT_all_env 'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"'
!ifndef WriteEnvStr_RegKey
!ifdef ALL_USERS
!define WriteEnvStr_RegKey \
'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"'
!else
!define WriteEnvStr_RegKey 'HKCU "Environment"'
!endif
!endif
; AddToPath - Adds the given dir to the search path.
; Input - head of the stack
; Note - Win9x systems requires reboot
Function AddToPath
Exch $0
Push $1
Push $2
Push $3
# don't add if the path doesn't exist
IfFileExists "$0\*.*" "" AddToPath_done
ReadEnvStr $1 PATH
Push "$1;"
Push "$0;"
Call StrStr
Pop $2
StrCmp $2 "" "" AddToPath_done
Push "$1;"
Push "$0\;"
Call StrStr
Pop $2
StrCmp $2 "" "" AddToPath_done
GetFullPathName /SHORT $3 $0
Push "$1;"
Push "$3;"
Call StrStr
Pop $2
StrCmp $2 "" "" AddToPath_done
Push "$1;"
Push "$3\;"
Call StrStr
Pop $2
StrCmp $2 "" "" AddToPath_done
Call IsNT
Pop $1
StrCmp $1 1 AddToPath_NT
; Not on NT
StrCpy $1 $WINDIR 2
FileOpen $1 "$1\autoexec.bat" a
FileSeek $1 -1 END
FileReadByte $1 $2
IntCmp $2 26 0 +2 +2 # DOS EOF
FileSeek $1 -1 END # write over EOF
FileWrite $1 "$\r$\nSET PATH=%PATH%;$3$\r$\n"
FileClose $1
SetRebootFlag true
Goto AddToPath_done
AddToPath_NT:
ReadRegStr $1 ${WriteEnvStr_RegKey} "PATH"
StrCmp $1 "" AddToPath_NTdoIt
Push $1
Call Trim
Pop $1
StrCpy $0 "$1;$0"
AddToPath_NTdoIt:
WriteRegExpandStr ${WriteEnvStr_RegKey} "PATH" $0
SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
AddToPath_done:
Pop $3
Pop $2
Pop $1
Pop $0
FunctionEnd
; RemoveFromPath - Remove a given dir from the path
; Input: head of the stack
Function un.RemoveFromPath
Exch $0
Push $1
Push $2
Push $3
Push $4
Push $5
Push $6
IntFmt $6 "%c" 26 # DOS EOF
Call un.IsNT
Pop $1
StrCmp $1 1 unRemoveFromPath_NT
; Not on NT
StrCpy $1 $WINDIR 2
FileOpen $1 "$1\autoexec.bat" r
GetTempFileName $4
FileOpen $2 $4 w
GetFullPathName /SHORT $0 $0
StrCpy $0 "SET PATH=%PATH%;$0"
Goto unRemoveFromPath_dosLoop
unRemoveFromPath_dosLoop:
FileRead $1 $3
StrCpy $5 $3 1 -1 # read last char
StrCmp $5 $6 0 +2 # if DOS EOF
StrCpy $3 $3 -1 # remove DOS EOF so we can compare
StrCmp $3 "$0$\r$\n" unRemoveFromPath_dosLoopRemoveLine
StrCmp $3 "$0$\n" unRemoveFromPath_dosLoopRemoveLine
StrCmp $3 "$0" unRemoveFromPath_dosLoopRemoveLine
StrCmp $3 "" unRemoveFromPath_dosLoopEnd
FileWrite $2 $3
Goto unRemoveFromPath_dosLoop
unRemoveFromPath_dosLoopRemoveLine:
SetRebootFlag true
Goto unRemoveFromPath_dosLoop
unRemoveFromPath_dosLoopEnd:
FileClose $2
FileClose $1
StrCpy $1 $WINDIR 2
Delete "$1\autoexec.bat"
CopyFiles /SILENT $4 "$1\autoexec.bat"
Delete $4
Goto unRemoveFromPath_done
unRemoveFromPath_NT:
ReadRegStr $1 ${WriteEnvStr_RegKey} "PATH"
StrCpy $5 $1 1 -1 # copy last char
StrCmp $5 ";" +2 # if last char != ;
StrCpy $1 "$1;" # append ;
Push $1
Push "$0;"
Call un.StrStr ; Find `$0;` in $1
Pop $2 ; pos of our dir
StrCmp $2 "" unRemoveFromPath_done
; else, it is in path
# $0 - path to add
# $1 - path var
StrLen $3 "$0;"
StrLen $4 $2
StrCpy $5 $1 -$4 # $5 is now the part before the path to remove
StrCpy $6 $2 "" $3 # $6 is now the part after the path to remove
StrCpy $3 $5$6
StrCpy $5 $3 1 -1 # copy last char
StrCmp $5 ";" 0 +2 # if last char == ;
StrCpy $3 $3 -1 # remove last char
WriteRegExpandStr ${WriteEnvStr_RegKey} "PATH" $3
SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
unRemoveFromPath_done:
Pop $6
Pop $5
Pop $4
Pop $3
Pop $2
Pop $1
Pop $0
FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Uninstall sutff
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
###########################################
# Utility Functions #
###########################################
;====================================================
; IsNT - Returns 1 if the current system is NT, 0
; otherwise.
; Output: head of the stack
;====================================================
; IsNT
; no input
; output, top of the stack = 1 if NT or 0 if not
;
; Usage:
; Call IsNT
; Pop $R0
; ($R0 at this point is 1 or 0)
!macro IsNT un
Function ${un}IsNT
Push $0
ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
StrCmp $0 "" 0 IsNT_yes
; we are not NT.
Pop $0
Push 0
Return
IsNT_yes:
; NT!!!
Pop $0
Push 1
FunctionEnd
!macroend
!insertmacro IsNT ""
!insertmacro IsNT "un."
; StrStr
; input, top of stack = string to search for
; top of stack-1 = string to search in
; output, top of stack (replaces with the portion of the string remaining)
; modifies no other variables.
;
; Usage:
; Push "this is a long ass string"
; Push "ass"
; Call StrStr
; Pop $R0
; ($R0 at this point is "ass string")
!macro StrStr un
Function ${un}StrStr
Exch $R1 ; st=haystack,old$R1, $R1=needle
Exch ; st=old$R1,haystack
Exch $R2 ; st=old$R1,old$R2, $R2=haystack
Push $R3
Push $R4
Push $R5
StrLen $R3 $R1
StrCpy $R4 0
; $R1=needle
; $R2=haystack
; $R3=len(needle)
; $R4=cnt
; $R5=tmp
loop:
StrCpy $R5 $R2 $R3 $R4
StrCmp $R5 $R1 done
StrCmp $R5 "" done
IntOp $R4 $R4 + 1
Goto loop
done:
StrCpy $R1 $R2 "" $R4
Pop $R5
Pop $R4
Pop $R3
Pop $R2
Exch $R1
FunctionEnd
!macroend
!insertmacro StrStr ""
!insertmacro StrStr "un."
Function Trim ; Added by Pelaca
Exch $R1
Push $R2
Loop:
StrCpy $R2 "$R1" 1 -1
StrCmp "$R2" " " RTrim
StrCmp "$R2" "$\n" RTrim
StrCmp "$R2" "$\r" RTrim
StrCmp "$R2" ";" RTrim
GoTo Done
RTrim:
StrCpy $R1 "$R1" -1
Goto Loop
Done:
Pop $R2
Exch $R1
FunctionEnd
Function ConditionalAddToRegisty
Pop $0
Pop $1
StrCmp "$0" "" ConditionalAddToRegisty_EmptyString
WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" \
"$1" "$0"
;MessageBox MB_OK "Set Registry: '$1' to '$0'"
DetailPrint "Set install registry entry: '$1' to '$0'"
ConditionalAddToRegisty_EmptyString:
FunctionEnd
;--------------------------------
!ifdef CPACK_USES_DOWNLOAD
Function DownloadFile
IfFileExists $INSTDIR\* +2
CreateDirectory $INSTDIR
Pop $0
; Skip if already downloaded
IfFileExists $INSTDIR\$0 0 +2
Return
StrCpy $1 "@CPACK_DOWNLOAD_SITE@"
try_again:
NSISdl::download "$1/$0" "$INSTDIR\$0"
Pop $1
StrCmp $1 "success" success
StrCmp $1 "Cancelled" cancel
MessageBox MB_OK "Download failed: $1"
cancel:
Return
success:
FunctionEnd
!endif
;--------------------------------
; Installation types
@CPACK_NSIS_INSTALLATION_TYPES@
;--------------------------------
; Component sections
@CPACK_NSIS_COMPONENT_SECTIONS@
;--------------------------------
; Define some macro setting for the gui
@CPACK_NSIS_INSTALLER_MUI_ICON_CODE@
@CPACK_NSIS_INSTALLER_ICON_CODE@
@CPACK_NSIS_INSTALLER_MUI_COMPONENTS_DESC@
;--------------------------------
;Pages
!define MUI_LANGDLL_REGISTRY_ROOT "SHCTX"
!define MUI_LANGDLL_REGISTRY_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@"
!define MUI_LANGDLL_REGISTRY_VALUENAME "NSIS:Language"
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "@CPACK_RESOURCE_FILE_LICENSE@"
!insertmacro MUI_PAGE_DIRECTORY
;Start Menu Folder Page Configuration
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "SHCTX"
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@"
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
!insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER
@CPACK_NSIS_PAGE_COMPONENTS@
!insertmacro MUI_PAGE_INSTFILES
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\docs\README.txt"
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
;--------------------------------
;Languages
!insertmacro MUI_LANGUAGE "Dutch"
!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "French"
!insertmacro MUI_LANGUAGE "German"
!insertmacro MUI_LANGUAGE "Italian"
!insertmacro MUI_LANGUAGE "Portuguese"
!insertmacro MUI_LANGUAGE "Spanish"
;--------------------------------
;Installer Sections
Section "-Core installation"
;Use the entire tree produced by the INSTALL target. Keep the
;list of directories here in sync with the RMDir commands below.
SetOutPath "$INSTDIR"
@CPACK_NSIS_FULL_INSTALL@
;Store installation folder
WriteRegStr SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "" $INSTDIR
;Create uninstaller
WriteUninstaller "$INSTDIR\Uninstall.exe"
Push "DisplayName"
Push "@CPACK_NSIS_DISPLAY_NAME@"
Call ConditionalAddToRegisty
Push "DisplayVersion"
Push "@CPACK_PACKAGE_VERSION@"
Call ConditionalAddToRegisty
Push "Publisher"
Push "@CPACK_PACKAGE_VENDOR@"
Call ConditionalAddToRegisty
Push "UninstallString"
Push "$INSTDIR\Uninstall.exe"
Call ConditionalAddToRegisty
Push "NoRepair"
Push "1"
Call ConditionalAddToRegisty
!ifdef CPACK_NSIS_ADD_REMOVE
;Create add/remove functionality
Push "ModifyPath"
Push "$INSTDIR\AddRemove.exe"
Call ConditionalAddToRegisty
!else
Push "NoModify"
Push "1"
Call ConditionalAddToRegisty
!endif
; Optional registration
Push "DisplayIcon"
Push "$INSTDIR\@CPACK_NSIS_INSTALLED_ICON_NAME@"
Call ConditionalAddToRegisty
Push "HelpLink"
Push "@CPACK_NSIS_HELP_LINK@"
Call ConditionalAddToRegisty
Push "URLInfoAbout"
Push "@CPACK_NSIS_URL_INFO_ABOUT@"
Call ConditionalAddToRegisty
Push "Contact"
Push "@CPACK_NSIS_CONTACT@"
Call ConditionalAddToRegisty
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
;Create shortcuts
CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"
@CPACK_NSIS_CREATE_ICONS@
@CPACK_NSIS_CREATE_ICONS_EXTRA@
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
; Write special uninstall registry entries
Push "StartMenu"
Push "$STARTMENU_FOLDER"
Call ConditionalAddToRegisty
Push "DoNotAddToPath"
Push "$DO_NOT_ADD_TO_PATH"
Call ConditionalAddToRegisty
Push "AddToPathAllUsers"
Push "$ADD_TO_PATH_ALL_USERS"
Call ConditionalAddToRegisty
Push "AddToPathCurrentUser"
Push "$ADD_TO_PATH_CURRENT_USER"
Call ConditionalAddToRegisty
Push "InstallToDesktop"
Push "$INSTALL_DESKTOP"
Call ConditionalAddToRegisty
@CPACK_NSIS_EXTRA_INSTALL_COMMANDS@
!insertmacro MUI_STARTMENU_WRITE_END
SectionEnd
;--------------------------------
; determine admin versus local install
Function un.onInit
ClearErrors
UserInfo::GetName
IfErrors noLM
Pop $0
UserInfo::GetAccountType
Pop $1
StrCmp $1 "Admin" 0 +3
SetShellVarContext all
;MessageBox MB_OK 'User "$0" is in the Admin group'
Goto done
StrCmp $1 "Power" 0 +3
SetShellVarContext all
;MessageBox MB_OK 'User "$0" is in the Power Users group'
Goto done
noLM:
;Get installation folder from registry if available
done:
!insertmacro MUI_UNGETLANGUAGE
FunctionEnd
;--- Add/Remove callback functions: ---
!macro SectionList MacroName
;This macro used to perform operation on multiple sections.
;List all of your components in following manner here.
@CPACK_NSIS_COMPONENT_SECTION_LIST@
!macroend
Section -FinishComponents
;Removes unselected components and writes component status to registry
!insertmacro SectionList "FinishSection"
!ifdef CPACK_NSIS_ADD_REMOVE
; Get the name of the installer executable
System::Call 'kernel32::GetModuleFileNameA(i 0, t .R0, i 1024) i r1'
StrCpy $R3 $R0
; Strip off the last 13 characters, to see if we have AddRemove.exe
StrLen $R1 $R0
IntOp $R1 $R0 - 13
StrCpy $R2 $R0 13 $R1
StrCmp $R2 "AddRemove.exe" addremove_installed
; We're not running AddRemove.exe, so install it
CopyFiles $R3 $INSTDIR\AddRemove.exe
addremove_installed:
!endif
SectionEnd
;--- End of Add/Remove callback functions ---
;--------------------------------
; Component dependencies
Function .onSelChange
!insertmacro SectionList MaybeSelectionChanged
FunctionEnd
;--------------------------------
;Uninstaller Section
Section "Uninstall"
ReadRegStr $START_MENU SHCTX \
"Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" "StartMenu"
;MessageBox MB_OK "Start menu is in: $START_MENU"
ReadRegStr $DO_NOT_ADD_TO_PATH SHCTX \
"Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" "DoNotAddToPath"
ReadRegStr $ADD_TO_PATH_ALL_USERS SHCTX \
"Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" "AddToPathAllUsers"
ReadRegStr $ADD_TO_PATH_CURRENT_USER SHCTX \
"Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" "AddToPathCurrentUser"
;MessageBox MB_OK "Add to path: $DO_NOT_ADD_TO_PATH all users: $ADD_TO_PATH_ALL_USERS"
ReadRegStr $INSTALL_DESKTOP SHCTX \
"Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" "InstallToDesktop"
;MessageBox MB_OK "Install to desktop: $INSTALL_DESKTOP "
@CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS@
;Remove files we installed.
;Keep the list of directories here in sync with the File commands above.
@CPACK_NSIS_DELETE_FILES@
@CPACK_NSIS_DELETE_DIRECTORIES@
!ifdef CPACK_NSIS_ADD_REMOVE
;Remove the add/remove program
Delete "$INSTDIR\AddRemove.exe"
!endif
;Remove the uninstaller itself.
Delete "$INSTDIR\Uninstall.exe"
DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@"
;Remove the installation directory if it is empty.
RMDir "$INSTDIR"
; Remove the registry entries.
DeleteRegKey SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@"
; Removes all optional components
!insertmacro SectionList "RemoveSection"
!insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk"
@CPACK_NSIS_DELETE_ICONS@
@CPACK_NSIS_DELETE_ICONS_EXTRA@
;Delete empty start menu parent diretories
StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"
startMenuDeleteLoop:
ClearErrors
RMDir $MUI_TEMP
GetFullPathName $MUI_TEMP "$MUI_TEMP\.."
IfErrors startMenuDeleteLoopDone
StrCmp "$MUI_TEMP" "$SMPROGRAMS" startMenuDeleteLoopDone startMenuDeleteLoop
startMenuDeleteLoopDone:
; If the user changed the shortcut, then untinstall may not work. This should
; try to fix it.
StrCpy $MUI_TEMP "$START_MENU"
Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk"
@CPACK_NSIS_DELETE_ICONS_EXTRA@
;Delete empty start menu parent diretories
StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"
secondStartMenuDeleteLoop:
ClearErrors
RMDir $MUI_TEMP
GetFullPathName $MUI_TEMP "$MUI_TEMP\.."
IfErrors secondStartMenuDeleteLoopDone
StrCmp "$MUI_TEMP" "$SMPROGRAMS" secondStartMenuDeleteLoopDone secondStartMenuDeleteLoop
secondStartMenuDeleteLoopDone:
DeleteRegKey /ifempty SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@"
Push $INSTDIR\bin
StrCmp $DO_NOT_ADD_TO_PATH_ "1" doNotRemoveFromPath 0
Call un.RemoveFromPath
doNotRemoveFromPath:
SectionEnd
;--------------------------------
; determine admin versus local install
; Is install for "AllUsers" or "JustMe"?
; Default to "JustMe" - set to "AllUsers" if admin or on Win9x
; This function is used for the very first "custom page" of the installer.
; This custom page does not show up visibly, but it executes prior to the
; first visible page and sets up $INSTDIR properly...
; Choose different default installation folder based on SV_ALLUSERS...
; "Program Files" for AllUsers, "My Documents" for JustMe...
Function .onInit
!insertmacro MUI_LANGDLL_DISPLAY
; Reads components status for registry
!insertmacro SectionList "InitSection"
StrCpy $SV_ALLUSERS "JustMe"
StrCpy $INSTDIR "$DOCUMENTS\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
ClearErrors
UserInfo::GetName
IfErrors noLM
Pop $0
UserInfo::GetAccountType
Pop $1
StrCmp $1 "Admin" 0 +3
SetShellVarContext all
;MessageBox MB_OK 'User "$0" is in the Admin group'
StrCpy $SV_ALLUSERS "AllUsers"
Goto done
StrCmp $1 "Power" 0 +3
SetShellVarContext all
;MessageBox MB_OK 'User "$0" is in the Power Users group'
StrCpy $SV_ALLUSERS "AllUsers"
Goto done
noLM:
StrCpy $SV_ALLUSERS "AllUsers"
;Get installation folder from registry if available
done:
StrCmp $SV_ALLUSERS "AllUsers" 0 +2
StrCpy $INSTDIR "$PROGRAMFILES\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
FunctionEnd
-119
View File
@@ -1,119 +0,0 @@
Legend:
x = done
? = unsure
+ = in progress
1.9.0
-----
[x] additional field where users' masked host can be stored so both masked IP and vhost are available instead of just one.
[x] no struct Uid bollocks. that's insane, and now, unnecessary that we store UID in BotInfo.
[x] prevent deletion of core services via /bs bot
[x] Module subsystem cleanup ('modules' branch)
[x] Move modules to use classes somewhat (AnopeInit, AnopeFini)
[x] Change MODULE_INIT to return a pointer
[x] Remove duplicate module creation.. have loadModule return a pointer rather than creating one
[x] Remove buffered loading/unloading, this makes os_modunload perm, but who cares
[x] Mark os_modunload permanent.
[x] Remove 'delayed' loading, this is necessary because of before/after connected to ircd (ircd is before, rest after), I'm sure this can be done better.
[x] Remove mod_current_* crap (involves passing Module * around a lot)
[x] events.c
[x] modules.c
[x] commands.c
[x] Redo moduleAdd|Get|Remove data to use class Extensible, etc.
[x] remove old config, replace with insp-inspired (albeit bind format) config (CBX)
[x] Clean up protocol
[x] Fix anope_cmd_* stuff to just use IRCdProto methods directly
[x] SendClientIntroduction should take a UID param, rather than generating one(?)
[x] Fix permanent channels (+P) stuff.
[x] Remove UnRestrictSAdmin, UseTS6, UseSVSHOLD
[x] InspIRCd 1.2 support
[x] Remove old (prior to 1.8.0) db compat
[x] Establish a proper base for services pseudoclients
[x] add ss_main StatServ Hal9000 to play with :)
[x] burn automake with fire (CBX)
1.9.1
-----
[ ] Remove modules_unload_all fini + hack that goes with it
[ ] signal handling cleanup
[ ] Move a (lot) of stuff to class members as a defined interface rather than copypasta everywhere (ns_set, ns_saset!)
[ ] Redo database insanity.
[ ] Move database load/save to a module
[ ] realtime SQL/whatever module using events
[ ] flatfile save on a periodic timer
[ ] SANE password encryption - prefix password with the method it was encrypted with, allowing for *seamless* upgrading to different methods
[ ] Salted SHA256 (contact Special for this)
[ ] New database format (text, not binary - works very well for merging and so on)
[ ] burn do_sjoin with fire
[ ] Seamless fantasy support for all ChanServ commands, instead of requiring bs_fantasy_*
[ ] HelpServ must die (1.9.1?)
[ ] Command parser cleanup
[ ] mod_current_buffer needs to go away and be replaced by a proper parser. Commands should then indicate how they want the buffer split.
[ ] Fix permanent channels support properly. This will require removing do_sjoin().
[ ] Make NS ENFORCE/RELEASE stuff more sane, redo timers
[ ] Add support for +k, +q, etc type umodes
1.9.2
-----
[ ] Socket subsystem needs some serious loving
[ ] Multiple sockets
[ ] Asynchronous, using select() (multiple engines? not really needed..)
[ ] Callbacks, event style, see also inspircd
[ ] Asynchronous DNS?
[ ] CS SET INHABIT to keep pseudoclient in a channel after it empties to maintain banlists and such
[?] Remote identification (1.9.1? will this break stuff?)
[ ] Requires a rejig of how Alias vs Core works
[ ] Language charset stuff, including collation (1.9.1? phoenix?)
Future
------
[ ] way for one module to depend on another... not like 2 MOD_HEADs and it being unpredictable which is loaded first..
the MOD_HEAD MOD_TAIL allows for too few combinations (interface code of insp, hooks code of insp?)
[ ] generic database routines modules can use to create their own database
[ ] generic way to check which modes a user has set (u->HasUmode(UMODE_OPER))
? [ ] a way for a module to queue itself (or even another module) for unloading
[ ] add overridden form of SendGlobops accepting BotInfo
[ ] SendAkill should just take a pointer to the Akill class instead of millions of fields (same for some other stuff)
[ ] chan_set_modes should take BotInfo, possibly with override for User *?
[ ] Language system is disgusting, it must die.
[ ] Modules should also have a way to add strings programatically
[ ] Should be able to add many strings by dropping a file in a set location.
[ ] I forsee this working via a function rather than defines, as it seems to do now: e.g. _("NS_NICK_IS_REGISTERED").
[?] Mail memos? think on consequences of this
[ ] Useful/common "third party" modules to core distro
[ ] NS AJOIN
[ ] Last used time on AKICK/access entries
[ ] Channel access additions
[ ] Method to store listmodes (more generically than AKICK, too) for e.g. +beI and extbans, etc.
[ ] Setter
[ ] Time added
[ ] Time modified
[ ] Expiry (useful?)
[ ] Set forbidden channels +s
[ ] NS INFO: seperate field for last seen realhost, shown to SRA only
[ ] NS SUSPEND: show suspender and reason, probably to sopers only (see CS SUSPEND)
XXX: is SUSPEND overlapping with OS IGNORE functionality?
[ ] Merge NS INFO blah ALL with NS INFO blah, if you're requesting info, you really want the info anyway.
? [ ] Channel passwords seem to be of limited use, think of a more appropriate way to handle this
? [ ] Don't allow soper accounts to expire
? [ ] Reason for CS SET RESTRICTED
[ ] NS IDENTIFY changes
? [ ] Last failed identify? Maybe more useful for sopers only, so users don't get unnecessarily worried
? [ ] Last successful login time/ip? perhaps both of these should be a new nick setting
[ ] AKILL/SGLINE/etc..
[ ] Setter
[ ] Time added
[ ] Time modified (can they be modified?)
[ ] Time until expiry/expiry time (YES, time until expiry *instead of* expiry time, more human)
[ ] Reason
[ ] Unique IDs on each AKILL/blah so that networks may use them as ticket IDs
[ ] HS ACTIVATE -ALL (rob sez this all needs reviewing)
[ ] Settable oper flags (split into types containing privs+commands, allow each oper to be set to a type, like we do with insp?)
[ ] NS MARK, CS MARK. Allow multiple marks. Combine into OS MARK?
[ ] General options block, ability to turn LOGCHAN on from the config file..
[ ] Method to list suspended/forbidden nicks/channels?
? [ ] MS IGNORE. Make it take nick (accounts) or n!u@h masks. Fake success of memo send still, but send to opers?
? [ ] More "friendly" date displays of some things like registration time ("November 7th 2006 (2 years, 0 months, 0 days ago)")
? [ ] Review settings like NSModeOnID for whether they actually have a point existing (Rob says it does not - and that it should probably be a nickname setting)
? [ ] OS INJECT
? [ ] Drop CS SET ENTRYMSG, replace with a 'news' type system? (limited to a configured number of items, default 3)
Vendored
+24 -32
View File
@@ -835,37 +835,29 @@ dnl Check the size of several types and define a valid int16_t and int32_t.
dnl
AC_DEFUN(anope_CHECK_TYPE_SIZES,
[dnl Check type sizes
dnl AC_CHECK_SIZEOF(short)
dnl AC_CHECK_SIZEOF(int)
dnl AC_CHECK_SIZEOF(long)
dnl if test "$ac_cv_sizeof_int" = 2 ; then
dnl AC_CHECK_TYPE(int16_t, int)
dnl AC_CHECK_TYPE(u_int16_t, unsigned int)
dnl elif test "$ac_cv_sizeof_short" = 2 ; then
dnl AC_CHECK_TYPE(int16_t, short)
dnl AC_CHECK_TYPE(u_int16_t, unsigned short)
dnl else
dnl AC_MSG_ERROR([Cannot find a type with size of 16 bits])
dnl fi
dnl if test "$ac_cv_sizeof_int" = 4 ; then
dnl AC_CHECK_TYPE(int32_t, int)
dnl AC_CHECK_TYPE(u_int32_t, unsigned int)
dnl elif test "$ac_cv_sizeof_short" = 4 ; then
dnl AC_CHECK_TYPE(int32_t, short)
dnl AC_CHECK_TYPE(u_int32_t, unsigned short)
dnl elif test "$ac_cv_sizeof_long" = 4 ; then
dnl AC_CHECK_TYPE(int32_t, long)
dnl AC_CHECK_TYPE(u_int32_t, unsigned long)
dnl else
dnl AC_MSG_ERROR([Cannot find a type with size of 32 bits])
dnl fi
AC_CHECK_TYPE(uint8_t, AC_DEFINE(HAVE_UINT8_T, 1, "Has uint8_t type"))
AC_CHECK_TYPE(u_int8_t, AC_DEFINE(HAVE_U_INT8_T, 1, "Has u_int8_t type"))
AC_CHECK_TYPE(int16_t, AC_DEFINE(HAVE_INT16_T, 1, "Has int16_t type"))
AC_CHECK_TYPE(uint16_t, AC_DEFINE(HAVE_UINT16_T, 1, "Has uint16_t type"))
AC_CHECK_TYPE(u_int16_t, AC_DEFINE(HAVE_U_INT16_T, 1, "Has u_int16_t type"))
AC_CHECK_TYPE(int32_t, AC_DEFINE(HAVE_INT32_T, 1, "Has int32_t type"))
AC_CHECK_TYPE(uint32_t, AC_DEFINE(HAVE_UINT32_T, 1, "Has uint32_t type"))
AC_CHECK_TYPE(u_int32_t, AC_DEFINE(HAVE_U_INT32_T, 1, "Has u_int32_t type"))
AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
if test "$ac_cv_sizeof_int" = 2 ; then
AC_CHECK_TYPE(int16_t, int)
AC_CHECK_TYPE(u_int16_t, unsigned int)
elif test "$ac_cv_sizeof_short" = 2 ; then
AC_CHECK_TYPE(int16_t, short)
AC_CHECK_TYPE(u_int16_t, unsigned short)
else
AC_MSG_ERROR([Cannot find a type with size of 16 bits])
fi
if test "$ac_cv_sizeof_int" = 4 ; then
AC_CHECK_TYPE(int32_t, int)
AC_CHECK_TYPE(u_int32_t, unsigned int)
elif test "$ac_cv_sizeof_short" = 4 ; then
AC_CHECK_TYPE(int32_t, short)
AC_CHECK_TYPE(u_int32_t, unsigned short)
elif test "$ac_cv_sizeof_long" = 4 ; then
AC_CHECK_TYPE(int32_t, long)
AC_CHECK_TYPE(u_int32_t, unsigned long)
else
AC_MSG_ERROR([Cannot find a type with size of 32 bits])
fi
])
+24 -32
View File
@@ -4,36 +4,28 @@ dnl Check the size of several types and define a valid int16_t and int32_t.
dnl
AC_DEFUN(anope_CHECK_TYPE_SIZES,
[dnl Check type sizes
dnl AC_CHECK_SIZEOF(short)
dnl AC_CHECK_SIZEOF(int)
dnl AC_CHECK_SIZEOF(long)
dnl if test "$ac_cv_sizeof_int" = 2 ; then
dnl AC_CHECK_TYPE(int16_t, int)
dnl AC_CHECK_TYPE(u_int16_t, unsigned int)
dnl elif test "$ac_cv_sizeof_short" = 2 ; then
dnl AC_CHECK_TYPE(int16_t, short)
dnl AC_CHECK_TYPE(u_int16_t, unsigned short)
dnl else
dnl AC_MSG_ERROR([Cannot find a type with size of 16 bits])
dnl fi
dnl if test "$ac_cv_sizeof_int" = 4 ; then
dnl AC_CHECK_TYPE(int32_t, int)
dnl AC_CHECK_TYPE(u_int32_t, unsigned int)
dnl elif test "$ac_cv_sizeof_short" = 4 ; then
dnl AC_CHECK_TYPE(int32_t, short)
dnl AC_CHECK_TYPE(u_int32_t, unsigned short)
dnl elif test "$ac_cv_sizeof_long" = 4 ; then
dnl AC_CHECK_TYPE(int32_t, long)
dnl AC_CHECK_TYPE(u_int32_t, unsigned long)
dnl else
dnl AC_MSG_ERROR([Cannot find a type with size of 32 bits])
dnl fi
AC_CHECK_TYPE(uint8_t, AC_DEFINE(HAVE_UINT8_T, 1, "Has uint8_t type"))
AC_CHECK_TYPE(u_int8_t, AC_DEFINE(HAVE_U_INT8_T, 1, "Has u_int8_t type"))
AC_CHECK_TYPE(int16_t, AC_DEFINE(HAVE_INT16_T, 1, "Has int16_t type"))
AC_CHECK_TYPE(uint16_t, AC_DEFINE(HAVE_UINT16_T, 1, "Has uint16_t type"))
AC_CHECK_TYPE(u_int16_t, AC_DEFINE(HAVE_U_INT16_T, 1, "Has u_int16_t type"))
AC_CHECK_TYPE(int32_t, AC_DEFINE(HAVE_INT32_T, 1, "Has int32_t type"))
AC_CHECK_TYPE(uint32_t, AC_DEFINE(HAVE_UINT32_T, 1, "Has uint32_t type"))
AC_CHECK_TYPE(u_int32_t, AC_DEFINE(HAVE_U_INT32_T, 1, "Has u_int32_t type"))
AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
if test "$ac_cv_sizeof_int" = 2 ; then
AC_CHECK_TYPE(int16_t, int)
AC_CHECK_TYPE(u_int16_t, unsigned int)
elif test "$ac_cv_sizeof_short" = 2 ; then
AC_CHECK_TYPE(int16_t, short)
AC_CHECK_TYPE(u_int16_t, unsigned short)
else
AC_MSG_ERROR([Cannot find a type with size of 16 bits])
fi
if test "$ac_cv_sizeof_int" = 4 ; then
AC_CHECK_TYPE(int32_t, int)
AC_CHECK_TYPE(u_int32_t, unsigned int)
elif test "$ac_cv_sizeof_short" = 4 ; then
AC_CHECK_TYPE(int32_t, short)
AC_CHECK_TYPE(u_int32_t, unsigned short)
elif test "$ac_cv_sizeof_long" = 4 ; then
AC_CHECK_TYPE(int32_t, long)
AC_CHECK_TYPE(u_int32_t, unsigned long)
else
AC_MSG_ERROR([Cannot find a type with size of 32 bits])
fi
])
-13
View File
@@ -1,13 +0,0 @@
#!/bin/sh
echo "Generating build information using aclocal, autoheader, automake and autoconf."
echo
# Regerate configuration files
aclocal
autoheader
automake --gnu --add-missing --copy
autoconf
echo
echo "Now you are ready to run ./configure"
Vendored
+2248 -298
View File
File diff suppressed because it is too large Load Diff
+43 -29
View File
@@ -1,21 +1,18 @@
dnl autoconf.in for Services.
dnl
dnl Anope (c) 2003-2008 Anope team
dnl Anope (c) 2003-2007 Anope team
dnl Contact us at team@anope.org
dnl This program is free but copyrighted software; see the file COPYING for
dnl details.
dnl Based heavily on the Unreal configure.in script, and extra thanks to
dnl codemastr from UnrealIRCD.
AC_INIT
# Clear out any CFLAGS (cept -g) the os is using, usually -g -O2
CFLAGS="-g"
# If no bindir, we tell him to run ./Config.
if test "${with_instdir+set}" != set; then
if test "${with_bindir+set}" != set || test "${with_datadir+set}" != set; then
echo "You might want to run ./Config or provide some parameters to this script."
echo "./configure --help for information about this script"
exit 0
@@ -68,7 +65,7 @@ AC_CACHE_VAL(ac_cv_valistisarray,
}
int main()
{ foo(0, 123); return(0); }]])],[ac_cv_valistisarray=false],[ac_cv_valistisarray=true],[ac_cv_valistisarray=false])])
if test "$ac_cv_valistisarray" = true ; then
AC_DEFINE(HAVE_VA_LIST_AS_ARRAY,[1],[va_list as array])
AC_MSG_RESULT(yes)
@@ -109,12 +106,18 @@ AC_ARG_WITH(mysql, [ --without-mysql Do not use MySQL or attempt to fin
int main()
{
MYSQL *mysql = mysql_init(0);
return 0;
}
], ac_cv_mysql_valid=yes, ac_cv_mysql_valid=no)
echo $ac_cv_mysql_valid >&6
if test "$ac_cv_mysql_valid" = "yes"; then
AC_DEFINE_UNQUOTED(USE_MYSQL,1,"Use Mysql")
AC_DEFINE_UNQUOTED(USE_RDB,1,"Use RDB")
MYSQL=" mysql.c "
RDB=" rdb.c "
AC_SUBST(MYSQL)
AC_SUBST(RDB)
DIS_MYSQL=" MySQL: Yes"
else
CFLAGS="$hold_cflags"
@@ -130,12 +133,12 @@ int main()
short s = 1;
short* ptr = &s;
unsigned char c = *((char*)ptr);
return c;
return c;
}
]
, AC_DEFINE(BIG_ENDIAN)
AC_MSG_RESULT(big)
, AC_DEFINE(LITTLE_ENDIAN)
, AC_DEFINE(LITTLE_ENDIAN)
AC_MSG_RESULT(little)
)
@@ -143,14 +146,22 @@ AC_SUBST(ANOPELIBS)
AC_SUBST(LDFLAGS)
AC_CHECK_HEADER(sys/types.h,AC_DEFINE(HAS_SYS_TYPES_H,1,"Has sys/types.h"))
DIS_MODULES="Modules: Yes"
dnl module checking based on Unreal's module checking code
AC_DEFUN(AC_ENABLE_DYN,
[
AC_CHECK_FUNC(dlopen,, AC_CHECK_LIB(dl,dlopen,[
ANOPELIBS="$ANOPELIBS -ldl"
AC_DEFINE(USE_MODULES,1,"Modules are available")
USE_MODULES="yes"
DIS_MODULES="Modules: Yes"
],
[
AC_ERROR("dlopen() is required for Anope to be compiled and used. Sorry.")
AC_MSG_WARN(Dynamic linking is not enabled because dlopen was not found)
AC_DEFINE(STATIC_LINKING,"NO_MODULES","modules not available")
DIS_MODULES="Modules: No"
]))
hold_cflags=$CFLAGS
@@ -219,6 +230,7 @@ fi
MODULEFLAGS=$ac_cv_pic
AC_SUBST(MODULEFLAGS)
AC_DEFINE(USE_MODULES,1,"Modules available")
])
AC_ENABLE_DYN
@@ -228,8 +240,14 @@ AC_CHECK_HEADER(strings.h,AC_DEFINE(HAVE_STRINGS_H,1,""))
AC_CHECK_HEADER(sys/select.h,AC_DEFINE(HAVE_SYS_SELECT_H,1,""))
AC_CHECK_FUNCS(backtrace,AC_DEFINE(HAVE_BACKTRACE,1))
AC_CHECK_FUNCS(strerror,AC_DEFINE(HAVE_STRERROR,1))
AC_CHECK_FUNCS(sys_errlist,AC_DEFINE(HAVE_SYS_ERRLIST,1))
AC_CHECK_FUNCS(snprintf,AC_DEFINE(HAVE_SNPRINTF,1))
AC_CHECK_FUNCS(stricmp,AC_DEFINE(HAVE_STRICMP,1))
AC_CHECK_FUNCS(strcasecmp,AC_DEFINE(HAVE_STRCASECMP,1))
AC_CHECK_FUNCS(strdup,AC_DEFINE(HAVE_STRDUP,1))
AC_CHECK_FUNCS(strspn,AC_DEFINE(HAVE_STRSPN,1))
AC_CHECK_FUNCS(strsignal,AC_DEFINE(HAVE_STRSIGNAL,1))
AC_CHECK_FUNCS(gettimeofday,AC_DEFINE(HAVE_GETTIMEOFDAY,1))
AC_CHECK_FUNCS(setgrent,AC_DEFINE(HAVE_SETGRENT,1))
AC_CHECK_FUNCS(umask,AC_DEFINE(HAVE_UMASK,1))
@@ -239,36 +257,34 @@ AC_CHECK_FUNCS(gethostbyname_r,AC_DEFINE(HAVE_GETHOSTBYNAME_R,1))
AC_CHECK_FUNCS(strlcpy,AC_DEFINE(HAVE_STRLCPY,1))
AC_CHECK_FUNCS(strlcat,AC_DEFINE(HAVE_STRLCAT,1))
AC_ARG_WITH(rungroup, [ --with-rungroup=group Specify the rungroup for anope], [
AC_ARG_WITH(rungroup, [ --with-rungroup=group Specify the rungroup for anope], [
AC_DEFINE_UNQUOTED(RUNGROUP,"$withval","Run group")
RUNGROUP=$withval
])
AC_SUBST(RUNGROUP)
dnl AC_DEFINE_UNQUOTED(MYOSNAME,"`uname -a`","uname")
AC_ARG_WITH(permissions, [ --with-permissions=permissions Specify the default permissions for anope], AC_DEFINE_UNQUOTED(DEFUMASK,$withval,"Default umask permissions"), AC_DEFINE(DEFUMASK, 007,"Default umask Permissions"))
AC_ARG_WITH(instdir, [ --with-instdir=instdir Specify the default install dir for anope], [
INSTDIR=$withval
AC_ARG_WITH(bindir, [ --with-bindir=bindir Specify the default binary dir for anope], [
AC_DEFINE_UNQUOTED(SERVICES_BIN,"${withval}/services","Binary Dir")
BINDEST=$withval
DATDEST=$withval
MODULE_PATH=${withval}/modules/
])
MAKEBIN=`pwd`/run-cc.pl
AC_SUBST(BINDEST)
AC_ARG_WITH(makebin, [--with-makebin=run-cc.pl Specify the default make binary to use],[MAKEBIN=$withval])
AC_SUBST(INSTDIR)
AC_SUBST(MAKEBIN)
AC_ARG_WITH(optimization, [ --with-optimization=1|2|3|4|5 Specify the optimization level], [
CFLAGS="$CFLAGS -O$withval"
])
AC_ARG_WITH(debugsym, [ --with-debugsym Include debugging symbols], [
CFLAGS="$CFLAGS -g"
AC_ARG_WITH(datadir, [ --with-datadir=datadir Specify the location of the services data folder], [
AC_DEFINE_UNQUOTED(SERVICES_DIR,"$withval","services bin dir")
AC_DEFINE_UNQUOTED(MODULE_PATH,"${withval}/modules/","Module dir")
DATDEST=$withval
MODULE_PATH=${withval}/modules/
])
AC_SUBST(DATDEST)
AC_SUBST(MODULE_PATH)
AC_CONFIG_FILES( \
Makefile \
@@ -282,8 +298,6 @@ cat <<EOT
$DIS_MODULES
$DIS_MYSQL
All done! Now run "make" (or possibly "gmake") to compile Anope.
See the INSTALL, README and FAQ files if you have any problems.
EOT
-6
View File
@@ -1,6 +0,0 @@
# Only install example.chk and example.conf from this directory
# NOTE: I would've had this just find all files in the directory, but that would include files not needed (like this file)
set(DATA example.chk example.conf)
install(FILES ${DATA}
DESTINATION data
)
+1597 -1520
View File
File diff suppressed because it is too large Load Diff
+433
View File
@@ -0,0 +1,433 @@
-- If you need to create your db, uncomment the following lines.
--
-- CREATE DATABASE anope;
-- USE anope;
--
-- Table structure for table 'anope_bs_core'
--
DROP TABLE IF EXISTS anope_bs_core;
CREATE TABLE anope_bs_core (
bs_id int(11) NOT NULL auto_increment,
nick varchar(255) NOT NULL default '',
`user` text NOT NULL,
host text NOT NULL,
rname text NOT NULL,
flags int(11) NOT NULL default '0',
created int(11) NOT NULL default '0',
chancount int(11) NOT NULL default '0',
active int(1) NOT NULL default '1',
PRIMARY KEY (bs_id),
UNIQUE KEY nick (nick)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table 'anope_cs_access'
--
DROP TABLE IF EXISTS anope_cs_access;
CREATE TABLE anope_cs_access (
ca_id int(11) NOT NULL auto_increment,
in_use int(11) NOT NULL default '0',
`level` int(11) NOT NULL default '0',
display varchar(255) NOT NULL default '',
channel varchar(255) NOT NULL default '',
last_seen int(11) NOT NULL default '0',
active tinyint(1) NOT NULL default '1',
PRIMARY KEY (ca_id),
UNIQUE KEY channel (channel,display)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table 'anope_cs_akicks'
--
DROP TABLE IF EXISTS anope_cs_akicks;
CREATE TABLE anope_cs_akicks (
ck_id int(11) NOT NULL auto_increment,
channel varchar(255) NOT NULL default '',
flags int(11) NOT NULL default '0',
dmask varchar(255) NOT NULL,
reason text NOT NULL,
creator text NOT NULL,
addtime int(11) NOT NULL default '0',
active tinyint(1) NOT NULL default '1',
PRIMARY KEY (ck_id),
UNIQUE KEY channel (channel,dmask)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table 'anope_cs_badwords'
--
DROP TABLE IF EXISTS anope_cs_badwords;
CREATE TABLE anope_cs_badwords (
cw_id int(11) NOT NULL auto_increment,
channel varchar(255) NOT NULL default '',
word varchar(255) NOT NULL,
`type` int(11) NOT NULL default '0',
active tinyint(1) NOT NULL default '1',
PRIMARY KEY (cw_id),
UNIQUE KEY channel (channel,word)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table 'anope_cs_info'
--
DROP TABLE IF EXISTS anope_cs_info;
CREATE TABLE anope_cs_info (
ci_id int(11) NOT NULL auto_increment,
`name` varchar(255) NOT NULL default '',
founder text NOT NULL,
successor text NOT NULL,
founderpass tinyblob NOT NULL,
descr text NOT NULL,
url text NOT NULL,
email text NOT NULL,
time_registered int(10) unsigned NOT NULL default '0',
last_used int(10) unsigned NOT NULL default '0',
last_topic text NOT NULL,
last_topic_setter text NOT NULL,
last_topic_time int(10) unsigned NOT NULL default '0',
flags int(10) unsigned NOT NULL default '0',
forbidby text NOT NULL,
forbidreason text NOT NULL,
bantype smallint(6) NOT NULL default '0',
accesscount smallint(6) NOT NULL default '0',
akickcount smallint(6) NOT NULL default '0',
mlock_on int(10) unsigned NOT NULL default '0',
mlock_off int(10) unsigned NOT NULL default '0',
mlock_limit int(10) unsigned NOT NULL default '0',
mlock_key text NOT NULL,
mlock_flood text NOT NULL,
mlock_redirect text NOT NULL,
entry_message text NOT NULL,
memomax smallint(5) unsigned NOT NULL default '0',
botnick varchar(255) NOT NULL default '',
botflags int(10) unsigned NOT NULL default '0',
bwcount smallint(6) NOT NULL default '0',
capsmin smallint(6) NOT NULL default '0',
capspercent smallint(6) NOT NULL default '0',
floodlines smallint(6) NOT NULL default '0',
floodsecs smallint(6) NOT NULL default '0',
repeattimes smallint(6) NOT NULL default '0',
active tinyint(1) NOT NULL default '1',
PRIMARY KEY (ci_id),
UNIQUE KEY `name` (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table 'anope_cs_levels'
--
DROP TABLE IF EXISTS anope_cs_levels;
CREATE TABLE anope_cs_levels (
cl_id int(11) NOT NULL auto_increment,
channel varchar(255) NOT NULL default '',
position int(11) NOT NULL default '0',
`level` int(11) NOT NULL default '0',
active tinyint(1) NOT NULL default '1',
PRIMARY KEY (cl_id),
UNIQUE KEY channel (channel,position)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table 'anope_cs_ttb'
--
DROP TABLE IF EXISTS anope_cs_ttb;
CREATE TABLE anope_cs_ttb (
ct_id int(11) NOT NULL auto_increment,
channel varchar(255) NOT NULL default '',
ttb_id int(11) NOT NULL default '0',
`value` int(11) NOT NULL default '0',
active tinyint(1) NOT NULL default '1',
PRIMARY KEY (ct_id),
UNIQUE KEY channel (channel,ttb_id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table 'anope_hs_core'
--
DROP TABLE IF EXISTS anope_hs_core;
CREATE TABLE anope_hs_core (
bs_id int(11) NOT NULL auto_increment,
nick varchar(255) NOT NULL default '',
vident text NOT NULL,
vhost text NOT NULL,
creator text NOT NULL,
`time` int(11) NOT NULL default '0',
active tinyint(1) NOT NULL default '1',
PRIMARY KEY (bs_id),
UNIQUE KEY nick (nick)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table 'anope_info'
--
DROP TABLE IF EXISTS anope_info;
CREATE TABLE anope_info (
version int(11) default NULL,
`date` datetime default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table 'anope_ms_info'
--
DROP TABLE IF EXISTS anope_ms_info;
CREATE TABLE anope_ms_info (
nm_id int(11) NOT NULL auto_increment,
receiver varchar(255) NOT NULL,
number int(11) NOT NULL default '0',
flags int(11) NOT NULL default '0',
`time` int(11) NOT NULL default '0',
sender text NOT NULL,
`text` blob NOT NULL,
serv enum('NICK','CHAN') NOT NULL default 'NICK',
active tinyint(1) NOT NULL default '1',
PRIMARY KEY (nm_id),
UNIQUE KEY nm_id (nm_id,serv),
KEY receiver (receiver,serv)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table 'anope_ns_access'
--
DROP TABLE IF EXISTS anope_ns_access;
CREATE TABLE anope_ns_access (
na_id int(11) NOT NULL auto_increment,
display varchar(255) NOT NULL default '',
access text NOT NULL,
active tinyint(1) NOT NULL default '1',
PRIMARY KEY (na_id),
UNIQUE KEY display (display)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table 'anope_ns_alias'
--
DROP TABLE IF EXISTS anope_ns_alias;
CREATE TABLE anope_ns_alias (
na_id int(11) NOT NULL auto_increment,
display varchar(255) NOT NULL default '',
nick varchar(255) NOT NULL default '',
time_registered int(10) unsigned NOT NULL default '0',
last_seen int(10) unsigned NOT NULL default '0',
`status` int(11) unsigned NOT NULL default '0',
last_usermask text NOT NULL,
last_realname text NOT NULL,
last_quit text NOT NULL,
active tinyint(1) NOT NULL default '1',
PRIMARY KEY (na_id),
UNIQUE KEY nick (nick)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table 'anope_ns_core'
--
DROP TABLE IF EXISTS anope_ns_core;
CREATE TABLE anope_ns_core (
nc_id int(11) NOT NULL auto_increment,
display varchar(255) NOT NULL default '',
pass tinyblob NOT NULL,
email text NOT NULL,
icq int(10) unsigned NOT NULL default '0',
url text NOT NULL,
flags int(11) NOT NULL default '0',
`language` smallint(5) unsigned NOT NULL default '0',
accesscount smallint(6) NOT NULL default '0',
memocount smallint(5) unsigned NOT NULL default '0',
memomax smallint(5) unsigned NOT NULL default '0',
channelcount smallint(5) unsigned NOT NULL default '0',
channelmax smallint(5) unsigned NOT NULL default '0',
greet text NOT NULL,
active tinyint(1) NOT NULL default '1',
PRIMARY KEY (nc_id),
UNIQUE KEY display (display)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table 'anope_ns_request'
--
DROP TABLE IF EXISTS anope_ns_request;
CREATE TABLE anope_ns_request (
nr_id int(11) NOT NULL auto_increment,
nick varchar(255) NOT NULL default '',
passcode text NOT NULL,
`password` tinyblob NOT NULL,
email text NOT NULL,
requested int(11) NOT NULL default '0',
active tinyint(1) NOT NULL default '1',
PRIMARY KEY (nr_id),
UNIQUE KEY nick (nick)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table 'anope_os_akills'
--
DROP TABLE IF EXISTS anope_os_akills;
CREATE TABLE anope_os_akills (
ok_id int(11) NOT NULL auto_increment,
`user` varchar(255) NOT NULL,
host varchar(255) NOT NULL,
xby text NOT NULL,
reason text NOT NULL,
seton int(11) NOT NULL default '0',
expire int(11) NOT NULL default '0',
active tinyint(1) NOT NULL default '1',
PRIMARY KEY (ok_id),
UNIQUE KEY `user` (`user`,host)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table 'anope_os_core'
--
DROP TABLE IF EXISTS anope_os_core;
CREATE TABLE anope_os_core (
oc_id int(11) NOT NULL auto_increment,
maxusercnt int(11) NOT NULL default '0',
maxusertime int(11) NOT NULL default '0',
akills_count int(11) NOT NULL default '0',
sglines_count int(11) NOT NULL default '0',
sqlines_count int(11) NOT NULL default '0',
szlines_count int(11) NOT NULL default '0',
PRIMARY KEY (oc_id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table 'anope_os_exceptions'
--
DROP TABLE IF EXISTS anope_os_exceptions;
CREATE TABLE anope_os_exceptions (
oe_id int(11) NOT NULL auto_increment,
mask varchar(255) NOT NULL,
lim int(11) NOT NULL default '0',
who text NOT NULL,
reason text NOT NULL,
`time` int(11) NOT NULL default '0',
expires int(11) NOT NULL default '0',
active tinyint(1) NOT NULL default '1',
PRIMARY KEY (oe_id),
UNIQUE KEY mask (mask)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table 'anope_os_news'
--
DROP TABLE IF EXISTS anope_os_news;
CREATE TABLE anope_os_news (
on_id int(11) NOT NULL auto_increment,
`type` int(11) NOT NULL default '0',
num int(11) NOT NULL default '0',
ntext text NOT NULL,
who text NOT NULL,
`time` int(11) NOT NULL default '0',
active tinyint(1) NOT NULL default '1',
PRIMARY KEY (on_id),
UNIQUE KEY `type` (`type`,num,`time`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table 'anope_os_sglines'
--
DROP TABLE IF EXISTS anope_os_sglines;
CREATE TABLE anope_os_sglines (
og_id int(11) NOT NULL auto_increment,
mask varchar(255) NOT NULL,
xby text NOT NULL,
reason text NOT NULL,
seton int(11) NOT NULL default '0',
expire int(11) NOT NULL default '0',
active tinyint(1) NOT NULL default '1',
PRIMARY KEY (og_id),
UNIQUE KEY mask (mask)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table 'anope_os_sqlines'
--
DROP TABLE IF EXISTS anope_os_sqlines;
CREATE TABLE anope_os_sqlines (
og_id int(11) NOT NULL auto_increment,
mask varchar(255) NOT NULL,
xby text NOT NULL,
reason text NOT NULL,
seton int(11) NOT NULL default '0',
expire int(11) NOT NULL default '0',
active tinyint(1) NOT NULL default '1',
PRIMARY KEY (og_id),
UNIQUE KEY mask (mask)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table 'anope_os_szlines'
--
DROP TABLE IF EXISTS anope_os_szlines;
CREATE TABLE anope_os_szlines (
og_id int(11) NOT NULL auto_increment,
mask varchar(255) NOT NULL,
xby text NOT NULL,
reason text NOT NULL,
seton int(11) NOT NULL default '0',
expire int(11) NOT NULL default '0',
active tinyint(1) NOT NULL default '1',
PRIMARY KEY (og_id),
UNIQUE KEY mask (mask)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-106
View File
@@ -1,106 +0,0 @@
C++-style Casting
=================
In C, you can cast in one of two ways:
(type)var
type(var)
The problem with C-style casting is that it allows a programmer to get away
with too much, and is also not designed to handle C++ classes.
C++ has 4 types of casting in addition to allowing C-style casting. They are:
static_cast
const_cast
dynamic_cast
reinterpret_cast
The syntax is usually *_cast<type>(var).
static_cast
-----------
From my expierence, this cast is closest to C-style casting for non-pointer
types as well as between some (but not all) pointer types. This type of cast,
like C-style casting, is performed at compile-time. static_cast can also do
a downcast of a derived class to a base class, but only if the base class is
not a virtual base class. Sometimes the result of this cast can become
undefined. static_cast is a bit more strict that C-style casting, though. It
disallows certain class conversions that would've been allowed with a C-style
cast. static_cast also doesn't allow you to cast to an incomplete type. In
these cases, I would try either dynamic_cast or reinterpret_cast.
const_cast
----------
This cast is mainly to add or remove const-ness or volatile-ness from a
variable. This is safer than using a C-style cast to change the const-ness
of a variable. In most cases if you try to use one of the other casts and it
complains about const-ness, you will want to either use this cast instead or
wrap the other cast around this cast. An example:
const int *a;
static_cast<void *>(a); <-- This will fail.
To remedy the above, you would might try this:
const int *a;
const_cast<void *>(a); <-- But this will still fail.
The real solution is this:
const int *a;
static_cast<void *>(const_cast<int *>(a));
It is not recommended to use const_cast on the this variable within a member
function of a class that is declared const. Instead you should use the mutable
keyword on the variable in the class's definition.
dynamic_cast
------------
This cast can only be used on pointers or references to classes. It can cast a
derived class to a base class, a derived class to another derived class
(provided that both are children of the same base class), or a base class to a
derived class. You can also use this to cast a class to void *. This cast is
done at run-time as opposed to the other casts, and relies on C++'s RTTI to be
enabled. It is meant to be used on polymorphic classes, so use static_cast on
non-polymorphic classes.
derived-to-base conversions are actually done statically, so you use either
dynamic_cast or static_cast on them, regardless of if the classes are
polymorphic or not.
derived-to-derived or base-to-derived conversions, however, rely on run-time
type information, and this cast is used on those classes that are polymorphic.
This is safer than C-style casting in that an invalid pointer conversion will
return a NULL pointer, and an invalid reference conversion will throw a
Bad_cast exception.
reinterpret_cast
----------------
This cast I would use only as a last resort if static_cast isn't allowed on a
conversion. It allows for conversions between two unrelated types, such as
going from char * to int *. It can also be used to convert a pointer to an
integral type and vica versa. The sites I've read mention how the result is
non-portable, which I assume means the resulting object code is non-portable,
so since the code is compiled on many systems anyways, I don't see this as
being a huge issue. It is recommended to only use this if necessary, though.
Links
=====
The following links are web sites I've used to get this information, and might
describe some of the above a bit better than I have. :P
http://www.acm.org/crossroads/xrds3-1/ovp3-1.html
http://www.cplusplus.com/doc/tutorial/typecasting.html
http://www.codeguru.com/forum/showthread.php?t=312456
http://www.cs.umd.edu/class/sum2003/cmsc311/Notes/BitOp/cast.html
http://msdn.microsoft.com/en-us/library/5f6c9f8h(VS.80).aspx
http://en.wikibooks.org/wiki/C%2B%2B_Programming/Type_Casting
http://www.informit.com/guides/content.aspx?g=cplusplus&seqNum=134
-- CyberBotX, Nov 23, 2008
-15
View File
@@ -1,15 +0,0 @@
# We only need to install these docs on Windows as most Windows installations will be binary, not source
if(WIN32)
# Only install given files from this directory
# NOTE: I would've had this just find all files in the directory, but that would include files not needed (like this file)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/README ${CMAKE_CURRENT_BINARY_DIR}/README.txt)
if(IN_SOURCE)
# Add README.txt to list of files for CPack to ignore
add_to_cpack_ignored_files("README.txt$" TRUE)
endif(IN_SOURCE)
set(DOCS DEFCON FAQ INSTALL MODULES NEWS OLDCHANGES PROXY ${CMAKE_CURRENT_BINARY_DIR}/README.txt WIN32.txt)
install(FILES ${DOCS}
DESTINATION docs
)
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${CMAKE_CURRENT_BINARY_DIR}/README.txt")
endif(WIN32)
+10 -30
View File
@@ -6,7 +6,7 @@ Anope Installation Instructions
3) Setting up the IRCd
4) Starting Anope
5) Setting up a crontab
Note: You should also read the README and FAQ files!
1) Installing Anope
@@ -21,35 +21,15 @@ Note: You should also read the README and FAQ files!
http://www.anope.org/
Anope can be built one of two ways. The recommended way is to use CMake.
You can check if CMake is already installed on your system using the
command:
cmake --version
If it's installed, you will get a line that says something similar to
"cmake version 2.6-patch 1". If the version is less than 2.4 or you get
an error saying the command was not found, you will not be able to use
CMake unless you install it yourself into your home directory. CMake
can be downloaded from:
http://www.cmake.org/cmake/resources/software.html
If you are unable to install CMake yourself (either due to lack of space
or restrictions by your hosting provider), you still have the alternative
to use the provided configure script. This option is not recommended and
will eventually be phased out, but is provided for compatibility for those
lacking CMake.
Next, unpack the package in your home directory, and go into the created
directory.
Now type ./Config to start the configuration script. It will ask you a
few questions, and figure out how to compile Anope on your system. If
you are unsure about the answer to a question, use the default value.
The question to using configure or cmake depends on your decision from
above. If you have CMake and wish to use it, answer with cmake, otherwise
answer with configure.
you are unsure about the answer to a question, use the default value.
NOTE: although you may specify different binary and data paths, it is
RECOMMENDED that you use the same value for both.
You can now type make to compile Anope. If there are errors in the
Makefile, *try to use gmake* instead. If it still doesn't work, you (or
@@ -64,10 +44,10 @@ Note: You should also read the README and FAQ files!
the memos of any user.
If you see errors during this process, please mail us with the *complete*
error output, and don't forget to mention your OS, compiler and C++ library
versions.
error output, and don't forget to mention your OS, compiler and C library
versions.
Now go into the data directory (by default, ~/services/data). Copy the example
Now go into the data directory (by default, ~/services). Copy the example
configuration file (example.conf) to services.conf, and open the latter
with your favorite text editor. It contains all the configuration
directives Anope will use at startup. Read the instructions contained in
@@ -157,7 +137,7 @@ Note: You should also read the README and FAQ files!
If you're unable to get a link with your IRCd after reading this section,
you might try the interactive link maker, which is located at:
http://anope.org/~heinz/ilm.php
http://anope.org/ilm.php
4) Starting Anope
@@ -166,7 +146,7 @@ Note: You should also read the README and FAQ files!
If there are syntax errors in the configuration file they will be
displayed on the screen. Correct them until there are no errors anymore.
A successful startup won't generate any message.
A successful startup won't generate any message.
Give Services at least one minute to link to your network, as certain
IRCds on some OSes may be really slow for the link process. If nothing
+5
View File
@@ -446,6 +446,11 @@ How To Add IRCd Support
Contact the anope Dev Team if this is the case.
Set to 0 if CIDR's are not supported by your IRCd.
88) Throttle Mode: The IRCd has a channelmode for throttling joins per-user.
Use 1 for yes, 0 for no.
89) CMode j: CMODE_ that defines throttle mode. Use 0 for no support.
So we've had this long list. Now there's a second struct to fill. This
struct isn't as long as the previous one though, so we'll handle it quite
quick compared to the previous one.
+1 -85
View File
@@ -1,4 +1,4 @@
Highlighted News in Anope 1.7 (and soon 1.8)
Highlighted News in Anope 1.8
============================================
* Added a new and improved ./Config script.
* Added MySQL phase 2 implementation (see docs/MYSQL).
@@ -45,91 +45,7 @@ Highlighted News in Anope 1.7 (and soon 1.8)
to be saved incorrectly. Note that this breaks backwards
compatibility on nick.db !!!
Highlighted News in Anope 1.6
=============================
* Fixed various exploits and vulnerabilities.
* Fixed various language typos and inconsistencies.
* Improved ignore system.
* Improved ./configure script.
* Removed all compile warning fixed.
* Converted HelpServ into a proper service.
* Added external module support.
* Added Defense Condition (DEFCON) System.
* Added MySQL support for mirroring databases.
* Added multi-server configuration.
* Added multi-domain /OS GLOBAL support.
* Added combined +oq +oa +ha +va on net-joins.
* Added support for ircd changes and upgrades.
* Added HostSetters configuration directive.
* Added /OS STAFF command.
* Added /OS SVSNICK command.
* Added /OS CHANKILL command.
* Added /MS STAFF command.
* Added /NS UPDATE command.
* Added /MS SENDALL command.
* Added /NS GETMAIL command.
* Added /HS DELALL command.
* Added /HS LIST command with pattern matching.
* New support scripts and tools.
* New ircd support, complete list: DreamForge 4.6.7, Bahamut 1.4.27,
UnrealIRCd 3.1.1, UltimateIRCd 2.8.2,
UltimateIRCd 3.0.0, Hybrid IRCd 7.0
ViagraIRCd 1.3.x, PTlink 6.15.0
* New Language files, complete list: cat.l, de.l, en_us.l, es.l, fr.l,
gr.l, it.l, nl.l, pt.l, ru.l, tr.l
Highlighted News in Anope 1.4
=============================
After the change from Epona to Anope
------------------------------------
* New Italian Language file
* Added support for UltimateIRCd 3.0 and later
* Services realtime logging to a channel
* SuperAdmin directive for access to "super" commands.
* Ban system is now exception aware.
* HostServ for hostname masquerading.
* Smarter XOP System.
* Email verification/handshake upon registration.
* Services can now /ignore users.
* Smarter memo notification for channels.
* Channel can be SUSPENDed instead of FORBIDen.
Before the change from Epona to Anope
-------------------------------------
* HostServ for networks that support them.
* UnrealIRCd support has been rewritten, it is now fully
working (hopefully) and officially supported again.
* Added support for UltimateIRCd 2.8.2 and later.
* A multi-threaded proxy detector that can scan Wingates,
SOCKS 4/5 and HTTP proxies on ports 3128 and 8080. Don't use
it if you have not been authorized to use it by your system
administrator!
* The ChanServ AOP/SOP/VOP commands, and, on networks that
support halfops, the HOP command, have been added. They
allow a more user-friendly control of channel privileges.
* Use of services IDs that allow an user to be automatically
identified after a split (if he was identified before the split)
in a secure way. This also saves lots of bandwidth.
* Services' default language can now be set in services.conf.
* The OperServ RANDOMNEWS command provides an easy way to show
network news in a random manner without flooding your users
with them (one news per connection).
* The BotServ SET PRIVATE option allows services admins to
make the bot usable by IRC operators only.
* The OperServ SQLINE command allows you to forbid nick masks
and even channel masks with the latest Bahamut.
* The ChanServ AKICK STICK command allows akicks to be permanently
kept on channel.
* The ChanServ SET TOPIC command has been renamed to TOPIC, and
a new BAN command has been added. They both have their own
associated levels.
* A SET PEACE command has been added to ChanServ. It prevents
users to use pejorative services commands (DEOP, KICK, ...)
on users with greater or equal levels.
Networks using Bahamut must upgrade to Bahamut 1.4.27 or later,
while networks using UnrealIRCd must upgrade to Unreal 3.1.1.
For the full changes, see the Changes file.
-1210
View File
File diff suppressed because it is too large Load Diff
+139
View File
@@ -0,0 +1,139 @@
Highlighted News in Anope 1.7 (and soon 1.8)
============================================
* Added a new and improved ./Config script.
* Added MySQL phase 2 implementation (see docs/MYSQL).
* Added NickServ registration delays.
* Added read receipts for memos.
* Added a way for modules to store data with internal structures.
* Added nick tracking support.
* Added support for SVSHOLD.
* Added support for U:Lined servers.
* Added support for TS6 IRCd's.
* Added support for Windows.
* Added internal events for modules.
* Added a way to suspend nicks.
* Added support for module configuration directives.
* Added translation support for modules.
* Added a module pack with handy modules.
* Added IRCd protocol modules.
* Added support for new IRCd's. Currently supported:
- Bahamut 1.4.27 or later (including 1.8)
- Charybdis 1.0 or later
- DreamForge 4.6.7
- Hybrid 7 or later
- InspIRCd 1.0 or later (including 1.1)
- Plexus 2.0 or later (including 3.0)
- PTLink 6.15 or later
- RageIRCd 2.0 or later
- Ratbox 2.0.6 or later
- ShadowIRCd 4.0 beta 7 or later
- Solid IRCd 3.4.6 or later
- UltimateIRCd 2.8.2 or later (including 3.0)
- UnrealIRCd 3.1.1 or later (including 3.2)
- ViagraIRCd 1.3 or later
* Added new languages. Currently included:
Catalan, German, English, Spanish, French, Greek,
Hungarian, Italian, Dutch, Polish, Portugese,
Russian, Turkish
* Added support for CIDR channel lists.
* Converted the core to be completely modular.
* Improved random number algorithm.
* Removed proxy detector (see docs/PROXY).
* Fixed various exploits and vulnerabilities.
* Fixed various language typos and inconsistencies.
* Fixed a bug in the database system causing nickserv passwords
to be saved incorrectly. Note that this breaks backwards
compatibility on nick.db !!!
Highlighted News in Anope 1.6
=============================
* Fixed various exploits and vulnerabilities.
* Fixed various language typos and inconsistencies.
* Improved ignore system.
* Improved ./configure script.
* Removed all compile warning fixed.
* Converted HelpServ into a proper service.
* Added external module support.
* Added Defense Condition (DEFCON) System.
* Added MySQL support for mirroring databases.
* Added multi-server configuration.
* Added multi-domain /OS GLOBAL support.
* Added combined +oq +oa +ha +va on net-joins.
* Added support for ircd changes and upgrades.
* Added HostSetters configuration directive.
* Added /OS STAFF command.
* Added /OS SVSNICK command.
* Added /OS CHANKILL command.
* Added /MS STAFF command.
* Added /NS UPDATE command.
* Added /MS SENDALL command.
* Added /NS GETMAIL command.
* Added /HS DELALL command.
* Added /HS LIST command with pattern matching.
* New support scripts and tools.
* New ircd support, complete list: DreamForge 4.6.7, Bahamut 1.4.27,
UnrealIRCd 3.1.1, UltimateIRCd 2.8.2,
UltimateIRCd 3.0.0, Hybrid IRCd 7.0
ViagraIRCd 1.3.x, PTlink 6.15.0
* New Language files, complete list: cat.l, de.l, en_us.l, es.l, fr.l,
gr.l, it.l, nl.l, pt.l, ru.l, tr.l
Highlighted News in Anope 1.4
=============================
After the change from Epona to Anope
------------------------------------
* New Italian Language file
* Added support for UltimateIRCd 3.0 and later
* Services realtime logging to a channel
* SuperAdmin directive for access to "super" commands.
* Ban system is now exception aware.
* HostServ for hostname masquerading.
* Smarter XOP System.
* Email verification/handshake upon registration.
* Services can now /ignore users.
* Smarter memo notification for channels.
* Channel can be SUSPENDed instead of FORBIDen.
Before the change from Epona to Anope
-------------------------------------
* HostServ for networks that support them.
* UnrealIRCd support has been rewritten, it is now fully
working (hopefully) and officially supported again.
* Added support for UltimateIRCd 2.8.2 and later.
* A multi-threaded proxy detector that can scan Wingates,
SOCKS 4/5 and HTTP proxies on ports 3128 and 8080. Don't use
it if you have not been authorized to use it by your system
administrator!
* The ChanServ AOP/SOP/VOP commands, and, on networks that
support halfops, the HOP command, have been added. They
allow a more user-friendly control of channel privileges.
* Use of services IDs that allow an user to be automatically
identified after a split (if he was identified before the split)
in a secure way. This also saves lots of bandwidth.
* Services' default language can now be set in services.conf.
* The OperServ RANDOMNEWS command provides an easy way to show
network news in a random manner without flooding your users
with them (one news per connection).
* The BotServ SET PRIVATE option allows services admins to
make the bot usable by IRC operators only.
* The OperServ SQLINE command allows you to forbid nick masks
and even channel masks with the latest Bahamut.
* The ChanServ AKICK STICK command allows akicks to be permanently
kept on channel.
* The ChanServ SET TOPIC command has been renamed to TOPIC, and
a new BAN command has been added. They both have their own
associated levels.
* A SET PEACE command has been added to ChanServ. It prevents
users to use pejorative services commands (DEOP, KICK, ...)
on users with greater or equal levels.
Networks using Bahamut must upgrade to Bahamut 1.4.27 or later,
while networks using UnrealIRCd must upgrade to Unreal 3.1.1.
For the full changes, see the Changes file.
For announcements and discussions about Anope, please visit our
web site http://www.anope.org
+379 -377
View File
@@ -1,377 +1,379 @@
Anope -- a set of IRC services for IRC networks
-----------------------------------------------
Anope is 2003-2008 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>
* 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>
* 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.
* HelpServ, a skeleton service used to serve help files.
Anope currently works with:
* Bahamut 1.4.27 or later (including 1.8)
* Charybdis 1.0 or later
* DreamForge 4.6.7
* Hybrid 7 or later
* InspIRCd 1.0 or later (including 1.1)
* Plexus 2.0 or later (including 3.0)
* PTlink 6.15 or later
* RageIRCd 2.0 beta-6 or later
* Ratbox 2.0.6 or later
* ShadowIRCd 4.0 beta 7 or later
* Solid IRCd 3.4.6 or later
* UltimateIRCd 2.8.2 or later (including 3.0)
* UnrealIRCd 3.1.1 or later (including 3.2)
* ViagraIRCd 1.3 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.
Anope will then use the defaults specified in the services.conf file, and
connect to the specified uplink server. Alternatively, any of the
following command-line options can be specified to change the default
values:
-remote server[:port] Connect to the specified server
-local host -or- Connect from the specified address (e.g. for
[host]:[port] multihomed servers)
-name servername Our server name (e.g. services.some.net)
-desc string Description of us (e.g. SomeNet Services)
-user username Username for Services' nicks (e.g. services)
-host hostname Hostname for Services' nicks (e.g. esper.net)
-dir directory Directory containing Services' data files
(e.g. /usr/local/lib/services)
-log filename Services log filename (e.g. services.log)
-update secs How often to update databases (in seconds)
-expire secs How often to check for nick/channel
expiration (in seconds)
Additionally, the following command-line options can be used to modify
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, .db files and log not written
-skeleton Enable skeleton mode; like read-only mode, but only
OperServ is available
-nofork Do not fork after startup; log messages will be
written to terminal (as well as to the log file
if not in read-only mode)
-forceload Try to load as much of the databases as possible,
even if errors are encountered
-noexpire Expiration routines won't be run at all
-logchan Startup with logchan enabled
-version Display the version of Anope
-nothird Do not load the modules specified in ModulesAutoload
or ModulesDelayedAutoload in the config file
-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, open its
logfile, 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).
If Anope is run with the "-skeleton" command-line option, it will not try
to load the nickname or channel databases, and will respond with "service
is inactive" messages to any commands sent to NickServ, ChanServ,
MemoServ or BotServ. This can be useful as an emergency stopgap measure
when the main copy of Anope cannot be started.
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 the -debug option more than once, 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 particular, at debug level 4 a message is written to the log for
every character received from the server). 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.
The "-forceload" option is provided to attempt recovery of data from
corrupted or truncated databases. Normally, if Anope encounters an error
writing to a database file, it will attempt to restore the original
version of the file and report an error to the logfile and through
WALLOPS. However, if this should fail (which normally should not happen),
or if Anope is terminated abruptly e.g. by kill -9 or a power failure,
then one or more of the databases may be corrupt. Normally, this will
cause Anope to abort the next time you try to run it; however, if yo
give the -forceload option to Anope, it will instead read as much as it
can, then skip to the next database. For obvious reasons, it's highly
recommended to keep backup copies of your databases in case something
does happen (since Anope will stop at the first error in a database, even
with -forceload, meaning you lose any data after that).
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-2009 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.
* HelpServ, a skeleton service used to serve help files.
Anope currently works with:
* Bahamut 1.4.27 or later (including 1.8)
* Charybdis 1.0 or later
* DreamForge 4.6.7
* Hybrid 7 or later
* InspIRCd 1.0 or later (including 1.1)
* Plexus 2.0 or later (including 3.0)
* PTlink 6.15 or later
* RageIRCd 2.0 beta-6 or later
* Ratbox 2.0.6 or later
* ShadowIRCd 4.0 beta 7 or later
* Solid IRCd 3.4.6 or later
* UltimateIRCd 2.8.2 or later (including 3.0)
* UnrealIRCd 3.1.1 or later (including 3.2)
* ViagraIRCd 1.3 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.
Anope will then use the defaults specified in the services.conf file, and
connect to the specified uplink server. Alternatively, any of the
following command-line options can be specified to change the default
values:
-remote server[:port] Connect to the specified server
-local host -or- Connect from the specified address (e.g. for
[host]:[port] multihomed servers)
-name servername Our server name (e.g. services.some.net)
-desc string Description of us (e.g. SomeNet Services)
-user username Username for Services' nicks (e.g. services)
-host hostname Hostname for Services' nicks (e.g. esper.net)
-dir directory Directory containing Services' data files
(e.g. /usr/local/lib/services)
-log filename Services log filename (e.g. services.log)
-update secs How often to update databases (in seconds)
-expire secs How often to check for nick/channel
expiration (in seconds)
Additionally, the following command-line options can be used to modify
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, .db files and log not written
-skeleton Enable skeleton mode; like read-only mode, but only
OperServ is available
-nofork Do not fork after startup; log messages will be
written to terminal (as well as to the log file
if not in read-only mode)
-forceload Try to load as much of the databases as possible,
even if errors are encountered
-noexpire Expiration routines won't be run at all
-logchan Startup with logchan enabled
-version Display the version of Anope
-nothird Do not load the modules specified in ModulesAutoload
or ModulesDelayedAutoload in the config file
-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, open its
logfile, 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).
If Anope is run with the "-skeleton" command-line option, it will not try
to load the nickname or channel databases, and will respond with "service
is inactive" messages to any commands sent to NickServ, ChanServ,
MemoServ or BotServ. This can be useful as an emergency stopgap measure
when the main copy of Anope cannot be started.
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 the -debug option more than once, 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 particular, at debug level 4 a message is written to the log for
every character received from the server). 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.
The "-forceload" option is provided to attempt recovery of data from
corrupted or truncated databases. Normally, if Anope encounters an error
writing to a database file, it will attempt to restore the original
version of the file and report an error to the logfile and through
WALLOPS. However, if this should fail (which normally should not happen),
or if Anope is terminated abruptly e.g. by kill -9 or a power failure,
then one or more of the databases may be corrupt. Normally, this will
cause Anope to abort the next time you try to run it; however, if yo
give the -forceload option to Anope, it will instead read as much as it
can, then skip to the next database. For obvious reasons, it's highly
recommended to keep backup copies of your databases in case something
does happen (since Anope will stop at the first error in a database, even
with -forceload, meaning you lose any data after that).
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. :)
+209 -223
View File
@@ -1,223 +1,209 @@
Anope for Windows
-----------------
1) Building the Source
2) Installation
3) Compiling Modules
4) Other compile options
5) Credits
1) Building the Source
NOTE: If you have downloaded one of the pre-compiled installers, you do
NOT need to complete this step, and you can proceed to step 2.
If you want to build Anope from source on a Win32 system, you will need
to follow this instructions:
1) Download the required files:
* Current Anope source:
http://sourceforge.net/project/showfiles.php?group_id=94081
* CMake:
http://www.cmake.org/cmake/resources/software.html
(NOTE: When installing, tell CMake to add itself to the PATH.)
If you have Visual C++ 6, 7 (.NET 2002/2003), 8 (2005), or 9 (2008) skip ahead to step 2, else you
need to download the following free components from Microsoft. Once
downloaded, install these packages.
* Microsoft Visual C++ 2008 Express Edition:
http://www.microsoft.com/express/vc/
or
* Microsoft Visual C++ 2005 Express Edition:
http://www.microsoft.com/downloads/details.aspx?FamilyId=7B0B0339-613A-46E6-AB4D-080D4D4A8C4E&displaylang=en
then download and install:
* Microsoft Windows 2008 SDK:
http://www.microsoft.com/downloads/details.aspx?FamilyId=E6E1C3DF-A74F-4207-8586-711EBE331CDC&displaylang=en
or (if you prefer a smaller download)
* Microsoft Windows 2003 Platform SDK: (Requires WGA validation)
http://www.microsoft.com/downloads/details.aspx?FamilyId=0BAF2B35-C656-4969-ACE8-E4C0C0716ADB&displaylang=en
(NOTE: Although they say for Windows Server 2003 or 2008, they do infact work on all supported
versions of Windows. When installing the 2003 SDK, you should select the Custom option, and only select
to have the Microsoft Windows Core SDK installed. When installing the 2008 SDK, you should select the
Custom option, and only select to have the Developer Tools installed, but also expand that and deselect
the Visual C++ Compilers as well as the Mobile Tools. Doing this will decrease the install time as well
as the space used by the SDK.)
If you chose to download the 2003 SDK, it will not work out-of-the-box on either Visual C++ 2005 Express or
Visual C++ 2008 Express. The 2008 SDK will work out-of-the-box with Visual C++ 2008 Express but not with
Visual C++ 2005 Express.
2) Unpack the Anope tarball with your favorite uncompression program
(WinZip or WinRAR, etc).
3) (Note before this step: If you fall under one of the situations at the end of Step 1 where it says that the
SDK will not work out of the box, do not bring up the Visual C++ Command Prompt by using the link in
the Windows Start Menu. Instead, edit vsvars32.bat in the directory where you unpacked the source code
in step 2, so the first line that says "@SET VSINSTALLDIR=<whatever>" has the directory where you installed
Visual C++ Express to, if different from the default. Save the file and then run it instead.)
Bring up the Visual C++ Command Prompt; This will launch a
DOS Command Prompt like window, which will set the environment
properties needed to make Anope.
Create a new directory, which will be used to hold the build files. You can make it
be a directory under the source directory unpacked in step 2, or somewhere else entirely.
Change directories to this new folder, by typing:
cd <path to build directory>
e.g.
cd c:\anope-build
4) You now need to configure Anope to your requirements. At the prompt type:
<path to source directory>\Config.bat
NOTE: If you run an Anti-Virus program such as McAfee or Norton, you may
be unable to run this command due to the protection in place. Some Anti-
Virus programs may detect the Anope Configuration Tool as a worm, however
this is not the case. If you are prompted to allow or deny execution of
the script, you should choose allow. If the script fails to run, and no
notice is displayed, please check your Anti-Virus settings before seeking
assistance.
An interactive configuration program should guide you through the install
options. You will be given a choice to use NMake or not. NMake will compile
inside the command prompt window you are in. If you want to build within
the Visual C++ IDE, say no to that option, and it'll create a Solution for
you to open up.
If you cannot find whats causing the error, please visit our forums or
our IRC Support channel for assistance.
5) You are now ready to compile. If you said you wanted to use NMake in step 4,
at the prompt type:
nmake
Once you are back at the command prompt again, if there have been no
errors, you are ready to go.
If instead you decided to use the Visual C++ IDE, open up the Anope.sln
file. After the IDE has fully loaded, hit F7 to build everything.
Should you encounter errors with the installation process, check the
messages displayed for advice on resolving them. If you are unable to
resolve the issues yourself, seek assistance on our forums or in our
IRC Support channel.
6) Finally you will need to install Anope. If you said you wanted to use NMake
in step 4, at the prompt type:
nmake install
Otherwise, if you decided to use the Visual C++ IDE, find the project called
INSTALL within the Solution Explorer. Right-click on INSTALL and choose Build.
When you have done this, all the files will be installed to where they belong.
The only thing you need to do is rename "data/example.conf" to be "data/services.conf",
and then follow the steps to set up Anope.
You have now completed the building phase of Anope for Windows. You can
now move on to the next section, which is related to setting up Anope.
2) Installation
Since Anope for Windows does not use a visual interface, you must do the
configuration with a text editor before proceeding with running Anope
itself.
NOTE: You may need to open the configuration file with Wordpad, or a text
editor which supports UNIX line endings. Opening the configuration file in
Notepad will cause strange characters to appear, and you may not be able to
edit the file correctly.
Open services.conf, and read through it carefully and adjust the settings
you think you need to adjust. Pay special attention to these settings:
A) IRCDModule: This is the name of an IRCd Module that Anope will use
to communicate with your server. Anope supports 15 IRCds,
so ensure you set the right value here.
B) RemoteServer: This is the address to your ircd, along with the port
and password. You should consult your ircd
documentation on how to link ircds.
C) ServicesRoot: Remove the # and change the names to your nick so you
can take control of services once they are online.
D) UserKey1/2/3: Remove the # infront of the three UserKey settings, and
change the parameters to numbers; around 6-7 digits will
do.
If you are unsure of the settings, you can go to the dos command prompt
and run "anope.exe -nofork -debug" and watch the information as it
attempts to connect.
You can launch services in two ways. If you are sure that the entered
configuration information is correct, simply double clicking the Anope
executable will cause it to start; no window will pop up. If you'd rather
have a more textual output, you can start at the dos prompt and type in
"anope.exe". If services are successfully started up the dos prompt will
seem to hang; at this point you can safely close the dos window.
3) Compiling Modules
If you want to build other modules than the ones shipped by default, you
will need to modify the Makefile.inc.win32 file, in the src\modules folder.
A) Add modules; find the line stating "SRCS=" and add the name of the
file to the end of the line. So if you have two files:
SRCS=file.c file2.c
If you are compiling a folder of module components, such as the example
"catserv", you will need to add/change the "SUBS=" line. If you were
compiling the "catserv" example, the line would look like this:
SUBS=catserv
B) When you've done this, use the same command prompt you set up in part
1, change directories to the src\modules folder, and type:
nmake -f Makefile.win32
followed afterwards, by:
nmake -f Makefile.win32 install
C) You should now be able to load your modules on IRC via OperServ, or via
the services.conf file.
4) Other compile options
A) If you have trouble recompiling Anope, you should delete all files and folders
within the build folder you created in step 3 of section 1. Afterwards, follow
the directions from step 4 of section 1 down.
5) Credits
Anope is based on Epona and IRCServices. See CREDITS for more credits and
a complete list of all developers.
Anope's Windows-specific code is provided by:
* Dominick Meglio <codemastr@unrealircd.com>
* Trystan Scott Lee <trystan@nomadirc.net>
* Chris Hogben <heinz@anope.org>
Anope's Windows Installer was made using:
* NSIS 2.20 <http://nsis.sourceforge.net>
Anope for Windows
-----------------
1) Building the Source
2) Installation
3) Compiling Modules
4) Other compile options
5) Credits
1) Building the Source
NOTE: If you have downloaded one of the pre-compiled installers, you do
NOT need to complete this step, and you can proceed to step 2.
If you want to build Anope from source on a Win32 system, you will need
to follow this instructions:
1) Download the required files:
* Current Anope source:
http://sourceforge.net/project/showfiles.php?group_id=94081
If you have Visual C++ 6, 7 (.NET 2002/2003) or 8 (2005) skip ahead to step 2, else you
need to download the following free components from Microsoft. Once
downloaded, install these packages.
* Microsoft Visual C++ 2008 Express Edition:
http://www.microsoft.com/express/vc/
or
* Microsoft Visual C++ 2005 Express Edition:
http://msdn.microsoft.com/vstudio/express/visualc/download/
then download and install:
* Microsoft Windows PlatformSDK: (Requires WGA validation)
http://www.microsoft.com/downloads/details.aspx?FamilyId=0BAF2B35-C656-4969-ACE8-E4C0C0716ADB&displaylang=en
(NOTE: Although this says for Windows Server 2003, it does infact work on all supported
versions of Windows. When installing, you should select the Custom option, and ensure
that only the top selection, and the bottom selection are checked. This will cut down
install time dramatically)
* MySQL for Windows (only needed if building with MySQL enabled):
http://dev.mysql.com/
(NOTE: Anope can be compiled against MySQL Version 3.23 and above)
2) Unpack the Anope tarball with your favorite uncompression program
(WinZip or WinRAR, etc).
3) Bring up the Visual C++ Command Prompt; This will launch a
DOS Command Prompt like window, which will set the environment
properties needed to make Anope.
Change directories to where you unpacked the source code in step 2, by typing:
cd <path to extracted source>
e.g.
cd c:\anope-trunk
4) You now need to configure Anope to your requirements. At the prompt type:
Config.bat
NOTE: If you run an Anti-Virus program such as McAfee or Norton, you may
be unable to run this command due to the protection in place. Some Anti-
Virus programs may detect the Anope Configuration Tool as a worm, however
this is not the case. If you are prompted to allow or deny execution of
the script, you should choose allow. If the script fails to run, and no
notice is displayed, please check your Anti-Virus settings before seeking
assistance.
An interactive configuration program should guide you through the install
options, and then detect your Microsoft Visual C++ Library files. If it
fails to detect them, you should check you have everything installed.
If you cannot find whats causing the error, please visit our forums or
our IRC Support channel for assistance.
5) You are now ready to compile. At the prompt type:
nmake -f Makefile.win32
Once you are back at the command prompt again, if there have been no
errors, you are ready to go.
Should you encounter errors with the installation process, check the
messages displayed for advice on resolving them. If you are unable to
resolve the issues yourself, seek assistance on our forums or in our
IRC Support channel.
6) Anope will install the files where they belong. The only thing you need
to do is rename "data/example.conf" to be "data/services.conf".
You have now completed the building phase of Anope for Windows. You can
now move on to the next section, which is related to setting up Anope.
2) Installation
Since Anope for Windows does not use a visual interface, you must do the
configuration with a text editor before proceeding with running Anope
itself.
NOTE: You may need to open the configuration file with Wordpad, or a text
editor which supports UNIX line endings. Opening the configuration file in
Notepad will cause strange characters to appear, and you may not be able to
edit the file correctly.
Open services.conf, and read through it carefully and adjust the settings
you think you need to adjust. Pay special attention to these settings:
A) IRCDModule: This is the name of an IRCd Module that Anope will use
to communicate with your server. Anope supports 15 IRCds,
so ensure you set the right value here.
B) RemoteServer: This is the address to your ircd, along with the port
and password. You should consult your ircd
documentation on how to link ircds.
C) ServicesRoot: Remove the # and change the names to your nick so you
can take control of services once they are online.
D) UserKey1/2/3: Remove the # infront of the three UserKey settings, and
change the parameters to numbers; around 6-7 digits will
do.
If you are unsure of the settings, you can go to the dos command prompt
and run "anope.exe -nofork -debug" and watch the information as it
attempts to connect.
You can launch services in two ways. If you are sure that the entered
configuration information is correct, simply double clicking the Anope
executable will cause it to start; no window will pop up. If you'd rather
have a more textual output, you can start at the dos prompt and type in
"anope.exe". If services are successfully started up the dos prompt will
seem to hang; at this point you can safely close the dos window.
3) Compiling Modules
If you want to build other modules than the ones shipped by default, you
will need to modify the Makefile.inc.win32 file, in the src\modules folder.
A) Add modules; find the line stating "SRCS=" and add the name of the
file to the end of the line. So if you have two files:
SRCS=file.c file2.c
If you are compiling a folder of module components, such as the example
"catserv", you will need to add/change the "SUBS=" line. If you were
compiling the "catserv" example, the line would look like this:
SUBS=catserv
B) When you've done this, use the same command prompt you set up in part
1, change directories to the src\modules folder, and type:
nmake -f Makefile.win32
followed afterwards, by:
nmake -f Makefile.win32 install
C) You should now be able to load your modules on IRC via OperServ, or via
the services.conf file.
4) Other compile options
A) If you have trouble recompiling Anope, you should try:
nmake -f Makefile.win32 distclean
This will clean up the source directory and allow for chages to be applied
to previously compiled files.
B) A list of valid options are:
install
distclean
clean
spotless
all
core
protocols
mypasql
languages
modules
The syntax for these options is:
nmake -f Makefile.win32 [option]
5) Credits
Anope is based on Epona and IRCServices. See CREDITS for more credits and
a complete list of all developers.
Anope's Windows-specific code is provided by:
* Dominick Meglio <codemastr@unrealircd.com>
* Trystan Scott Lee <trystan@nomadirc.net>
* Chris Hogben <heinz@anope.org>
Anope's Windows Installer was made using:
* NSIS 2.20 <http://nsis.sourceforge.net>
-30
View File
@@ -1,30 +0,0 @@
# If we are building for Visual Studio OR if the system we are on doesn't have sh (which would be odd on a *nix system...), we'll build a C++ program to create version.h
if(MSVC OR NOT SH)
# Set version.sh.c to use C++ as well as set it's compile flags
set_source_files_properties(version.sh.c PROPERTIES LANGUAGE CXX COMPILE_FLAGS "${CXXFLAGS}")
# Generate version_sh executable to create version.h from the contents of version.sh, setting it's linker flags as well
add_executable(version_sh version.sh.c)
set_target_properties(version_sh PROPERTIES LINKER_LANGUAGE CXX LINK_FLAGS "${LDFLAGS}")
# Generate version.h from the above executable and the version.log file from the main source directory, with dependencies to the given headers and all source files in the main Anope build
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/version.h
COMMAND version_sh ${Anope_SOURCE_DIR}/version.log ${CMAKE_CURRENT_SOURCE_DIR}/version.sh ${CMAKE_CURRENT_BINARY_DIR}/version.h
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/version.sh DEPENDS version_sh ${CMAKE_CURRENT_SOURCE_DIR}/services.h ${CMAKE_CURRENT_SOURCE_DIR}/pseudo.h ${CMAKE_CURRENT_SOURCE_DIR}/messages.h ${SRC_SRCS}
)
# Add version_sh to list of files for CPack to ignore
get_target_property(version_sh_BINARY version_sh LOCATION)
get_filename_component(version_sh_BINARY ${version_sh_BINARY} NAME)
add_to_cpack_ignored_files("${version_sh_BINARY}$" TRUE)
# For any non-Visual Studio platforms that do have sh, we will run version.h through the version.h shell script
else(MSVC OR NOT SH)
# Generate version.h from version.sh and the version.log file from the main source directory, with dependencies to the given headers and all source files in the main Anope build
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/version.h
COMMAND ${SH} ${CMAKE_CURRENT_SOURCE_DIR}/version.sh ${Anope_SOURCE_DIR}/version.log ${CMAKE_CURRENT_BINARY_DIR}/version.h
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/version.sh DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/services.h ${CMAKE_CURRENT_SOURCE_DIR}/pseudo.h ${CMAKE_CURRENT_SOURCE_DIR}/messages.h ${SRC_SRCS}
)
endif(MSVC OR NOT SH)
# Add version.h to the list of files for CPack to ignore
add_to_cpack_ignored_files("version.h$" TRUE)
# Add a custom target to the above file
add_custom_target(headers DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/version.h)
+2 -2
View File
@@ -2,7 +2,7 @@
all: services.h extern.h pseudo.h version.h
version.h: Makefile version.sh services.h pseudo.h messages.h $(SRCS)
sh version.sh ../version.log $@
sh version.sh
services.h: sysconf.h config.h extern.h
touch $@
@@ -13,7 +13,7 @@ extern.h: slist.h
pseudo.h: commands.h timeout.h encrypt.h datafiles.h slist.h
touch $@
clean:
clean:
(rm -f language.h)
distclean: clean
-86
View File
@@ -1,86 +0,0 @@
/* NickServ nickname structures. */
/** XXX: this really needs to die with fire and be merged with metadata into NickCore or something.
*/
class NickRequest
{
public:
NickRequest()
{
next = prev = NULL;
nick = passcode = email = NULL;
*password = 0;
requested = lastmail = 0;
}
NickRequest *next, *prev;
char *nick;
char *passcode;
char password[PASSMAX];
char *email;
time_t requested;
time_t lastmail; /* Unsaved */
};
class NickCore;
class NickAlias
{
public:
NickAlias()
{
next = prev = NULL;
nick = last_quit = last_realname = last_usermask = NULL;
time_registered = last_seen = 0;
status = 0;
nc = NULL;
u = NULL;
}
NickAlias *next, *prev;
char *nick; /* Nickname */
char *last_quit; /* Last quit message */
char *last_realname; /* Last realname */
char *last_usermask; /* Last usermask */
time_t time_registered; /* When the nick was registered */
time_t last_seen; /* When it was seen online for the last time */
uint16 status; /* See NS_* below */
NickCore *nc; /* I'm an alias of this */
/* Not saved */
User *u; /* Current online user that has me */
};
class NickCore : public Extensible
{
public:
NickCore()
{
next = prev = NULL;
display = email = greet = url = NULL;
pass[0] = '\0';
icq = flags = 0;
language = accesscount = channelcount = 0;
lastmail = 0;
}
NickCore *next, *prev;
char *display; /* How the nick is displayed */
char pass[PASSMAX]; /* Password of the nicks */
char *email; /* E-mail associated to the nick */
char *greet; /* Greet associated to the nick */
uint32 icq; /* ICQ # associated to the nick */
char *url; /* URL associated to the nick */
uint32 flags; /* See NI_* below */
uint16 language; /* Language selected by nickname owner (LANG_*) */
uint16 accesscount; /* # of entries */
char **access; /* Array of strings */
MemoInfo memos;
uint16 channelcount; /* Number of channels currently registered */
/* Unsaved data */
time_t lastmail; /* Last time this nick record got a mail */
SList aliases; /* List of aliases */
};
-71
View File
@@ -1,71 +0,0 @@
/*
* Copyright (C) 2008-2009 Robin Burchell <w00t@inspircd.org>
* Copyright (C) 2008-2009 Anope Team <team@anope.org>
*
* Please read COPYING and README for further details.
*
*
* $Id$
*
*/
struct CommandHash;
class CoreExport BotInfo
{
public:
BotInfo *next, *prev;
std::string uid; /* required for UID supporting servers, as opposed to the shitty struct Uid. */
char *nick; /* Nickname of the bot */
char *user; /* Its user name */
char *host; /* Its hostname */
char *real; /* Its real name */
int16 flags; /* Bot flags -- see BI_* below */
time_t created; /* Birth date ;) */
int16 chancount; /* Number of channels that use the bot. */
/* Dynamic data */
time_t lastmsg; /* Last time we said something */
CommandHash **cmdTable;
/** Create a new bot.
* XXX: Note - this constructor is considered obsolete. Use the four parameter form.
* @param nick The nickname to assign to the bot.
*/
BotInfo(const char *nick);
/** Create a new bot.
* @param nick The nickname to assign to the bot.
* @param user The ident to give the bot.
* @param host The hostname to give the bot.
* @param real The realname to give the bot.
*/
BotInfo(const char *nick, const char *user, const char *host, const char *real);
/** Destroy a bot, clearing up appropriately.
*/
virtual ~BotInfo();
/** Change the nickname set on a bot.
* @param newnick The nick to change to
*/
void ChangeNick(const char *newnick);
/** Rejoins all channels that this bot is assigned to.
* Used on /kill, rename, etc.
*/
void RejoinAll();
/** Assign this bot to a given channel, removing the existing assigned bot if one exists.
* @param u The user assigning the bot, or NULL
* @param ci The channel registration to assign the bot to.
*/
void Assign(User *u, ChannelInfo *ci);
/** Remove this bot from a given channel.
* @param u The user requesting the unassign, or NULL.
* @param ci The channel registration to remove the bot from.
*/
void UnAssign(User *u, ChannelInfo *ci);
};
+7 -1
View File
@@ -21,8 +21,14 @@
*/
extern MDE Command *lookup_cmd(Command *list, char *name);
extern void run_cmd(char *service, User *u, Command *list,
char *name);
extern void help_cmd(char *service, User *u, Command *list,
char *name);
extern void do_run_cmd(char *service, User * u, Command *c,const char *cmd);
extern MDE void do_help_limited(char *service, User * u, Command * c);
extern void do_help_cmd(char *service, User * u, Command *c,const char *cmd);
extern MDE void mod_help_cmd(char *service, User *u, CommandHash *cmdTable[],const char *cmd);
extern MDE void mod_run_cmd(char *service, User *u, CommandHash *cmdTable[],const char *cmd);
extern MDE void do_help_limited(char *service, User * u, Command * c);
/*************************************************************************/
+4
View File
@@ -36,6 +36,10 @@
/* Define this to enable OperServ's svs commands (superadmin only). */
#define USE_OSSVS
/* Define this to enable OperServ's debugging commands (Services root
* only). These commands are undocumented; "use the source, Luke!" */
/* #define DEBUG_COMMANDS */
/******************* END OF USER-CONFIGURABLE SECTION ********************/
/* Size of input buffer (note: this is different from BUFSIZ)
-518
View File
@@ -1,518 +0,0 @@
#ifndef _CONFIGREADER_H_
#define _CONFIGREADER_H_
#include <string>
#include <fstream>
#include <sstream>
#include <vector>
#include <map>
#include <deque>
/** A configuration key and value pair
*/
typedef std::pair<std::string, std::string> KeyVal;
/** A list of related configuration keys and values
*/
typedef std::vector<KeyVal> KeyValList;
/** An entire config file, built up of KeyValLists
*/
typedef std::multimap<std::string, KeyValList> ConfigDataHash;
// Required forward definitions
class ServerConfig;
/** Types of data in the core config
*/
enum ConfigDataType {
DT_NOTHING, // No data
DT_INTEGER, // Integer
DT_UINTEGER, // Unsigned Integer
DT_LUINTEGER, // Long Unsigned Integer
DT_CHARPTR, // Char pointer
DT_STRING, // std::string
DT_BOOLEAN, // Boolean
DT_HOSTNAME, // Hostname syntax
DT_NOSPACES, // No spaces
DT_IPADDRESS, // IP address (v4, v6)
DT_TIME, // Time value
DT_NORELOAD = 32, // Item can't be reloaded after startup
DT_ALLOW_WILD = 64, // Allow wildcards/CIDR in DT_IPADDRESS
DT_ALLOW_NEWLINE = 128 // New line characters allowed in DT_CHARPTR
};
/** Holds a config value, either string, integer or boolean.
* Callback functions receive one or more of these, either on
* their own as a reference, or in a reference to a deque of them.
* The callback function can then alter the values of the ValueItem
* classes to validate the settings.
*/
class ValueItem
{
/** Actual data */
std::string v;
public:
/** Initialize with an int */
ValueItem(int);
/** Initialize with a bool */
ValueItem(bool);
/** Initialize with a char pointer */
ValueItem(const char *);
/** Initialize with an std::string */
ValueItem(const std::string &);
/** Change value to a char pointer */
//void Set(char *);
/** Change value to a const char pointer */
void Set(const char *);
/** Change value to an std::string */
void Set(const std::string &);
/** Change value to an int */
void Set(int);
/** Get value as an int */
int GetInteger();
/** Get value as a string */
char *GetString();
/** Get value as a bool */
bool GetBool();
};
/** The base class of the container 'ValueContainer'
* used internally by the core to hold core values.
*/
class ValueContainerBase
{
public:
/** Constructor */
ValueContainerBase() { }
/** Destructor */
virtual ~ValueContainerBase() { }
};
/** ValueContainer is used to contain pointers to different
* core values such as the server name, maximum number of
* clients etc.
* It is specialized to hold a data type, then pointed at
* a value in the ServerConfig class. When the value has been
* read and validated, the Set method is called to write the
* value safely in a type-safe manner.
*/
template<typename T> class ValueContainer : public ValueContainerBase
{
/** Contained item */
T val;
public:
/** Initialize with nothing */
ValueContainer() : ValueContainerBase(), val(NULL) { }
/** Initialize with a value of type T */
ValueContainer(T Val) : ValueContainerBase(), val(Val) { }
/** Initialize with a copy */
ValueContainer(const ValueContainer &Val) : ValueContainerBase(), val(Val.val) { }
ValueContainer &operator=(const ValueContainer &Val)
{
val = Val.val;
return *this;
}
/** Change value to type T of size s */
void Set(const T newval, size_t s)
{
memcpy(val, newval, s);
}
};
/** This a specific version of ValueContainer to handle character arrays specially
*/
template<> class ValueContainer<char **> : public ValueContainerBase
{
/** Contained item */
char **val;
public:
/** Initialize with nothing */
ValueContainer() : ValueContainerBase(), val(NULL) { }
/** Initialize with a value of type T */
ValueContainer(char **Val) : ValueContainerBase(), val(Val) { }
/** Initialize with a copy */
ValueContainer(const ValueContainer &Val) : ValueContainerBase(), val(Val.val) { }
ValueContainer &operator=(const ValueContainer &Val)
{
val = Val.val;
return *this;
}
/** Change value to type T of size s */
void Set(const char *newval, size_t s)
{
if (*val) delete [] *val;
if (!*newval) {
*val = NULL;
return;
}
*val = new char[s];
strlcpy(*val, newval, s);
}
};
/** This a specific version of ValueContainer to handle std::string specially
*/
template<> class ValueContainer<std::string *> : public ValueContainerBase
{
/** Contained item */
std::string *val;
public:
/** Initialize with nothing */
ValueContainer() : ValueContainerBase(), val(NULL) { }
/** Initialize with an std::string */
ValueContainer(std::string *Val) : ValueContainerBase(), val(Val) { }
/** Initialize with a copy */
ValueContainer(const ValueContainer &Val) : ValueContainerBase(), val(Val.val) { }
ValueContainer &operator=(const ValueContainer &Val)
{
val = Val.val;
return *this;
}
/** Change value to given std::string */
void Set(const std::string &newval)
{
*val = newval;
}
/** Change value to given char pointer */
void Set(const char *newval)
{
*val = newval;
}
};
/** A specialization of ValueContainer to hold a pointer to a bool
*/
typedef ValueContainer<bool *> ValueContainerBool;
/** A specialization of ValueContainer to hold a pointer to
* an unsigned int
*/
typedef ValueContainer<unsigned *> ValueContainerUInt;
/** A specialization of ValueContainer to hold a pointer to
* a long unsigned int
*/
typedef ValueContainer<long unsigned *> ValueContainerLUInt;
/** A specialization of ValueContainer to hold a pointer to
* a char array.
*/
typedef ValueContainer<char **> ValueContainerChar;
/** A specialization of ValueContainer to hold a pointer to
* an int
*/
typedef ValueContainer<int *> ValueContainerInt;
/** A specialization of ValueContainer to hold a pointer to
* a time_t
*/
typedef ValueContainer<time_t *> ValueContainerTime;
/** A specialization of ValueContainer to hold a pointer to
* an std::string
*/
typedef ValueContainer<std::string *> ValueContainerString;
/** A set of ValueItems used by multi-value validator functions
*/
typedef std::deque<ValueItem> ValueList;
/** A callback for validating a single value
*/
typedef bool (*Validator)(ServerConfig *, const char *, const char *, ValueItem &);
/** A callback for validating multiple value entries
*/
typedef bool (*MultiValidator)(ServerConfig *, const char *, const char **, ValueList &, int *, bool);
/** A callback indicating the end of a group of entries
*/
typedef bool (*MultiNotify)(ServerConfig *, const char *, bool);
/** Holds a core configuration item and its callbacks
*/
struct InitialConfig
{
/** Tag name */
const char *tag;
/** Value name */
const char *value;
/** Default, if not defined */
const char *default_value;
/** Value containers */
ValueContainerBase *val;
/** Data types */
int datatype;
/** Validation function */
Validator validation_function;
};
/** Holds a core configuration item and its callbacks
* where there may be more than one item
*/
struct MultiConfig
{
/** Tag name */
const char *tag;
/** One or more items within tag */
const char *items[17];
/** One or more defaults for items within tags */
const char *items_default[17];
/** One or more data types */
int datatype[17];
/** Initialization function */
MultiNotify init_function;
/** Validation function */
MultiValidator validation_function;
/** Completion function */
MultiNotify finish_function;
};
/** This class holds the bulk of the runtime configuration for the ircd.
* It allows for reading new config values, accessing configuration files,
* and storage of the configuration data needed to run the ircd, such as
* the servername, connect classes, /ADMIN data, MOTDs and filenames etc.
*/
class ServerConfig
{
private:
/** This variable holds the names of all
* files included from the main one. This
* is used to make sure that no files are
* recursively included.
*/
std::vector<std::string> include_stack;
/** Check that there is only one of each configuration item
*/
bool CheckOnce(const char *);
public:
std::ostringstream errstr;
ConfigDataHash newconfig;
/** This holds all the information in the config file,
* it's indexed by tag name to a vector of key/values.
*/
ConfigDataHash config_data;
/** Construct a new ServerConfig
*/
ServerConfig();
/** Clears the include stack in preperation for a Read() call.
*/
void ClearStack();
/** Read the entire configuration into memory
* and initialize this class. All other methods
* should be used only by the core.
*/
int Read(bool);
/** Report a configuration error given in errormessage.
* @param bail If this is set to true, the error is sent to the console, and the program exits
* @param connection If this is set to a non-null value, and bail is false, the errors are spooled to
* this connection as SNOTICEs.
* If the parameter is NULL, the messages are spooled to all connections via WriteOpers as SNOTICEs.
*/
void ReportConfigError(const std::string &, bool);
/** Load 'filename' into 'target', with the new config parser everything is parsed into
* tag/key/value at load-time rather than at read-value time.
*/
bool LoadConf(ConfigDataHash &, const char *, std::ostringstream &);
/** Load 'filename' into 'target', with the new config parser everything is parsed into
* tag/key/value at load-time rather than at read-value time.
*/
bool LoadConf(ConfigDataHash &, const std::string &, std::ostringstream &);
// Both these return true if the value existed or false otherwise
/** Writes 'length' chars into 'result' as a string
*/
bool ConfValue(ConfigDataHash &, const char *, const char *, int, char *, int, bool = false);
/** Writes 'length' chars into 'result' as a string
*/
bool ConfValue(ConfigDataHash &, const char *, const char *, const char *, int, char *, int, bool = false);
/** Writes 'length' chars into 'result' as a string
*/
bool ConfValue(ConfigDataHash &, const std::string &, const std::string &, int, std::string &, bool = false);
/** Writes 'length' chars into 'result' as a string
*/
bool ConfValue(ConfigDataHash &, const std::string &, const std::string &, const std::string &, int, std::string &, bool = false);
/** Tries to convert the value to an integer and write it to 'result'
*/
bool ConfValueInteger(ConfigDataHash &, const char *, const char *, int, int &);
/** Tries to convert the value to an integer and write it to 'result'
*/
bool ConfValueInteger(ConfigDataHash &, const char *, const char *, const char *, int, int &);
/** Tries to convert the value to an integer and write it to 'result'
*/
bool ConfValueInteger(ConfigDataHash &, const std::string &, const std::string &, int, int &);
/** Tries to convert the value to an integer and write it to 'result'
*/
bool ConfValueInteger(ConfigDataHash &, const std::string &, const std::string &, const std::string &, int, int &);
/** Returns true if the value exists and has a true value, false otherwise
*/
bool ConfValueBool(ConfigDataHash &, const char *, const char *, int);
/** Returns true if the value exists and has a true value, false otherwise
*/
bool ConfValueBool(ConfigDataHash &, const char *, const char *, const char *, int);
/** Returns true if the value exists and has a true value, false otherwise
*/
bool ConfValueBool(ConfigDataHash &, const std::string &, const std::string &, int);
/** Returns true if the value exists and has a true value, false otherwise
*/
bool ConfValueBool(ConfigDataHash &, const std::string &, const std::string &, const std::string &, int);
/** Returns the number of occurences of tag in the config file
*/
int ConfValueEnum(ConfigDataHash &, const char *);
/** Returns the number of occurences of tag in the config file
*/
int ConfValueEnum(ConfigDataHash &, const std::string &);
/** Returns the numbers of vars inside the index'th 'tag in the config file
*/
int ConfVarEnum(ConfigDataHash &, const char *, int);
/** Returns the numbers of vars inside the index'th 'tag in the config file
*/
int ConfVarEnum(ConfigDataHash &, const std::string &, int);
void ValidateHostname(const char *, const std::string &, const std::string &);
void ValidateIP(const char *p, const std::string &, const std::string &, bool);
void ValidateNoSpaces(const char *, const std::string &, const std::string &);
};
/** This class can be used on its own to represent an exception, or derived to represent a module-specific exception.
* When a module whishes to abort, e.g. within a constructor, it should throw an exception using ModuleException or
* a class derived from ModuleException. If a module throws an exception during its constructor, the module will not
* be loaded. If this happens, the error message returned by ModuleException::GetReason will be displayed to the user
* attempting to load the module, or dumped to the console if the ircd is currently loading for the first time.
*/
class ConfigException : public CoreException
{
public:
/** Default constructor, just uses the error mesage 'Config threw an exception'.
*/
ConfigException() : CoreException("Config threw an exception", "Config Parser") {}
/** This constructor can be used to specify an error message before throwing.
*/
ConfigException(const std::string &message) : CoreException(message, "Config Parser") {}
/** This destructor solves world hunger, cancels the world debt, and causes the world to end.
* Actually no, it does nothing. Never mind.
* @throws Nothing!
*/
virtual ~ConfigException() throw() { };
};
#define CONF_NO_ERROR 0x000000
#define CONF_NOT_A_NUMBER 0x000010
#define CONF_INT_NEGATIVE 0x000080
#define CONF_VALUE_NOT_FOUND 0x000100
#define CONF_FILE_NOT_FOUND 0x000200
/** Allows reading of values from configuration files
* This class allows a module to read from either the main configuration file (inspircd.conf) or from
* a module-specified configuration file. It may either be instantiated with one parameter or none.
* Constructing the class using one parameter allows you to specify a path to your own configuration
* file, otherwise, inspircd.conf is read.
*/
class CoreExport ConfigReader
{
protected:
/** The contents of the configuration file
* This protected member should never be accessed by a module (and cannot be accessed unless the
* core is changed). It will contain a pointer to the configuration file data with unneeded data
* (such as comments) stripped from it.
*/
ConfigDataHash *data;
/** Used to store errors
*/
std::ostringstream *errorlog;
/** If we're using our own config data hash or not
*/
bool privatehash;
/** True if an error occured reading the config file
*/
bool readerror;
/** Error code
*/
long error;
public:
/** Default constructor.
* This constructor initialises the ConfigReader class to read services.conf.
*/
ConfigReader();
/** Overloaded constructor.
* This constructor initialises the ConfigReader class to read a user-specified config file
*/
ConfigReader(const std::string &);
/** Default destructor.
* This method destroys the ConfigReader class.
*/
~ConfigReader();
/** Retrieves a value from the config file.
* This method retrieves a value from the config file. Where multiple copies of the tag
* exist in the config file, index indicates which of the values to retrieve.
*/
std::string ReadValue(const std::string &, const std::string &, int, bool = false);
/** Retrieves a value from the config file.
* This method retrieves a value from the config file. Where multiple copies of the tag
* exist in the config file, index indicates which of the values to retrieve. If the
* tag is not found the default value is returned instead.
*/
std::string ReadValue(const std::string &, const std::string &, const std::string &, int, bool = false);
/** Retrieves a boolean value from the config file.
* This method retrieves a boolean value from the config file. Where multiple copies of the tag
* exist in the config file, index indicates which of the values to retrieve. The values "1", "yes"
* and "true" in the config file count as true to ReadFlag, and any other value counts as false.
*/
bool ReadFlag(const std::string &, const std::string &, int);
/** Retrieves a boolean value from the config file.
* This method retrieves a boolean value from the config file. Where multiple copies of the tag
* exist in the config file, index indicates which of the values to retrieve. The values "1", "yes"
* and "true" in the config file count as true to ReadFlag, and any other value counts as false.
* If the tag is not found, the default value is used instead.
*/
bool ReadFlag(const std::string &, const std::string &, const std::string &, int);
/** Retrieves an integer value from the config file.
* This method retrieves an integer value from the config file. Where multiple copies of the tag
* exist in the config file, index indicates which of the values to retrieve. Any invalid integer
* values in the tag will cause the objects error value to be set, and any call to GetError() will
* return CONF_INVALID_NUMBER to be returned. need_positive is set if the number must be non-negative.
* If a negative number is placed into a tag which is specified positive, 0 will be returned and GetError()
* will return CONF_INT_NEGATIVE. Note that need_positive is not suitable to get an unsigned int - you
* should cast the result to achieve that effect.
*/
int ReadInteger(const std::string &, const std::string &, int, bool);
/** Retrieves an integer value from the config file.
* This method retrieves an integer value from the config file. Where multiple copies of the tag
* exist in the config file, index indicates which of the values to retrieve. Any invalid integer
* values in the tag will cause the objects error value to be set, and any call to GetError() will
* return CONF_INVALID_NUMBER to be returned. needs_unsigned is set if the number must be unsigned.
* If a signed number is placed into a tag which is specified unsigned, 0 will be returned and GetError()
* will return CONF_NOT_UNSIGNED. If the tag is not found, the default value is used instead.
*/
int ReadInteger(const std::string &, const std::string &, const std::string &, int, bool);
/** Returns the last error to occur.
* Valid errors can be found by looking in modules.h. Any nonzero value indicates an error condition.
* A call to GetError() resets the error flag back to 0.
*/
long GetError();
/** Counts the number of times a given tag appears in the config file.
* This method counts the number of times a tag appears in a config file, for use where
* there are several tags of the same kind, e.g. with opers and connect types. It can be
* used with the index value of ConfigReader::ReadValue to loop through all copies of a
* multiple instance tag.
*/
int Enumerate(const std::string &);
/** Returns true if a config file is valid.
* This method is partially implemented and will only return false if the config
* file does not exist or could not be opened.
*/
bool Verify();
/** Dumps the list of errors in a config file to an output location. If bail is true,
* then the program will abort. If bail is false and user points to a valid user
* record, the error report will be spooled to the given user by means of NOTICE.
* if bool is false AND user is false, the error report will be spooled to all opers
* by means of a NOTICE to all opers.
*/
void DumpErrors(bool);
/** Returns the number of items within a tag.
* For example if the tag was &lt;test tag="blah" data="foo"&gt; then this
* function would return 2. Spaces and newlines both qualify as valid seperators
* between values.
*/
int EnumerateValues(const std::string &, int);
};
#endif
+7 -7
View File
@@ -23,12 +23,12 @@
typedef struct dbFILE_ dbFILE;
struct dbFILE_ {
int mode; /* 'r' for reading, 'w' for writing */
FILE *fp; /* The normal file descriptor */
FILE *backupfp; /* Open file pointer to a backup copy of
* the database file (if non-NULL) */
char filename[MAXPATHLEN]; /* Name of the database file */
char backupname[MAXPATHLEN]; /* Name of the backup file */
int mode; /* 'r' for reading, 'w' for writing */
FILE *fp; /* The normal file descriptor */
FILE *backupfp; /* Open file pointer to a backup copy of
* the database file (if non-NULL) */
char filename[MAXPATHLEN]; /* Name of the database file */
char backupname[MAXPATHLEN]; /* Name of the backup file */
};
/*************************************************************************/
@@ -42,7 +42,7 @@ E int write_file_version(dbFILE *f, uint32 version);
E dbFILE *open_db(const char *service, const char *filename, const char *mode, uint32 version);
E void restore_db(dbFILE *f); /* Restore to state before open_db() */
E void close_db(dbFILE *f);
E void backup_databases();
E void backup_databases(void);
#define read_db(f,buf,len) (fread((buf),1,(len),(f)->fp))
#define write_db(f,buf,len) (fwrite((buf),1,(len),(f)->fp))
+127
View File
@@ -0,0 +1,127 @@
/* depricated.h
*
* (C) 2003-2009 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for furhter details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
*
*/
/*
All of these functions were replaced in 1.7.6, you should move your modules
to use the new functions
*/
#define change_user_mode(u, modes, arg) common_svsmode(u, modes, arg)
#define GetIdent(x) common_get_vident(x)
#define GetHost(x) common_get_vhost(x)
#define NEWNICK(nick,user,host,real,modes,qline) \
anope_cmd_bot_nick(nick,user,host,real,modes)
#define s_akill(user, host, who, when, expires, reason) \
anope_cmd_akill(user, host, who, when, expires, reason)
#define set_umode(user, ac, av) anope_set_umode(user, ac, av)
#define s_svsnoop(server, set) anope_cmd_svsnoop(server, set)
#define s_sqline(mask, reason) anope_cmd_sqline(mask, reason)
#define s_sgline(mask, reason) anope_cmd_sgline(mask, reason)
#define s_szline(mask, reason) anope_cmd_szline(mask, reason)
#define s_unsgline(mask) anope_cmd_unsgline(mask)
#define s_unsqline(mask) anope_cmd_unsqline(mask)
#define s_unszline(mask) anope_cmd_unszline(mask)
#define s_rakill(user, host) anope_cmd_remove_akill(user, host)
# define NICKSERV_MODE ircd->nickservmode
# define CHANSERV_MODE ircd->chanservmode
# define HOSTSERV_MODE ircd->hostservmode
# define MEMOSERV_MODE ircd->memoservmode
# define BOTSERV_MODE ircd->botservmode
# define HELPSERV_MODE ircd->helpservmode
# define OPERSERV_MODE ircd->oprservmode
# define DEVNULL_MODE ircd->devnullmode
# define GLOBAL_MODE ircd->globalmode
# define NICKSERV_ALIAS_MODE ircd->nickservaliasmode
# define CHANSERV_ALIAS_MODE ircd->chanservaliasmode
# define MEMOSERV_ALIAS_MODE ircd->memoservaliasmode
# define BOTSERV_ALIAS_MODE ircd->botservaliasmode
# define HELPSERV_ALIAS_MODE ircd->helpservaliasmode
# define OPERSERV_ALIAS_MODE ircd->operservaliasmode
# define DEVNULL_ALIAS_MODE ircd->devnullaliasmode
# define GLOBAL_ALIAS_MODE ircd->globalaliasmode
# define HOSTSERV_ALIAS_MODE ircd->hostservaliasmode
# define BOTSERV_BOTS_MODE ircd->botserv_bot_mode
#define CHAN_MAX_SYMBOL ircd->max_symbols
#define MODESTOREMOVE ircd->modestoremove
#ifdef IRC_HYBRID
# define HAS_HALFOP
# define HAS_EXCEPT
#endif
#ifdef IRC_VIAGRA
# define HAS_HALFOP
# define HAS_VHOST
# define HAS_VIDENT
# define HAS_EXCEPT
#endif
#ifdef IRC_BAHAMUT
# define HAS_NICKIP
# define HAS_EXCEPT
# define HAS_SVSHOLD
#endif
#ifdef IRC_RAGE2
# define HAS_HALFOP
# define HAS_EXCEPT
# define HAS_VHOST
# define HAS_NICKVHOST
#endif
#ifdef IRC_PTLINK
# define HAS_NICKVHOST
# define HAS_VHOST
# define HAS_FMODE
# define HAS_EXCEPT
#endif
#ifdef IRC_ULTIMATE2
# define IRC_ULTIMATE /* gotta do this for old mods */
# define HAS_FMODE
# define HAS_HALFOP
# define HAS_LMODE
# define HAS_VHOST
# define HAS_VIDENT
# define HAS_EXCEPT
#endif
#if defined(IRC_UNREAL31) || defined(IRC_UNREAL32)
# define IRC_UNREAL /* gotta do this for old mods */
# define HAS_FMODE
# define HAS_HALFOP
# define HAS_LMODE
# define HAS_NICKVHOST
# define HAS_VHOST
# define HAS_VIDENT
# define HAS_EXCEPT
#endif
#ifdef IRC_ULTIMATE3
# define HAS_HALFOP
# define HAS_VHOST
# define HAS_NICKVHOST
# define HAS_VIDENT
# define HAS_EXCEPT
#endif
+5 -5
View File
@@ -13,10 +13,10 @@
*/
typedef struct encryption_ {
int (*encrypt)(const char *src, int len, char *dest, int size);
int (*encrypt_in_place)(char *buf, int size);
int (*encrypt_check_len)(int passlen, int bufsize);
int (*decrypt)(const char *src, char *dest, int size);
int (*check_password)(const char *plaintext, const char *password);
int (*encrypt)(const char *src, int len, char *dest, int size);
int (*encrypt_in_place)(char *buf, int size);
int (*encrypt_check_len)(int passlen, int bufsize);
int (*decrypt)(const char *src, char *dest, int size);
int (*check_password)(const char *plaintext, const char *password);
} Encryption;
+700 -306
View File
File diff suppressed because it is too large Load Diff
-82
View File
@@ -1,82 +0,0 @@
/*
* Copyright (C) 2002-2009 InspIRCd Development Team
* Copyright (C) 2009 Anope Team <team@anope.org>
*
* Please read COPYING and README for further details.
*
* These classes have been copied from InspIRCd and modified
* for use in Anope.
*
* $Id$
*
*/
#ifndef _HASHCOMP_H_
#define _HASHCOMP_H_
#include <string>
/** sepstream allows for splitting token seperated lists.
* Each successive call to sepstream::GetToken() returns
* the next token, until none remain, at which point the method returns
* an empty string.
*/
class sepstream
{
private:
/** Original string.
*/
std::string tokens;
/** Last position of a seperator token
*/
std::string::iterator last_starting_position;
/** Current string position
*/
std::string::iterator n;
/** Seperator value
*/
char sep;
public:
/** Create a sepstream and fill it with the provided data
*/
sepstream(const std::string &source, char seperator);
virtual ~sepstream() { }
/** Fetch the next token from the stream
* @param token The next token from the stream is placed here
* @return True if tokens still remain, false if there are none left
*/
virtual bool GetToken(std::string &token);
/** Fetch the entire remaining stream, without tokenizing
* @return The remaining part of the stream
*/
virtual const std::string GetRemaining();
/** Returns true if the end of the stream has been reached
* @return True if the end of the stream has been reached, otherwise false
*/
virtual bool StreamEnd();
};
/** A derived form of sepstream, which seperates on commas
*/
class commasepstream : public sepstream
{
public:
/** Initialize with comma seperator
*/
commasepstream(const std::string &source) : sepstream(source, ',') { }
};
/** A derived form of sepstream, which seperates on spaces
*/
class spacesepstream : public sepstream
{
public:
/** Initialize with space seperator
*/
spacesepstream(const std::string &source) : sepstream(source, ' ') { }
};
#endif
+25
View File
@@ -0,0 +1,25 @@
# Make file for Win32
#
# (C) 2003-2009 Anope Team
# Contact us at team@anope.org
#
# Please read COPYING and README for further details.
#
# Based on the original code of Epona by Lara.
# Based on the original code of Services by Andy Church.
#
# $Id$
#
###########################################################################
clean:
-@erase language.h
spotless: clean
-@erase sysconf.h version.h
distclean: spotless
FRC:
+1 -1
View File
@@ -16,7 +16,7 @@
#include "modules.h"
extern Message messages[];
extern void moduleAddMsgs();
extern void moduleAddMsgs(void);
extern Message *find_message(const char *name);
+1
View File
@@ -5,6 +5,7 @@
#include "commands.h"
#include "language.h"
#include "modules.h"
#include "depricated.h"
#include "version.h"
#define MOD_UNIQUE 0
+181 -330
View File
@@ -6,8 +6,8 @@
* Please read COPYING and README for furhter details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
* Based on the original code of Services by Andy Church.
*
* $Id$
*/
@@ -24,17 +24,17 @@ typedef HMODULE ano_module_t;
#define ano_modopen(file) LoadLibrary(file)
/* ano_moderr in modules.c */
#define ano_modsym(file, symbol) (HMODULE)GetProcAddress(file, symbol)
#define ano_modsym(file, symbol) (void *)GetProcAddress(file, symbol)
#define ano_modclose(file) FreeLibrary(file) ? 0 : 1
#define ano_modclearerr() SetLastError(0)
#define MODULE_EXT ".so"
#define MODULE_EXT ".dll"
#else
typedef void * ano_module_t;
#define ano_modopen(file) dlopen(file, RTLD_LAZY)
#define ano_moderr() dlerror()
#define ano_modsym(file, symbol) dlsym(file, symbol)
#define ano_modsym(file, symbol) dlsym(file, DL_PREFIX symbol)
#define ano_modclose(file) dlclose(file)
/* We call dlerror() here because it clears the module error after being
* called. This previously read 'errno = 0', but that didn't work on
@@ -48,7 +48,7 @@ typedef void * ano_module_t;
/*************************************************************************/
#define CMD_HASH(x) (((x)[0]&31)<<5 | ((x)[1]&31)) /* Will gen a hash from a string :) */
#define CMD_HASH(x) (((x)[0]&31)<<5 | ((x)[1]&31)) /* Will gen a hash from a string :) */
#define MAX_CMD_HASH 1024
#define MOD_STOP 1
@@ -69,20 +69,20 @@ typedef void * ano_module_t;
/**********************************************************************
* Module Returns
**********************************************************************/
#define MOD_ERR_OK 0
#define MOD_ERR_MEMORY 1
#define MOD_ERR_PARAMS 2
#define MOD_ERR_EXISTS 3
#define MOD_ERR_NOEXIST 4
#define MOD_ERR_NOUSER 5
#define MOD_ERR_NOLOAD 6
#define MOD_ERR_NOUNLOAD 7
#define MOD_ERR_SYNTAX 8
#define MOD_ERR_NODELETE 9
#define MOD_ERR_UNKNOWN 10
#define MOD_ERR_FILE_IO 11
#define MOD_ERR_NOSERVICE 12
#define MOD_ERR_NO_MOD_NAME 13
#define MOD_ERR_OK 0
#define MOD_ERR_MEMORY 1
#define MOD_ERR_PARAMS 2
#define MOD_ERR_EXISTS 3
#define MOD_ERR_NOEXIST 4
#define MOD_ERR_NOUSER 5
#define MOD_ERR_NOLOAD 6
#define MOD_ERR_NOUNLOAD 7
#define MOD_ERR_SYNTAX 8
#define MOD_ERR_NODELETE 9
#define MOD_ERR_UNKNOWN 10
#define MOD_ERR_FILE_IO 11
#define MOD_ERR_NOSERVICE 12
#define MOD_ERR_NO_MOD_NAME 13
/*************************************************************************/
/* Macros to export the Module API functions/variables */
@@ -97,25 +97,6 @@ typedef void * ano_module_t;
#endif
/*************************************************************************/
#if !defined(_WIN32)
#include <dlfcn.h>
/* Define these for systems without them */
#ifndef RTLD_NOW
#define RTLD_NOW 0
#endif
#ifndef RTLD_LAZY
#define RTLD_LAZY RTLD_NOW
#endif
#ifndef RTLD_GLOBAL
#define RTLD_GLOBAL 0
#endif
#ifndef RTLD_LOCAL
#define RTLD_LOCAL 0
#endif
#else
const char *ano_moderr();
#endif
typedef enum { CORE,PROTOCOL,THIRD,SUPPORTED,QATESTED,ENCRYPTION } MODType;
typedef enum { MOD_OP_LOAD, MOD_OP_UNLOAD } ModuleOperation;
@@ -123,12 +104,16 @@ typedef enum { MOD_OP_LOAD, MOD_OP_UNLOAD } ModuleOperation;
/* Structure for information about a *Serv command. */
typedef struct Command_ Command;
struct CommandHash;
typedef struct CommandHash_ CommandHash;
typedef struct Module_ Module;
typedef struct ModuleLang_ ModuleLang;
typedef struct ModuleHash_ ModuleHash;
typedef struct ModuleQueue_ ModuleQueue;
typedef struct Message_ Message;
typedef struct MessageHash_ MessageHash;
typedef struct ModuleCallBack_ ModuleCallBack;
typedef struct EvtMessage_ EvtMessage;
typedef struct EvtMessageHash_ EvtMessageHash;
typedef struct EvtHook_ EvtHook;
typedef struct EvtHookHash_ EvtHookHash;
@@ -141,32 +126,21 @@ extern MDE CommandHash *HELPSERV[MAX_CMD_HASH];
extern MDE CommandHash *OPERSERV[MAX_CMD_HASH];
extern MDE MessageHash *IRCD[MAX_CMD_HASH];
extern MDE ModuleHash *MODULE_HASH[MAX_CMD_HASH];
extern MDE EvtMessageHash *EVENT[MAX_CMD_HASH];
extern MDE EvtHookHash *EVENTHOOKS[MAX_CMD_HASH];
struct ModuleLang_ {
int argc;
char **argv;
int argc;
char **argv;
};
/** Every module in Anope is actually a class.
*/
class CoreExport Module
{
private:
bool permanent;
public:
/** The module name (e.g. os_modload)
*/
std::string name;
/** The temporary path/filename
*/
std::string filename;
ano_module_t handle;
time_t created;
std::string version;
std::string author;
struct Module_ {
char *name;
char *filename;
void *handle;
time_t time;
char *version;
char *author;
MODType type;
@@ -178,275 +152,75 @@ class CoreExport Module
void (*hostHelp)(User *u); /* 6 */
void (*helpHelp)(User *u); /* 7 */
/* CommandHash *cmdList[MAX_CMD_HASH]; */
MessageHash *msgList[MAX_CMD_HASH];
ModuleLang lang[NUM_LANGS];
/** Creates and initialises a new module.
* @param loadernick The nickname of the user loading the module.
*/
Module(const std::string &modname, const std::string &loadernick);
/** Destroys a module, freeing resources it has allocated.
*/
~Module();
/** Sets a given type (CORE,PROTOCOL,3RD etc) on a module.
* @param type The type to set the module as.
*/
void SetType(MODType type);
/** Toggles the permanent flag on a module. If a module is permanent,
* then it may not be unloaded.
*
* Naturally, this setting should be used sparingly!
*
* @param state True if this module should be permanent, false else.
*/
void SetPermanent(bool state);
/** Retrieves whether or not a given module is permanent.
* @return true if the module is permanent, false else.
*/
bool GetPermanent();
/** Set the modules version info.
* @param version the version of the module
*/
void SetVersion(const std::string &version);
/** Set the modules author info
* @param author the author of the module
*/
void SetAuthor(const std::string &author);
/**
* Add output to nickserv help.
* when doing a /msg nickserv help, your function will be called to allow it to send out a notice() with the code you wish to dispaly
* @param func a pointer to the function which will display the code
**/
void SetNickHelp(void (*func)(User *));
/**
* Add output to chanserv help.
* when doing a /msg chanserv help, your function will be called to allow it to send out a notice() with the code you wish to dispaly
* @param func a pointer to the function which will display the code
**/
void SetChanHelp(void (*func)(User *));
/**
* Add output to memoserv help.
* when doing a /msg memoserv help, your function will be called to allow it to send out a notice() with the code you wish to dispaly
* @param func a pointer to the function which will display the code
**/
void SetMemoHelp(void (*func)(User *));
/**
* Add output to botserv help.
* when doing a /msg botserv help, your function will be called to allow it to send out a notice() with the code you wish to dispaly
* @param func a pointer to the function which will display the code
**/
void SetBotHelp(void (*func)(User *));
/**
* Add output to operserv help.
* when doing a /msg operserv help, your function will be called to allow it to send out a notice() with the code you wish to dispaly
* @param func a pointer to the function which will display the code
**/
void SetOperHelp(void (*func)(User *));
/**
* Add output to hostserv help.
* when doing a /msg hostserv help, your function will be called to allow it to send out a notice() with the code you wish to dispaly
* @param func a pointer to the function which will display the code
**/
void SetHostHelp(void (*func)(User *));
/**
* Add output to helpserv help.
* when doing a /msg helpserv help, your function will be called to allow it to send out a notice() with the code you wish to dispaly
* @param func a pointer to the function which will display the code
**/
void SetHelpHelp(void (*func)(User *));
/**
* Allow a module to add a set of language strings to anope
* @param langNumber the language number for the strings
* @param ac The language count for the strings
* @param av The language sring list.
**/
void InsertLanguage(int langNumber, int ac, const char **av);
/**
* Delete a language from a module
* @param langNumber the language Number to delete
**/
void DeleteLanguage(int langNumber);
/**
* Get the text of the given lanugage string in the corrent language, or
* in english.
* @param u The user to send the message to
* @param number The message number
**/
const char *GetLangString(User *u, int number);
/**
* Send a notice to the user in the correct language, or english.
* @param source Who sends the notice
* @param u The user to send the message to
* @param number The message number
* @param ... The argument list
**/
void NoticeLang(char *source, User * u, int number, ...);
/** Add a module message to the IRCD message hash
* @param m the Message to add
* @param pos the Position to add the message to, e.g. MOD_HEAD, MOD_TAIL, MOD_UNIQUE
* @return MOD_ERR_OK on success, althing else on fail.
**/
int AddEventHook(EvtHook *evh);
/**
* remove the given message from the IRCD message hash
* @param name the name of the message to remove
* @return MOD_ERR_OK on success, althing else on fail.
**/
int DelEventHook(const char *name);
/**
* Add a module provided command to the given service.
* e.g. AddCommand(NICKSERV,c,MOD_HEAD);
* @param cmdTable the services to add the command to
* @param c the command to add
* @param pos the position to add to, MOD_HEAD, MOD_TAIL, MOD_UNIQUE
* @see createCommand
* @return MOD_ERR_OK on successfully adding the command
*/
int AddCommand(CommandHash *cmdTable[], Command * c, int pos);
/**
* Delete a command from the service given.
* @param cmdTable the cmdTable for the services to remove the command from
* @param name the name of the command to delete from the service
* @return returns MOD_ERR_OK on success
*/
int DelCommand(CommandHash * cmdTable[], const char *name);
/**
* Adds a timed callback for the current module.
* This allows modules to request that anope executes one of there functions at a time in the future, without an event to trigger it
* @param name the name of the callback, this is used for refrence mostly, but is needed it you want to delete this particular callback later on
* @param when when should the function be executed, this is a time in the future, seconds since 00:00:00 1970-01-01 UTC
* @param func the function to be executed when the callback is ran, its format MUST be int func(int argc, char **argv);
* @param argc the argument count for the argv paramter
* @param atgv a argument list to be passed to the called function.
* @return MOD_ERR_OK on success, anything else on fail.
* @see moduleDelCallBack
**/
int AddCallback(const char *name, time_t when, int (*func) (int argc, char *argv[]), int argc, char **argv);
/**
* Allow modules to delete a timed callback by name.
* @param name the name of the callback they wish to delete
**/
void DelCallback(const char *name);
};
/** Used to manage modules.
*/
class CoreExport ModuleManager
{
public:
/** Load up a list of modules.
* @param total_modules The number of modules to load
* @param module_list The list of modules to load
**/
static void LoadModuleList(int total_modules, char **module_list);
/** Loads a given module.
* @param m the module to load
* @param u the user who loaded it, NULL for auto-load
* @return MOD_ERR_OK on success, anything else on fail
*/
static int LoadModule(const std::string &modname, User * u);
/** Unload the given module.
* @param m the module to unload
* @param u the user who unloaded it
* @return MOD_ERR_OK on success, anything else on fail
*/
static int UnloadModule(Module *m, User * u);
/** Run all pending module timer callbacks.
*/
static void RunCallbacks();
private:
/** Call the module_delete function to safely delete the module
* @param m the module to delete
*/
static void DeleteModule(Module *m);
};
struct ModuleHash_ {
char *name;
Module *m;
ModuleHash *next;
char *name;
Module *m;
ModuleHash *next;
};
struct ModuleQueue_ {
Module *m;
ModuleOperation op;
User *u;
ModuleQueue *next;
};
struct Command_ {
char *name;
int (*routine)(User *u);
int (*has_priv)(User *u); /* Returns 1 if user may use command, else 0 */
char *name;
int (*routine)(User *u);
int (*has_priv)(User *u); /* Returns 1 if user may use command, else 0 */
/* Regrettably, these are hard-coded to correspond to current privilege
* levels (v4.0). Suggestions for better ways to do this are
* appreciated.
*/
int helpmsg_all; /* Displayed to all users; -1 = no message */
int helpmsg_reg; /* Displayed to regular users only */
int helpmsg_oper; /* Displayed to Services operators only */
int helpmsg_admin; /* Displayed to Services admins only */
int helpmsg_root; /* Displayed to Services root only */
char *help_param1;
char *help_param2;
char *help_param3;
char *help_param4;
/* Regrettably, these are hard-coded to correspond to current privilege
* levels (v4.0). Suggestions for better ways to do this are
* appreciated.
*/
int helpmsg_all; /* Displayed to all users; -1 = no message */
int helpmsg_reg; /* Displayed to regular users only */
int helpmsg_oper; /* Displayed to Services operators only */
int helpmsg_admin; /* Displayed to Services admins only */
int helpmsg_root; /* Displayed to Services root only */
char *help_param1;
char *help_param2;
char *help_param3;
char *help_param4;
/* Module related stuff */
int core; /* Can this command be deleted? */
char *mod_name; /* Name of the module who owns us, NULL for core's */
char *service; /* Service we provide this command for */
int (*all_help)(User *u);
int (*regular_help)(User *u);
int (*oper_help)(User *u);
int (*admin_help)(User *u);
int (*root_help)(User *u);
/* Module related stuff */
int core; /* Can this command be deleted? */
char *mod_name; /* Name of the module who owns us, NULL for core's */
char *service; /* Service we provide this command for */
int (*all_help)(User *u);
int (*regular_help)(User *u);
int (*oper_help)(User *u);
int (*admin_help)(User *u);
int (*root_help)(User *u);
Command *next; /* Next command responsible for the same command */
Command *next; /* Next command responsible for the same command */
};
struct CommandHash {
char *name; /* Name of the command */
Command *c; /* Actual command */
CommandHash *next; /* Next command */
struct CommandHash_ {
char *name; /* Name of the command */
Command *c; /* Actual command */
CommandHash *next; /* Next command */
};
struct Message_ {
char *name;
int (*func)(const char *source, int ac, const char **av);
int core;
Message *next;
char *name;
int (*func)(char *source, int ac, char **av);
int core;
char *mod_name;
Message *next;
};
struct MessageHash_ {
char *name;
Message *m;
MessageHash *next;
char *name;
Message *m;
MessageHash *next;
};
struct ModuleCallBack_ {
@@ -459,72 +233,149 @@ struct ModuleCallBack_ {
ModuleCallBack *next;
};
struct EvtMessage_ {
char *name;
int (*func)(char *source, int ac, char **av);
int core;
char *mod_name;
EvtMessage *next;
};
struct EvtMessageHash_ {
char *name;
EvtMessage *evm;
EvtMessageHash *next;
};
struct EvtHook_ {
int (*func)(int argc, char **argv);
int core;
int (*func)(int argc, char **argv);
int core;
char *name;
char *mod_name;
EvtHook *next;
char *mod_name;
EvtHook *next;
};
struct EvtHookHash_ {
char *name;
EvtHook *evh;
EvtHookHash *next;
char *name;
EvtHook *evh;
EvtHookHash *next;
};
/*************************************************************************/
/* Module Managment Functions */
MDE Module *findModule(const char *name); /* Find a module */
int encryption_module_init(); /* Load the encryption module */
int protocol_module_init(); /* Load the IRCD Protocol Module up*/
void moduleCallBackPrepForUnload(const char *mod_name);
MDE Module *createModule(char *filename); /* Create a new module, using the given name */
int destroyModule(Module *m); /* Delete the module */
int addModule(Module *m); /* Add a module to the module hash */
int delModule(Module *m); /* Remove a module from the module hash */
MDE Module *findModule(char *name); /* Find a module */
int loadModule(Module *m,User *u); /* Load the given module into the program */
int encryption_module_init(void); /* Load the encryption module */
int protocol_module_init(void); /* Load the IRCD Protocol Module up*/
int unloadModule(Module *m, User *u); /* Unload the given module from the pro */
int prepForUnload(Module *m); /* Prepare the module for unload */
MDE void moduleAddVersion(const char *version);
MDE void moduleAddAuthor(const char *author);
void modules_init(void);
void modules_delayed_init(void);
void moduleCallBackPrepForUnload(char *mod_name);
MDE void moduleCallBackDeleteEntry(ModuleCallBack * prev);
MDE char *moduleGetLastBuffer();
MDE char *moduleGetLastBuffer(void);
MDE void moduleSetHelpHelp(void (*func) (User * u));
MDE void moduleDisplayHelp(int service, User *u);
MDE void moduleSetHostHelp(void (*func) (User * u));
MDE void moduleSetOperHelp(void (*func) (User * u));
MDE void moduleSetBotHelp(void (*func) (User * u));
MDE void moduleSetMemoHelp(void (*func) (User * u));
MDE void moduleSetChanHelp(void (*func) (User * u));
MDE void moduleSetNickHelp(void (*func) (User * u));
MDE int moduleAddHelp(Command * c, int (*func) (User * u));
MDE int moduleAddRegHelp(Command * c, int (*func) (User * u));
MDE int moduleAddOperHelp(Command * c, int (*func) (User * u));
MDE int moduleAddAdminHelp(Command * c, int (*func) (User * u));
MDE int moduleAddRootHelp(Command * c, int (*func) (User * u));
MDE void moduleSetType(MODType type);
extern MDE Module *mod_current_module;
extern MDE char *mod_current_module_name;
extern MDE char *mod_current_buffer;
extern MDE int mod_current_op;
extern MDE User *mod_current_user;
MDE int moduleGetConfigDirective(Directive *h);
/*************************************************************************/
/*************************************************************************/
/* Command Managment Functions */
MDE Command *createCommand(const char *name,int (*func)(User *u),int (*has_priv)(User *u),int help_all, int help_reg, int help_oper, int help_admin,int help_root);
MDE int destroyCommand(Command *c); /* destroy a command */
MDE int addCoreCommand(CommandHash *cmdTable[], Command *c); /* Add a command to a command table */
MDE int moduleAddCommand(CommandHash *cmdTable[], Command *c, int pos);
MDE int addCommand(CommandHash *cmdTable[], Command *c,int pos);
MDE int delCommand(CommandHash *cmdTable[], Command *c,char *mod_name); /* Del a command from a cmd table */
MDE int moduleDelCommand(CommandHash *cmdTable[],char *name); /* Del a command from a cmd table */
Command *findCommand(CommandHash *cmdTable[], const char *name); /* Find a command */
/*************************************************************************/
/* Message Managment Functions */
MDE Message *createMessage(const char *name,int (*func)(const char *source, int ac, const char **av));
MDE Message *createMessage(const char *name,int (*func)(char *source, int ac, char **av));
Message *findMessage(MessageHash *msgTable[], const char *name); /* Find a Message */
MDE int addMessage(MessageHash *msgTable[], Message *m, int pos); /* Add a Message to a Message table */
MDE int addCoreMessage(MessageHash *msgTable[], Message *m); /* Add a Message to a Message table */
int delMessage(MessageHash *msgTable[], Message *m); /* Del a Message from a msg table */
MDE int moduleAddMessage(Message *m, int pos);
int delMessage(MessageHash *msgTable[], Message *m, char *mod_name); /* Del a Message from a msg table */
MDE int moduleDelMessage(char *name);
int destroyMessage(Message *m); /* destroy a Message*/
/*************************************************************************/
MDE EvtHook *createEventHook(const char *name, int (*func) (int argc, char **argv));
MDE EvtMessage *createEventHandler(char *name, int (*func) (char *source, int ac, char **av));
EvtMessage *findEventHandler(EvtMessageHash * msgEvtTable[], const char *name);
int addCoreEventHandler(EvtMessageHash * msgEvtTable[], EvtMessage * evm);
MDE int moduleAddEventHandler(EvtMessage * evm);
MDE int moduleEventDelHandler(char *name);
int delEventHandler(EvtMessageHash * msgEvtTable[], EvtMessage * evm, char *mod_name);
int destroyEventHandler(EvtMessage * evm);
int addEventHandler(EvtMessageHash * msgEvtTable[], EvtMessage * evm);
MDE EvtHook *createEventHook(char *name, int (*func) (int argc, char **argv));
EvtHook *findEventHook(EvtHookHash * HookEvtTable[], const char *name);
int addCoreEventHook(EvtHookHash * HookEvtTable[], EvtHook * evh);
int delEventHook(EvtHookHash * HookEvtTable[], EvtHook * evh, const char *mod_name);
MDE int moduleAddEventHook(EvtHook * evh);
MDE int moduleEventDelHook(const char *name);
int delEventHook(EvtHookHash * HookEvtTable[], EvtHook * evh, char *mod_name);
int destroyEventHook(EvtHook * evh);
extern char *mod_current_evtbuffer;
MDE void moduleInsertLanguage(int langNumber, int ac, char **av);
MDE void moduleNoticeLang(char *source, User *u, int number, ...);
MDE char *moduleGetLangString(User * u, int number);
MDE void moduleDeleteLanguage(int langNumber);
/*************************************************************************/
MDE bool moduleMinVersion(int major,int minor,int patch,int build); /* Checks if the current version of anope is before or after a given verison */
MDE int moduleAddCallback(char *name,time_t when,int (*func)(int argc, char *argv[]),int argc, char **argv);
MDE void moduleDelCallback(char *name);
MDE char *moduleGetData(ModuleData **md, char *key); /* Get the value for this key from this struct */
MDE int moduleAddData(ModuleData **md, char *key, char *value); /* Set the value for this key for this struct */
MDE void moduleDelData(ModuleData **md, char *key); /* Delete this key/value pair */
MDE void moduleDelAllData(ModuleData **md); /* Delete all key/value pairs for this module for this struct */
void moduleDelAllDataMod(Module *m); /* remove all module data from all structs for this module */
int moduleDataDebug(ModuleData **md); /* Allow for debug output of a moduleData struct */
MDE boolean moduleMinVersion(int major,int minor,int patch,int build); /* Checks if the current version of anope is before or after a given verison */
/*************************************************************************/
/* Module Queue Operations */
MDE int queueModuleLoad(char *name, User *u);
MDE int queueModuleUnload(char *name, User *u);
MDE void handleModuleOperationQueue(void);
/*************************************************************************/
/* Some IRCD protocol module support functions */
/** Update the protect deatials, could be either protect or admin etc.. */
MDE void updateProtectDetails(const char *level_info_protect_word, const char *level_info_protectme_word, const char *fant_protect_add, const char *fant_protect_del, const char *level_protect_word, const char *protect_set_mode, const char *protect_unset_mode);
MDE void updateProtectDetails(char *level_info_protect_word, char *level_info_protectme_word, char *fant_protect_add, char *fant_protect_del, char *level_protect_word, char *protect_set_mode, char *protect_unset_mode);
/************************************************************************/
-93
View File
@@ -1,93 +0,0 @@
/* Modular support
*
* (C) 2008-2009 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* $Id$
*
*/
class ChannelInfo : public Extensible
{
public:
ChannelInfo()
{
next = prev = NULL;
founderpass[0] = name[0] = last_topic_setter[0] = '\0';
founder = successor = NULL;
desc = url = email = last_topic = forbidby = forbidreason = NULL;
time_registered = last_used = last_topic_time = 0;
flags = 0;
bantype = accesscount = akickcount = 0;
levels = NULL;
access = NULL;
akick = NULL;
mlock_on = mlock_off = mlock_limit = 0;
mlock_key = mlock_flood = mlock_redirect = entry_message = NULL;
c = NULL;
bi = NULL;
botflags = 0;
ttb = NULL;
bwcount = 0;
badwords = NULL;
capsmin = capspercent = 0;
floodlines = floodsecs = 0;
repeattimes = 0;
}
ChannelInfo *next, *prev;
char name[CHANMAX];
NickCore *founder;
NickCore *successor; /* Who gets the channel if the founder
* nick is dropped or expires */
char founderpass[PASSMAX];
char *desc;
char *url;
char *email;
time_t time_registered;
time_t last_used;
char *last_topic; /* Last topic on the channel */
char last_topic_setter[NICKMAX]; /* Who set the last topic */
time_t last_topic_time; /* When the last topic was set */
uint32 flags; /* See below */
char *forbidby;
char *forbidreason;
int16 bantype;
int16 *levels; /* Access levels for commands */
uint16 accesscount;
ChanAccess *access; /* List of authorized users */
uint16 akickcount;
AutoKick *akick; /* List of users to kickban */
uint32 mlock_on, mlock_off; /* See channel modes below */
uint32 mlock_limit; /* 0 if no limit */
char *mlock_key; /* NULL if no key */
char *mlock_flood; /* NULL if no +f */
char *mlock_redirect; /* NULL if no +L */
char *entry_message; /* Notice sent on entering channel */
MemoInfo memos;
struct channel_ *c; /* Pointer to channel record (if *
* channel is currently in use) */
/* For BotServ */
BotInfo *bi; /* Bot used on this channel */
uint32 botflags; /* BS_* below */
int16 *ttb; /* Times to ban for each kicker */
uint16 bwcount;
BadWord *badwords; /* For BADWORDS kicker */
int16 capsmin, capspercent; /* For CAPS kicker */
int16 floodlines, floodsecs; /* For FLOOD kicker */
int16 repeattimes; /* For REPEAT kicker */
};
+8 -8
View File
@@ -2,19 +2,19 @@
// Microsoft Developer Studio generated include file.
// Used by Win32GUI.rc
//
#define VER_ANOPE 1
#define MANIFEST_RESOURCE_ID 2
#define ICON_APP 129
#define VER_ANOPE 1
#define MANIFEST_RESOURCE_ID 2
#define ICON_APP 129
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC 1
#define _APS_NEXT_RESOURCE_VALUE 152
#define _APS_NEXT_COMMAND_VALUE 40061
#define _APS_NEXT_CONTROL_VALUE 1167
#define _APS_NEXT_SYMED_VALUE 104
#define _APS_NO_MFC 1
#define _APS_NEXT_RESOURCE_VALUE 152
#define _APS_NEXT_COMMAND_VALUE 40061
#define _APS_NEXT_CONTROL_VALUE 1167
#define _APS_NEXT_SYMED_VALUE 104
#endif
#endif
+653 -800
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -32,7 +32,7 @@ struct slistopts_ {
int32 flags; /* Flags for the list. See below. */
int (*compareitem) (SList *slist, void *item1, void *item2); /* Called to compare two items */
int (*isequal) (SList *slist, void *item1, void *item2); /* Called by slist_indexof. item1 can be an arbitrary pointer. */
int (*isequal) (SList *slist, void *item1, void *item2); /* Called by slist_indexof. item1 can be an arbitrary pointer. */
void (*freeitem) (SList *slist, void *item); /* Called when an item is removed */
};
+1 -2
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2004-2009 Anope Team
* (C) 2004-2008 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for furhter details.
@@ -22,7 +22,6 @@ typedef SOCKET ano_socket_t;
#define ano_sockgeterr() WSAGetLastError()
#define ano_sockseterr(err) WSASetLastError(err)
/* ano_sockstrerror in sockutil.c */
extern char *ano_sockstrerror(int);
/* ano_socksetnonb in sockutil.c */
#define ano_sockerrnonb(err) (err == WSAEINPROGRESS || err == WSAEWOULDBLOCK)
#define SOCKERR_EBADF WSAENOTSOCK
-121
View File
@@ -1,121 +0,0 @@
#ifndef _SYSCONF_H_
#define _SYSCONF_H_
#cmakedefine DEFUMASK @DEFUMASK@
#cmakedefine HAVE_SYS_TYPES_H 1
#cmakedefine HAVE_STDINT_H 1
#cmakedefine HAVE_STDDEF_H 1
#cmakedefine HAVE_BACKTRACE 1
#cmakedefine HAVE_GETHOSTBYNAME 1
#cmakedefine HAVE_GETTIMEOFDAY 1
#cmakedefine HAVE_SETGRENT 1
#cmakedefine HAVE_STRCASECMP 1
#cmakedefine HAVE_STRICMP 1
#cmakedefine HAVE_STRINGS_H 1
#cmakedefine HAVE_STRLCAT 1
#cmakedefine HAVE_STRLCPY 1
#cmakedefine HAVE_SYS_SELECT_H 1
#cmakedefine HAVE_UMASK 1
#cmakedefine RUNGROUP "@RUNGROUP@"
#cmakedefine SERVICES_BIN "@SERVICES_BIN@"
#cmakedefine HAVE_UINT8_T 1
#cmakedefine HAVE_U_INT8_T 1
#cmakedefine HAVE_INT16_T 1
#cmakedefine HAVE_UINT16_T 1
#cmakedefine HAVE_U_INT16_T 1
#cmakedefine HAVE_INT32_T 1
#cmakedefine HAVE_UINT32_T 1
#cmakedefine HAVE_U_INT32_T 1
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_STDINT_H
# include <stdint.h>
#endif
#ifdef HAVE_STDDEF_H
# include <stddef.h>
#endif
#ifdef HAVE_UINT8_T
typedef uint8_t uint8;
#else
# ifdef HAVE_U_INT8_T
typedef u_int8_t uint8;
# else
# ifdef _WIN32
typedef unsigned __int8 uint8;
# else
typedef unsigned short uint8;
# endif
# endif
#endif
#ifdef HAVE_INT16_T
typedef int16_t int16;
#else
# ifdef _WIN32
typedef signed __int16 int16;
# else
typedef int int16;
# endif
#endif
#ifdef HAVE_UINT16_T
typedef uint16_t uint16;
#else
# ifdef HAVE_U_INT16_T
typedef u_int16_t uint16;
# else
# ifdef _WIN32
typedef unsigned __int16 uint16;
# else
typedef unsigned int uint16;
# endif
# endif
#endif
#ifdef HAVE_INT32_T
typedef int32_t int32;
#else
# ifdef _WIN32
typedef signed __int32 int32;
# else
typedef long int32;
# endif
#endif
#ifdef HAVE_UINT32_T
typedef uint32_t uint32;
#else
# ifdef HAVE_U_INT32_T
typedef u_int32_t uint32;
# else
# ifdef _WIN32
typedef unsigned __int32 uint32;
# else
typedef unsigned long uint32;
# endif
# endif
#endif
#ifdef _WIN32
# ifdef MSVCPP
# define snprintf _snprintf
# endif
# define popen _popen
# define pclose _pclose
# define ftruncate _chsize
# ifdef MSVCPP
# define PATH_MAX MAX_PATH
# endif
# define MAXPATHLEN MAX_PATH
# define bzero(buf, size) memset(buf, 0, size)
# ifdef MSVCPP
# define strcasecmp stricmp
# endif
# define sleep(x) Sleep(x * 1000)
#endif
#endif
+202 -96
View File
@@ -1,121 +1,227 @@
#ifndef _SYSCONF_H_
#define _SYSCONF_H_
/* include/sysconf.h.in. Generated from configure.in by autoheader. */
/* "Default umask Permissions" */
#undef DEFUMASK
#undef HAVE_SYS_TYPES_H
#undef HAVE_STDINT_H
#undef HAVE_STDDEF_H
/* "No prefix needed for dlopen" */
#undef DL_PREFIX
/* "Has sys/types.h" */
#undef HAS_SYS_TYPES_H
/* "" */
#undef HAVE_BACKTRACE
/* Define to 1 if you have the `fork' function. */
#undef HAVE_FORK
/* Define to 1 if you have the `gethostbyname' function. */
#undef HAVE_GETHOSTBYNAME
/* Define to 1 if you have the `gethostbyname_r' function. */
#undef HAVE_GETHOSTBYNAME_R
/* Define to 1 if you have the `gettimeofday' function. */
#undef HAVE_GETTIMEOFDAY
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the `setgrent' function. */
#undef HAVE_SETGRENT
/* Define to 1 if you have the `snprintf' function. */
#undef HAVE_SNPRINTF
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the `strcasecmp' function. */
#undef HAVE_STRCASECMP
/* Define to 1 if you have the `strdup' function. */
#undef HAVE_STRDUP
/* Define to 1 if you have the `strerror' function. */
#undef HAVE_STRERROR
/* Define to 1 if you have the `stricmp' function. */
#undef HAVE_STRICMP
/* "" */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the `strlcat' function. */
#undef HAVE_STRLCAT
/* Define to 1 if you have the `strlcpy' function. */
#undef HAVE_STRLCPY
/* Define to 1 if you have the `strsignal' function. */
#undef HAVE_STRSIGNAL
/* Define to 1 if you have the `strspn' function. */
#undef HAVE_STRSPN
/* Define to 1 if you have the `sys_errlist' function. */
#undef HAVE_SYS_ERRLIST
/* "" */
#undef HAVE_SYS_SELECT_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the `umask' function. */
#undef HAVE_UMASK
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* va_list as array */
#undef HAVE_VA_LIST_AS_ARRAY
/* "Module dir" */
#undef MODULE_PATH
/* "Has mysql/mysql.h" */
#undef MYSQL_HEADER_PREFIX
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* "Run group" */
#undef RUNGROUP
#define SERVICES_BIN "services"
#undef HAVE_UINT8_T
#undef HAVE_U_INT8_T
#undef HAVE_INT16_T
#undef HAVE_UINT16_T
#undef HAVE_U_INT16_T
#undef HAVE_INT32_T
#undef HAVE_UINT32_T
#undef HAVE_U_INT32_T
/* "Binary Dir" */
#undef SERVICES_BIN
/* "services bin dir" */
#undef SERVICES_DIR
/* The size of a `int', as computed by sizeof. */
#undef SIZEOF_INT
/* The size of a `long', as computed by sizeof. */
#undef SIZEOF_LONG
/* The size of a `short', as computed by sizeof. */
#undef SIZEOF_SHORT
/* "modules not available" */
#undef STATIC_LINKING
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* "Modules available" */
#undef USE_MODULES
/* "Use Mysql" */
#undef USE_MYSQL
/* "Use RDB" */
#undef USE_RDB
/* Define to `short' if <sys/types.h> does not define. */
#undef int16_t
/* Define to `long' if <sys/types.h> does not define. */
#undef int32_t
/* Define to `unsigned short' if <sys/types.h> does not define. */
#undef u_int16_t
/* Define to `unsigned long' if <sys/types.h> does not define. */
#undef u_int32_t
/* Static config, copy from here to below before running autoheader! */
#ifndef BIG_ENDIAN
/* Big Endian system */
#undef BIG_ENDIAN
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_STDINT_H
# include <stdint.h>
#endif
#ifdef HAVE_STDDEF_H
# include <stddef.h>
#endif
#ifdef HAVE_UINT8_T
typedef uint8_t uint8;
#else
# ifdef HAVE_U_INT8_T
typedef u_int8_t uint8;
# else
# ifdef _WIN32
typedef unsigned __int8 uint8;
# else
typedef unsigned short uint8;
# endif
# endif
#ifndef LITTLE_ENDIAN
/* Little Endian system */
#undef LITTLE_ENDIAN
#endif
#ifdef HAVE_INT16_T
/**
* NOTE: BIG_ENDIAN and LITTLE_ENDIAN defines should not be left in
* by autoheader as they may be defined or may not be, as such we check
* if there defined before messing with them!
**/
#ifdef HAS_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef __STRICT_ANSI__
#include <stdarg.h>
#include <stdio.h>
/* We KNOW these are not ansi, we are defining them here to suppress the warning
* * s messages on a "make strict" compile */
#ifndef snprintf
int snprintf(char *str, size_t size, const char *format, ...);
#endif
#ifndef vprintf
int vprintf(const char *format, va_list ap);
#endif
#ifndef vfprintf
int vfprintf(FILE *stream, const char *format, va_list ap);
#endif
#ifndef vsprintf
int vsprintf(char *str, const char *format, va_list ap);
#endif
#ifndef vsnprintf
int vsnprintf(char *str, size_t size, const char *format, va_list ap);
#endif
FILE *popen(const char *command, const char *type);
int pclose(FILE *stream);
FILE *fdopen(int fildes, const char *mode);
int ftruncate(int fd, off_t length);
#ifdef HAVE_STRSIGNAL
char *strsignal(int sig);
#endif
#endif
typedef int16_t int16;
#else
# ifdef _WIN32
typedef signed __int16 int16;
# else
typedef int int16;
# endif
#endif
#ifdef HAVE_UINT16_T
typedef uint16_t uint16;
#else
# ifdef HAVE_U_INT16_T
typedef u_int16_t uint16;
# else
# ifdef _WIN32
typedef unsigned __int16 uint16;
# else
typedef unsigned int uint16;
# endif
# endif
#endif
#ifdef HAVE_INT32_T
typedef int32_t int32;
#else
# ifdef _WIN32
typedef signed __int32 int32;
# else
typedef long int32;
# endif
#endif
#ifdef HAVE_UINT32_T
typedef uint32_t uint32;
#else
# ifdef HAVE_U_INT32_T
typedef u_int32_t uint32;
# else
# ifdef _WIN32
typedef unsigned __int32 uint32;
# else
typedef unsigned long uint32;
# endif
# endif
#endif
#ifdef _WIN32
# ifdef MSVCPP
# define snprintf _snprintf
# endif
# define popen _popen
# define pclose _pclose
# define ftruncate _chsize
# ifdef MSVCPP
# define PATH_MAX MAX_PATH
# endif
# define MAXPATHLEN MAX_PATH
# define bzero(buf, size) memset(buf, 0, size)
# ifdef MSVCPP
# define strcasecmp stricmp
# endif
# define sleep(x) Sleep(x * 1000)
#endif
#endif
+50
View File
@@ -0,0 +1,50 @@
#define SERVICES_DIR "data"
#define SERVICES_BIN "anope.exe"
typedef signed __int16 int16;
typedef signed __int16 int16_t;
typedef unsigned __int16 uint16;
typedef unsigned __int16 u_int16_t;
typedef signed __int32 int32;
typedef signed __int32 int32_t;
typedef unsigned __int32 uint32;
typedef unsigned __int32 u_int32_t;
typedef unsigned __int8 u_int8_t;
#define HAVE_STRINGS_H 0
#define HAVE_SYS_SELECT_H 0
#define HAVE_SYS_SYSPROTO_H 0
#define HAVE_STRERROR 1
#define HAVE_SYS_ERRLIST 0
#define HAVE_SNPRINTF 1
#define BAD_SNPRINTF 0
#define HAVE_STRICMP 1
#define HAVE_STRCASECMP 0
#define HAVE_STRDUP 1
#define HAVE_STRSPN 1
#define HAVE_STRSIGNAL 0
#define HAVE_GETTIMEOFDAY 0
#define HAVE_SETGRENT 0
#define HAVE_UMASK 0
#define HAVE_FORK 0
#define HAVE_GETHOSTBYNAME 1
#define HAVE_BACKTRACE 0
/* Enable Module support */
#define USE_MODULES
#define MODULE_PATH ".\\modules\\"
/* Windows/MSVC likes to name things differently */
#define snprintf _snprintf
#define popen _popen
#define pclose _pclose
#define ftruncate _chsize
#define PATH_MAX MAX_PATH
#define MAXPATHLEN MAX_PATH
#define bzero(buf, size) memset(buf, 0, size)
#define strcasecmp stricmp
#define sleep(x) Sleep(x*1000)
+11 -6
View File
@@ -21,16 +21,16 @@
/* Definitions for timeouts: */
typedef struct timeout_ Timeout;
struct timeout_ {
Timeout *next, *prev;
time_t settime, timeout;
int repeat; /* Does this timeout repeat indefinitely? */
void (*code)(Timeout *); /* This structure is passed to the code */
void *data; /* Can be anything */
Timeout *next, *prev;
time_t settime, timeout;
int repeat; /* Does this timeout repeat indefinitely? */
void (*code)(Timeout *); /* This structure is passed to the code */
void *data; /* Can be anything */
};
/* Check the timeout list for any pending actions. */
extern void check_timeouts();
extern void check_timeouts(void);
/* Add a timeout to the list to be triggered in `delay' seconds. Any
* timeout added from within a timeout routine will not be checked during
@@ -41,5 +41,10 @@ extern Timeout *add_timeout(int delay, void (*code)(Timeout *), int repeat);
/* Remove a timeout from the list (if it's there). */
extern void del_timeout(Timeout *t);
#ifdef DEBUG_COMMANDS
/* Send the list of timeouts to the given user. */
extern int send_timeout_list(User *u);
#endif
#endif /* TIMEOUT_H */
-101
View File
@@ -1,101 +0,0 @@
/*
* Copyright (C) 2008-2009 Robin Burchell <w00t@inspircd.org>
* Copyright (C) 2008-2009 Anope Team <team@anope.org>
*
* Please read COPYING and README for further details.
*
*
* $Id$
*
*/
struct u_chanlist {
struct u_chanlist *next, *prev;
Channel *chan;
int16 status; /* Associated flags; see CSTATUS_* below. */
};
struct u_chaninfolist {
struct u_chaninfolist *next, *prev;
ChannelInfo *chan;
};
/* Online user and channel data. */
class CoreExport User : public Extensible
{
public: // XXX: exposing a tiny bit too much
User *next, *prev;
char nick[NICKMAX];
char *username; /* ident */
char *host; /* User's real hostname */
char *hostip; /* User's IP number */
char *vhost; /* User's virtual hostname */
std::string chost; /* User's cloaked hostname */
char *vident; /* User's virtual ident */
char *realname; /* Realname */
Server *server; /* Server user is connected to */
char *nickTrack; /* Nick Tracking */
time_t timestamp; /* Timestamp of the nick */
time_t my_signon; /* When did _we_ see the user? */
time_t svid; /* Services ID */
uint32 mode; /* See below */
char *uid; /* Univeral ID */
NickAlias *na;
int isSuperAdmin; /* is SuperAdmin on or off? */
struct u_chanlist *chans; /* Channels user has joined */
struct u_chaninfolist *founder_chans; /* Channels user has identified for */
unsigned short invalid_pw_count; /* # of invalid password attempts */
time_t invalid_pw_time; /* Time of last invalid password */
time_t lastmemosend; /* Last time MS SEND command used */
time_t lastnickreg; /* Last time NS REGISTER cmd used */
time_t lastmail; /* Last time this user sent a mail */
/****************************************************************/
/** Create a new user object, initialising necessary fields and
* adds it to the hash
*
* @parameter nick The nickname of the user account.
*/
User(const std::string &nick);
/** Destroy a user.
*/
~User();
/** Update the nickname of a user record accordingly, should be
* called from ircd protocol.
*/
void SetNewNick(const std::string &newnick);
/** Update the displayed (vhost) of a user record.
* This is used (if set) instead of real host.
*/
void SetDisplayedHost(const std::string &host);
/** Update the displayed ident (username) of a user record.
*/
void SetIdent(const std::string &ident);
/** Updates the realname of the user record.
*/
void SetRealname(const std::string &realname);
/**
* Send a message (notice or privmsg, depending on settings) to a user
* @param source Sender nick
* @param fmt Format of the Message
* @param ... any number of parameters
* @return void
*/
void SendMessage(const char *source, const char *fmt, ...);
void SendMessage(const char *source, const std::string &msg);
};
+11 -10
View File
@@ -3,12 +3,8 @@
# Build version string and increment Services build number.
#
if [ $# -lt 2 ] ; then
echo "Syntax: $0 <version.log> <version.h>"
exit 1
fi
# Grab version information from the version control file.
CTRL="$1"
CTRL="../version.log"
if [ -f $CTRL ] ; then
. $CTRL
else
@@ -19,9 +15,8 @@ fi
VERSION="${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${VERSION_EXTRA} (${VERSION_BUILD})"
VERSIONDOTTED="${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${VERSION_EXTRA}.${VERSION_BUILD}"
VERSIONH="$2"
if [ -f $VERSIONH ] ; then
BUILD=`fgrep '#define BUILD' $VERSIONH | cut -f2 -d\"`
if [ -f version.h ] ; then
BUILD=`fgrep '#define BUILD' version.h | sed 's/^#define BUILD.*\([0-9]*\).*$/\1/'`
BUILD=`expr $BUILD + 1 2>/dev/null`
else
BUILD=1
@@ -29,10 +24,10 @@ fi
if [ ! "$BUILD" ] ; then
BUILD=1
fi
cat >$VERSIONH <<EOF
cat >version.h <<EOF
/* Version information for Services.
*
* (C) 2003-2008 Anope Team
* (C) 2003-2009 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and CREDITS for further details.
@@ -57,6 +52,12 @@ cat >$VERSIONH <<EOF
#define VERSION_STRING "$VERSION"
#define VERSION_STRING_DOTTED "$VERSIONDOTTED"
#ifdef DEBUG_COMMANDS
# define VER_DEBUG "D"
#else
# define VER_DEBUG
#endif
#if defined(_WIN32)
# if _MSC_VER >= 1400
# define VER_OS "W"
+133 -147
View File
@@ -16,8 +16,8 @@
#include <stdio.h>
#include <string.h>
#include <cstdlib>
#include <cctype>
#define CTRL "version.log"
long version_major, version_minor, version_patch, version_build, build;
char *version_extra = NULL;
@@ -30,209 +30,195 @@ long get_value(char *);
char *get_value_str(char *);
char *strip(char *);
void parse_version(FILE *);
void write_version(FILE *, const char *);
void write_version(FILE *);
void parse_line(FILE *, char *);
int main(int argc, char *argv[])
int main()
{
if (argc < 4) {
fprintf(stderr, "Syntax: %s <version.log> <version.sh> <version.h>\n", argv[0]);
exit(1);
}
FILE *fd = fopen(argv[1], "r");
FILE *fd = fopen(CTRL, "r");
if (!fd) {
fprintf(stderr, "Error: Unable to find control file: %s\n", argv[1]);
exit(0);
}
if (!fd) {
fprintf(stderr, "Error: Unable to find control file: " CTRL "\n");
exit(0);
}
load_ctrl(fd);
fclose(fd);
load_ctrl(fd);
fclose(fd);
_snprintf(version, 1024, "%ld.%ld.%ld%s (%ld)", version_major, version_minor,
version_patch, (version_extra ? version_extra : ""), version_build);
_snprintf(version, 1024, "%d.%d.%d%s (%d)", version_major, version_minor,
version_patch, (version_extra ? version_extra : ""), version_build);
_snprintf(version_dotted, 1024, "%ld.%ld.%ld%s.%ld", version_major, version_minor,
version_patch, (version_extra ? version_extra : ""), version_build);
_snprintf(version_dotted, 1024, "%d.%d.%d%s.%d", version_major, version_minor,
version_patch, (version_extra ? version_extra : ""), version_build);
fd = fopen(argv[3], "r");
fd = fopen("version.h", "r");
if (fd) {
parse_version(fd);
fclose(fd);
} else
build = 1;
if (fd) {
parse_version(fd);
fclose(fd);
} else
build = 1;
fd = fopen(argv[3], "w");
write_version(fd, argv[2]);
fclose(fd);
fd = fopen("version.h", "w");
write_version(fd);
fclose(fd);
if (version_extra)
free(version_extra);
}
void load_ctrl(FILE * fd)
{
char buf[512];
while (fgets(buf, 511, fd)) {
char *var;
char buf[512];
while (fgets(buf, 511, fd)) {
char *var;
strip(buf);
strip(buf);
var = strtok(buf, "=");
if (!var)
continue;
if (!strcmp(var, "VERSION_MAJOR"))
version_major = get_value(strtok(NULL, ""));
else if (!strcmp(var, "VERSION_MINOR"))
version_minor = get_value(strtok(NULL, ""));
else if (!strcmp(var, "VERSION_PATCH"))
version_patch = get_value(strtok(NULL, ""));
else if (!strcmp(var, "VERSION_BUILD"))
version_build = get_value(strtok(NULL, ""));
else if (!strcmp(var, "VERSION_EXTRA"))
version_extra = get_value_str(strtok(NULL, ""));
var = strtok(buf, "=");
if (!var)
continue;
if (!strcmp(var, "VERSION_MAJOR"))
version_major = get_value(strtok(NULL, ""));
else if (!strcmp(var, "VERSION_MINOR"))
version_minor = get_value(strtok(NULL, ""));
else if (!strcmp(var, "VERSION_PATCH"))
version_patch = get_value(strtok(NULL, ""));
else if (!strcmp(var, "VERSION_BUILD"))
version_build = get_value(strtok(NULL, ""));
else if (!strcmp(var, "VERSION_EXTRA"))
version_extra = get_value_str(strtok(NULL, ""));
}
}
}
char *strip(char *str)
{
char *c;
if ((c = strchr(str, '\n')))
*c = 0;
if ((c = strchr(str, '\r')))
*c = 0;
return str;
char *c;
if ((c = strchr(str, '\n')))
*c = 0;
if ((c = strchr(str, '\r')))
*c = 0;
return str;
}
long get_value(char *string)
{
// XXX : if the fields in version.log are empty strtok returns a double quote, dont try to atol it then
if (string[1] != '"')
return atol(get_value_str(string));
else
return 0;
return atol(get_value_str(string));
}
char *get_value_str(char *string)
{
int len;
char *newstr;
int len;
if (*string == '"')
string++;
if (*string == '"')
string++;
len = strlen(string);
len = strlen(string);
if (string[len - 1] == '"')
string[len - 1] = 0;
if (!*string)
return NULL;
newstr = (char *)malloc(len + 1);
strcpy(newstr, string);
return newstr;
//return strdup(string);
if (string[len - 1] == '"')
string[len - 1] = 0;
if (!*string)
return NULL;
return strdup(string);
}
void parse_version(FILE * fd)
{
char buf[1024];
char buf[1024];
while (fgets(buf, 1023, fd)) {
char *para1;
while (fgets(buf, 1023, fd)) {
char *para1;
strip(buf);
para1 = strtok(buf, " \t");
strip(buf);
para1 = strtok(buf, " \t");
if (!para1)
continue;
if (!para1)
continue;
if (!strcmp(para1, "#define")) {
char *para2 = strtok(NULL, " \t");
if (!strcmp(para1, "#define")) {
char *para2 = strtok(NULL, " \t");
if (!para2)
continue;
if (!para2)
continue;
if (!strcmp(para2, "BUILD")) {
char *value = strtok(NULL, "");
build = get_value(value);
build++;
return;
}
}
}
build = 1;
if (!strcmp(para2, "BUILD")) {
char *value = strtok(NULL, "");
build = get_value(value);
build++;
return;
}
}
}
build = 1;
}
void write_version(FILE * fd, const char *input)
void write_version(FILE * fd)
{
FILE *fdin = fopen(input, "r");
char buf[1024];
short until_eof = 0;
FILE *fdin = fopen("include\\version.sh", "r");
char buf[1024];
short until_eof = 0;
while (fgets(buf, 1023, fdin)) {
strip(buf);
while (fgets(buf, 1023, fdin)) {
strip(buf);
if (until_eof)
{
if (!strcmp(buf, "EOF"))
break;
else
parse_line(fd, buf);
}
if (until_eof)
if (!strcmp(buf, "EOF"))
break;
else
parse_line(fd, buf);
if (!strcmp(buf, "cat >$VERSIONH <<EOF"))
until_eof = 1;
}
if (!strcmp(buf, "cat >version.h <<EOF"))
until_eof = 1;
}
}
void parse_line(FILE * fd, char *line)
{
char *c;
for (c = line; *c; c++) {
/* It's a variable, find out which */
if (*c == '$') {
char *var, *varbegin;
char *c;
for (c = line; *c; c++) {
/* It's a variable, find out which */
if (*c == '$') {
char *var, *varbegin;
if (*(c + 1))
c++;
else
continue;
for (var = varbegin = c; var; var++) {
if (!isalnum(*var) && *var != '_')
break;
}
if (var != varbegin) {
char tmp = *var;
if (*(c + 1))
c++;
else
continue;
for (var = varbegin = c; var; var++) {
if (!isalnum(*var) && *var != '_')
break;
}
if (var != varbegin) {
char tmp = *var;
*var = 0;
if (!strcmp(varbegin, "VERSION_MAJOR"))
fprintf(fd, "%ld", version_major);
else if (!strcmp(varbegin, "VERSION_MINOR"))
fprintf(fd, "%ld", version_minor);
else if (!strcmp(varbegin, "VERSION_PATCH"))
fprintf(fd, "%ld", version_patch);
else if (!strcmp(varbegin, "VERSION_EXTRA")) {
if (version_extra)
fprintf(fd, "%s", version_extra);
} else if (!strcmp(varbegin, "VERSION_BUILD"))
fprintf(fd, "%ld", version_build);
else if (!strcmp(varbegin, "BUILD"))
fprintf(fd, "%ld", build);
else if (!strcmp(varbegin, "VERSION"))
fprintf(fd, "%s", version);
else if (!strcmp(varbegin, "VERSIONDOTTED"))
fprintf(fd, "%s", version_dotted);
if (tmp) fputc(tmp, fd);
}
c = var;
} else
fputc(*c, fd);
}
*var = 0;
if (!strcmp(varbegin, "VERSION_MAJOR"))
fprintf(fd, "%d", version_major);
else if (!strcmp(varbegin, "VERSION_MINOR"))
fprintf(fd, "%d", version_minor);
else if (!strcmp(varbegin, "VERSION_PATCH"))
fprintf(fd, "%d", version_patch);
else if (!strcmp(varbegin, "VERSION_EXTRA")) {
if (version_extra)
fprintf(fd, "%s", version_extra);
} else if (!strcmp(varbegin, "VERSION_BUILD"))
fprintf(fd, "%d", version_build);
else if (!strcmp(varbegin, "BUILD"))
fprintf(fd, "%d", build);
else if (!strcmp(varbegin, "VERSION"))
fprintf(fd, "%s", version);
else if (!strcmp(varbegin, "VERSIONDOTTED"))
fprintf(fd, "%s", version_dotted);
fputc(tmp, fd);
}
c = var;
} else
fputc(*c, fd);
}
/* We only need \n here - we didn't open the file as binary -GD */
fprintf(fd, "\n");
fprintf(fd, "\n");
}
+549 -256
View File
@@ -1,7 +1,7 @@
//
// install.js - Windows Configuration
//
// (C) 2003-2008 Anope Team
// (C) 2003-2009 Anope Team
// Contact us at team@anope.org
//
// This program is free but copyrighted software; see the file COPYING for
@@ -15,264 +15,557 @@
var anopeVersion = "Unknown";
var vMaj, vMin, vPat, vBuild, vExtra;
var drivesToCheck = ['C', 'D', 'E', 'F', 'G', 'H'];
var installerResponses = new Array();
var softwareVersions = {
'Compiler' : false,
'MySQLDB' : false
};
var installerQuestions = [
{
'question' : [
'In what directory do you want Anope to be installed?'
],
'short' : 'Install directory:',
'default_answer' : '',
'store_answer' : function(answer) {
if (!answer) {
WScript.Echo("You must give a directory!\n");
return false;
{
'question' : [
'Do you want to compile Anope with MySQL Support?',
'NOTE: You will need to have installed MySQL 3.23 or Above'
],
'short' : 'Enable MySQL Support?',
'options' : [
'yes',
'no'
],
'default_answer' : 'no',
'store_answer' : function (answer) {
if (answer == 'yes') {
if (!findMySQL()) {
WScript.Echo("\nERROR: Cannot find MySQL - See error messages above for details.\n");
return false;
}
}
installerResponses['MySQL DB Support'] = answer;
return true;
},
'commit_config' : function() {
if (installerResponses['MySQL DB Support'] == 'yes') {
f.WriteLine("USE_MYSQL=1");
f.WriteLine("MYSQL_LIB=\""+softwareVersions['MySQLDB'].installedDrive+":\\"+softwareVersions['MySQLDB'].libpaths[0]+"\"");
f.WriteLine("MYSQL_INC=\""+softwareVersions['MySQLDB'].installedDrive+":\\"+softwareVersions['MySQLDB'].incpaths[0]+"\"");
f.WriteLine("LIBS=$(LIBS) /LIBPATH:$(MYSQL_LIB)");
f.WriteLine("MYSQL_LIB_PATH=/LIBPATH:$(MYSQL_LIB)");
f.WriteLine("BASE_CFLAGS=$(BASE_CFLAGS) /I $(MYSQL_INC)");
f.WriteLine("MYSQL_INC_PATH=/I $(MYSQL_INC)");
f.WriteLine("RDB_C=rdb.c");
f.WriteLine("RDB_O=rdb.obj");
f.WriteLine("MYSQL_C=mysql.c");
f.WriteLine("MYSQL_O=mysql.obj");
f.WriteLine("BASE_CFLAGS=/D USE_MYSQL /D USE_RDB $(BASE_CFLAGS) /D HAVE_MYSQL_MYSQL_H");
f.WriteLine("MYPASQL_BUILD=$(CC) /LD $(MYSQL_INC_PATH) src\\mypasql.c /link $(MYSQL_LIB_PATH) $(LFLAGS) /DEF:src\mypasql.def libmysql.lib zlib.lib ws2_32.lib advapi32.lib /NODEFAULTLIB:LIBCMTD.lib");
f.WriteLine("LIBS=$(LIBS) libmysql.lib zlib.lib");
}
else {
f.WriteLine("USE_MYSQL=0");
}
}
},
];
var buildPackages = [
{
'name' : 'Microsoft Visual Studio 2008 (New PSDK)',
'libpaths' : [
'Program Files\\Microsoft Visual Studio 9.0\\VC\\Lib',
'Program Files\\Microsoft Platform SDK for Windows Server 2003 R2\\Lib'
],
'incpaths' : [
'Program Files\\Microsoft Visual Studio 9.0\\VC\\Include',
'Program Files\\Microsoft Platform SDK for Windows Server 2003 R2\\Include'
],
'nmake' : [
'Program Files\\Microsoft Platform SDK for Windows Server 2003 R2\\Bin',
],
'additional_switches' : [ '/w' ],
'installedDrive' : 'C'
},
{
'name' : 'Microsoft Visual Studio 2008 (64bit) (New PSDK)',
'libpaths' : [
'Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\Lib',
'Program Files\\Microsoft Platform SDK for Windows Server 2003 R2\\Lib'
],
'incpaths' : [
'Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\Include',
'Program Files\\Microsoft Platform SDK for Windows Server 2003 R2\\Include'
],
'nmake' : [
'Program Files\\Microsoft Platform SDK for Windows Server 2003 R2\\Bin',
],
'additional_switches' : [ '/w' ],
'installedDrive' : 'C'
},
{
'name' : 'Microsoft Visual Studio 2005 (New PSDK)',
'libpaths' : [
'Program Files\\Microsoft Visual Studio 8\\VC\\Lib',
'Program Files\\Microsoft Platform SDK for Windows Server 2003 R2\\Lib'
],
'incpaths' : [
'Program Files\\Microsoft Visual Studio 8\\VC\\Include',
'Program Files\\Microsoft Platform SDK for Windows Server 2003 R2\\Include'
],
'nmake' : [
'Program Files\\Microsoft Platform SDK for Windows Server 2003 R2\\Bin',
''
],
'additional_switches' : [
'/w'
],
'installedDrive' : 'C'
},
{
'name' : 'Microsoft Visual Studio 2005 (Old PSDK)',
'libpaths' : [
'Program Files\\Microsoft Visual Studio 8\\VC\\Lib',
'Program Files\\Microsoft Platform SDK\\Lib'
],
'incpaths' : [
'Program Files\\Microsoft Visual Studio 8\\VC\\Include',
'Program Files\\Microsoft Platform SDK\\Include'
],
'nmake' : [
'Program Files\\Microsoft Platform SDK\\Bin',
''
],
'additional_switches' : [
'/w'
],
'installedDrive' : 'C'
},
{
'name' : 'Microsoft Visual Studio .NET 2003',
'libpaths' : [
'Program Files\\Microsoft Visual Studio .NET 2003\\VC7\\Lib',
'Program Files\\Microsoft Visual Studio .NET 2003\\PlatformSDK\\Lib'
],
'incpaths' : [
'Program Files\\Microsoft Visual Studio .NET 2003\\VC7\\Include',
'Program Files\\Microsoft Visual Studio .NET 2003\\PlatformSDK\\Include'
],
'nmake' : [
'Program Files\\Microsoft Visual Studio .NET 2003\\VC7\\Bin',
''
],
'additional_switches' : false,
'installedDrive' : 'C'
},
{
'name' : 'Microsoft Visual Studio 98',
'libpaths' : [
'Program Files\\Microsoft Visual Studio\\VC98\\Lib'
],
'incpaths' : [
'Program Files\\Microsoft Visual Studio\\VC98\\Include'
],
'nmake' : [
'Program Files\\Microsoft Visual Studio\\VC98\\Bin',
''
],
'additional_switches' : [
'/QIfist'
],
'installedDrive' : 'C'
}
];
var mysqlVersions = [
{
'name' : 'MySQL 5.1',
'libpaths' : [
'Program Files\\MySQL\\MySQL Server 5.1\\Lib\\opt'
],
'incpaths' : [
'Program Files\\MySQL\\MySQL Server 5.1\\Include'
],
'dllfile' : 'Program Files\\MySQL\\MySQL Server 5.1\\bin\\libmsyql.dll',
'installedDrive' : 'C'
},
{
'name' : 'MySQL 5.0',
'libpaths' : [
'Program Files\\MySQL\\MySQL Server 5.0\\Lib\\opt'
],
'incpaths' : [
'Program Files\\MySQL\\MySQL Server 5.0\\Include'
],
'dllfile' : 'Program Files\\MySQL\\MySQL Server 5.0\\Bin\\libmysql.dll',
'installedDrive' : 'C'
},
{
'name' : 'MySQL 4.1',
'libpaths' : [
'Program Files\\MySQL\\MySQL Server 4.1\\Lib\\opt'
],
'incpaths' : [
'Program Files\\MySQL\\MySQL Server 4.1\\Include'
],
'dllfile' : 'Program Files\\MySQL\\MySQL Server 4.1\\Bin\\libmysql.dll',
'installedDrive' : 'C'
},
{
'name' : 'MySQL 4.0',
'libpaths' : [
'Program Files\\MySQL\\MySQL Server 4.0\\Lib\\opt'
],
'incpaths' : [
'Program Files\\MySQL\\MySQL Server 4.0\\Include'
],
'dllfile' : 'Program Files\\MySQL\\MySQL Server 4.0\\Bin\\libmysql.dll',
'installedDrive' : 'C'
},
{
'name' : 'MySQL 3.23 or older (or other default path)',
'libpaths' : [
'mysql\\lib\\opt'
],
'incpaths' : [
'mysql\\include'
],
'dllfile' : 'mysql\\Bin\\libmysql.dll',
'installedDrive' : 'C'
}
];
var bannerReplacements = [
{
'findtext' : /CURVER/g,
'replacement' : function() { FindAnopeVersion(); return anopeVersion; }
},
{
'findtext' : / For more options type .\/Config --help/g,
'replacement' : function() { return ''; }
}
];
var fso = WScript.CreateObject("Scripting.FileSystemObject");
var x, y, z;
if (fso.FileExists('.BANNER')) {
var bannerStream = fso.OpenTextFile(".BANNER");
var bannerText = bannerStream.ReadAll();
bannerStream.close();
for (x in bannerReplacements) {
var thisReplacement = bannerReplacements[x];
bannerText = bannerText.replace(thisReplacement['findtext'], thisReplacement['replacement']);
}
WScript.Echo(bannerText+"\n");
}
else {
WScript.Echo("ERROR: Cannot find banner file!\n");
}
WScript.Echo("Press Enter to Begin...");
InstallerInput();
WScript.Echo("");
for (x in installerQuestions) {
var thisQuestion = installerQuestions[x];
var validResponse = false;
var validOpts = new Array();
while (!validResponse) {
for (y in thisQuestion.question) {
var qLine = thisQuestion.question[y];
WScript.Echo(qLine);
}
WScript.Echo('');
var choiceLine = '';
for (y in thisQuestion.options) {
choiceLine += thisQuestion.options[y] + ', ';
validOpts[thisQuestion.options[y]] = true;
}
choiceLine = choiceLine.substring(0, choiceLine.length - 2);
WScript.Echo("Available Options: "+choiceLine);
WScript.Echo("Default Answer: "+thisQuestion.default_answer+"\n");
WScript.Echo(thisQuestion.short);
var inputValue = InstallerInput().toLowerCase();
if (!inputValue) {
inputValue = thisQuestion.default_answer;
}
if (!validOpts[inputValue]) {
WScript.Echo("ERROR: Invalid option '"+inputValue+"'\n");
}
else if (thisQuestion.store_answer(inputValue)) {
validResponse = true;
}
}
WScript.Echo("");
}
if (!findCompiler()) {
WScript.Echo("\nERROR: No suitable build tools were found!");
WScript.Echo("Please ensure you have downloaded and installed a version of Visual C++ and/or PlatformSDK.\n");
WScript.Echo("For more information on the tools needed to build Anope on Windows, see:\nhttp://anope.info/wiki/Windows#Compiling\n");
}
else {
WScript.Echo("\nBuild tools were found successfully!\n");
WScript.Echo("\nAnope will be compiled with the following options:\n");
for (x in installerResponses) {
var thisResponse = installerResponses[x];
WScript.Echo("\t"+x+":\t\t["+thisResponse.toUpperCase()+"]");
}
for (x in softwareVersions) {
var thisVer = softwareVersions[x];
if (!thisVer) {
WScript.Echo("\t"+x+" Version:\t\tNot Enabled");
}
else {
WScript.Echo("\t"+x+" Version:\t\t"+thisVer.name);
}
}
WScript.Echo("\tAnope Version:\t\t\t"+anopeVersion);
WScript.Echo("\nTo continue, please press Enter...");
InstallerInput();
var f = fso.OpenTextFile("Makefile.inc.win32", 2);
f.WriteLine("#");
f.WriteLine("# Generated by install.js");
f.WriteLine("#");
if (typeof(softwareVersions['Compiler'].additional_switches) !== 'boolean') {
var switch_line = '';
for (x in softwareVersions['Compiler'].additional_switches) {
switch_line += softwareVersions['Compiler'].additional_switches[x]+" ";
}
f.WriteLine("VC6="+switch_line);
}
var path_line = '';
for (x in softwareVersions['Compiler'].libpaths) {
path_line += "/LIBPATH:\""+softwareVersions['Compiler'].installedDrive+":\\"+softwareVersions['Compiler'].libpaths[x]+"\" ";
}
f.WriteLine("LIBPATH="+path_line);
path_line = '';
var path_line_rc = '';
for (x in softwareVersions['Compiler'].incpaths) {
path_line += "/I \""+softwareVersions['Compiler'].installedDrive+":\\"+softwareVersions['Compiler'].incpaths[x]+"\" ";
path_line_rc += "/i \""+softwareVersions['Compiler'].installedDrive+":\\"+softwareVersions['Compiler'].incpaths[x]+"\" ";
}
f.WriteLine("INCFLAGS="+path_line);
f.WriteLine("VERSION="+anopeVersion);
f.WriteLine("PROGRAM=anope.exe");
f.WriteLine("DATDEST=data");
f.WriteLine("CC=cl");
f.WriteLine("RC=rc");
f.WriteLine("MAKE=nmake -f Makefile.win32");
f.WriteLine("BASE_CFLAGS=$(VC6) /O2 /MD $(INCFLAGS)");
f.WriteLine("RC_FLAGS="+path_line_rc);
f.WriteLine("LIBS=wsock32.lib advapi32.lib /NODEFAULTLIB:libcmtd.lib");
f.WriteLine("LFLAGS=$(LIBPATH)");
for (x in installerQuestions) {
var thisQuestion = installerQuestions[x];
thisQuestion.commit_config();
}
f.WriteLine("MORE_CFLAGS = /I\"../include\"");
f.WriteLine("CFLAGS = /nologo $(CDEFS) $(BASE_CFLAGS) $(MORE_CFLAGS)");
f.close();
generateRC();
WScript.Echo("\nConfiguration Complete!");
WScript.Echo("-----------------------\n");
WScript.Echo("Anope has been configured to your system. To compile, simply type:");
WScript.Echo("nmake -f Makefile.win32\n");
WScript.Echo("If you update Anope, you should run this script again to ensure\nall available options are set.\n");
}
// Fin.
// -----------------------------------------------------------------
// Functions
function FindAnopeVersion() {
if (!fso.FileExists('version.log')) {
anopeVersion = 'Unknown';
return;
}
var versionLog = fso.OpenTextFile("version.log");
while (!versionLog.atEndOfStream) {
var versionLine = versionLog.readline();
var thisMatch = versionLine.replace('\n', '');
while (thisMatch.match(/\"/g)) {
thisMatch = thisMatch.replace('"', '');
}
if (!fso.FolderExists(answer)) {
if (fso.FileExists(answer)) {
WScript.Echo(answer + " exists, but is not a directory!\n");
return false;
}
WScript.Echo(answer + " does not exist. Create it ([yes]/no)?\n");
var inputValue = InstallerInput().toLowerCase();
if (!inputValue) {
inputValue = 'yes';
}
if (inputValue != 'no') {
fso.CreateFolder(answer);
}
}
else if (fso.FileExists(answer + '\\include\\services.h')) {
WScript.Echo("You cannot use the Anope source directory as a target directory.\n");
return false;
}
installerResponses['Install Directory'] = answer.replace(/\\/g, '/');
return true;
},
'cmake_argument' : function() {
return '-DINSTDIR:STRING=' + installerResponses['Install Directory'];
versionLine = thisMatch;
if (versionLine.match(/VERSION_MAJOR=/g)) {
vMaj = versionLine.replace('VERSION_MAJOR=', '');
continue;
}
if (versionLine.match(/VERSION_MINOR=/g)) {
vMin = versionLine.replace('VERSION_MINOR=', '');
continue;
}
if (versionLine.match(/VERSION_PATCH=/g)) {
vPat = versionLine.replace('VERSION_PATCH=', '');
continue;
}
if (versionLine.match(/VERSION_EXTRA=/g)) {
vExtra = versionLine.replace('VERSION_EXTRA=', '');
continue;
}
if (versionLine.match(/VERSION_BUILD=/g)) {
vBuild = versionLine.replace('VERSION_BUILD=', '');
continue;
}
}
versionLog.close();
anopeVersion = vMaj+"."+vMin+"."+vPat+"."+vBuild+vExtra;
return;
}
function InstallerInput() {
var input = WScript.StdIn.Readline();
return input;
}
function findMySQL() {
WScript.Echo("\nLooking for MySQL...\n");
var installedDrive = "";
for (x in mysqlVersions) {
var thisSQLVer = mysqlVersions[x];
WScript.Echo("Looking for: "+thisSQLVer.name+"...");
if (!(installedDrive = findFile("libmysql.lib", thisSQLVer.libpaths))) {
WScript.Echo("ERROR: Cannot find libmysql.lib - This version is probably not installed...\n");
continue;
}
if (!findFile("mysql.h", thisSQLVer.incpaths)) {
WScript.Echo("ERROR: Cannot find mysql.h - Half of this version of MySQL is installed (strange)...\n");
continue;
}
WScript.Echo("SUCCESS: "+thisSQLVer.name+" is installed, and is complete!\n");
thisSQLVer.installedDrive = installedDrive;
softwareVersions.MySQLDB = thisSQLVer;
return true;
}
return false;
}
function findCompiler() {
WScript.Echo("\nLooking for a suitable compiler...\n");
var noPSDK = false;
var installedDrive = "";
for (x in buildPackages) {
var thisPack = buildPackages[x];
WScript.Echo("Looking for: "+thisPack.name+"...");
if (!(installedDrive = findFile("MSVCRT.lib", thisPack.libpaths))) {
WScript.Echo("ERROR: Cannot find MSVCRT.lib - This version is probably not installed...\n");
continue;
}
if (!findFile("wsock32.lib", thisPack.libpaths)) {
WScript.Echo("ERROR: Cannot find wsock32.lib - Probably missing PlatformSDK...\n");
noPSDK = true;
continue;
}
if (!findFile("advapi32.lib", thisPack.libpaths)) {
WScript.Echo("ERROR: Cannot find advapi32.lib - Probably missing PlatformSDK...\n");
noPSDK = true;
continue;
}
if (!findFile("stdio.h", thisPack.incpaths)) {
WScript.Echo("ERROR: Cannot find stdio.h - Missing core header files...\n");
continue;
}
if (!findFile("windows.h", thisPack.incpaths)) {
WScript.Echo("ERROR: Cannot find windows.h - Probably missing PlatformSDK headers...\n");
noPSDK = true;
continue;
}
if (!findFile("nmake.exe", thisPack.nmake)) {
WScript.Echo("ERROR: Cannot find a copy of nmake.exe...\n");
WScript.Echo("In order to compile Anope, you need a working copy of nmake.exe on your system.");
WScript.Echo("A freely available copy can be downloaded from the url below.");
WScript.Echo("nmake.exe is also available in the PlatformSDK which can be freely downloaded from Microsoft.\n");
WScript.Echo("nmake.exe:\nhttp://download.microsoft.com/download/vc15/patch/1.52/w95/en-us/nmake15.exe\n");
break;
}
WScript.Echo("SUCCESS: "+thisPack.name+" was found, and is complete!");
thisPack.installedDrive = installedDrive;
softwareVersions.Compiler = thisPack;
return true;
}
if (noPSDK) {
WScript.Echo("Some of the build tools were detected on your computer, but the essential PlatformSDK components were missing.");
WScript.Echo("You will need to download the PlatformSDK from the URL below, ensuring that the Core Windows files, and Debugging Tools are installed.");
WScript.Echo("For more details on installing the PlatformSDK, visit http://anope.info/wiki/Windows#Compiling\n");
WScript.Echo("PSDK: http://download.microsoft.com/download/a/5/f/a5f0d781-e201-4ab6-8c6a-9bb4efed1e1a/PSDK-x86.exe\n");
}
return false;
}
function findFile(fileName, arrayOfPaths) {
for (z in arrayOfPaths) {
var thisPath = arrayOfPaths[z];
for (y in drivesToCheck) {
var thisDrive = drivesToCheck[y];
if (fso.FileExists(thisDrive+":\\"+thisPath+"\\"+fileName)) {
return thisDrive;
}
}
}
},
{
'question' : [
'Would you like to build using NMake instead of using Visual Studio?',
'NOTE: If you decide to use NMake, you must be in an environment where',
' NMake can function, such as the Visual Studio command line.',
' If you say yes to this while not in an environment that can run',
' NMake, it can cause the CMake configuration to enter an endless',
' loop.'
],
'short' : 'Use NMake?',
'options' : [
'yes',
'no'
],
'default_answer' : 'no',
'store_answer' : function(answer) {
installerResponses['Use NMake'] = answer;
return true;
},
'cmake_argument' : function() {
if (installerResponses['Use NMake'] == 'yes') return '-G"NMake Makefiles"';
else return '';
}
},
{
'question' : [
'Would you like to build a debug version of Anope?'
],
'short' : 'Build debug?',
'options' : [
'yes',
'no'
],
'default_answer' : 'no',
'store_answer' : function(answer) {
installerResponses['Debug'] = answer;
return true;
},
'cmake_argument' : function() {
if (installerResponses['Debug'] == 'msvc') return '';
else if (installerResponses['Debug'] == 'yes') return '-DCMAKE_BUILD_TYPE:STRING=DEBUG';
else return '-DCMAKE_BUILD_TYPE:STRING=RELEASE';
}
},
{
'question' : [
'Are you using Visual Studio 2008? If you are, you need to answer yes',
'to this question, otherwise CMake will not function properly.'
],
'short' : 'Using Visual Studio 2008?',
'options' : [
'yes',
'no'
],
'default_answer' : 'no',
'store_answer' : function(answer) {
installerResponses['Visual Studio 2008'] = answer;
return true;
},
'cmake_argument' : function() {
if (installerResponses['Visual Studio 2008'] == 'yes') return '-G"Visual Studio 9 2008"';
else return '';
}
},
];
var bannerReplacements = [
{
'findtext' : /CURVER/g,
'replacement' : function() { FindAnopeVersion(); return anopeVersion; }
},
{
'findtext' : / For more options type SOURCE_DIR\/Config --help/g,
'replacement' : function() { return ''; }
}
];
var ScriptPath = WScript.ScriptFullName.substr(0, WScript.ScriptFullName.length - WScript.ScriptName.length);
var fso = WScript.CreateObject('Scripting.FileSystemObject');
var x, y, z;
if (fso.FileExists(ScriptPath + '.BANNER')) {
var bannerStream = fso.OpenTextFile(ScriptPath + '.BANNER');
var bannerText = bannerStream.ReadAll();
bannerStream.close();
for (x in bannerReplacements) {
var thisReplacement = bannerReplacements[x];
bannerText = bannerText.replace(thisReplacement['findtext'], thisReplacement['replacement']);
}
WScript.Echo(bannerText + "\n");
}
else {
WScript.Echo("ERROR: Cannot find banner file!\n");
}
WScript.Echo('Press Enter to Begin...');
InstallerInput();
WScript.Echo('');
for (x in installerQuestions) {
var thisQuestion = installerQuestions[x];
var validResponse = false;
var validOpts = new Array();
if (thisQuestion.short == 'Build debug?' && installerResponses['Use NMake'] == 'no') {
installerResponses['Debug'] = 'msvc';
continue;
}
if (thisQuestion.short == 'Using Visual Studio 2008?' && installerResponses['Debug'] != 'msvc') {
installerResponses['Visual Studio 2008'] = 'no';
continue;
}
while (!validResponse) {
for (y in thisQuestion.question) {
var qLine = thisQuestion.question[y];
WScript.Echo(qLine);
}
WScript.Echo('');
var choiceLine = '';
if (thisQuestion.options) {
for (y in thisQuestion.options) {
choiceLine += thisQuestion.options[y] + ', ';
validOpts[thisQuestion.options[y]] = true;
}
choiceLine = choiceLine.substring(0, choiceLine.length - 2);
WScript.Echo('Available Options: ' + choiceLine);
}
if (thisQuestion.default_answer) WScript.Echo('Default Answer: ' + thisQuestion.default_answer + "\n");
WScript.Echo(thisQuestion.short);
var inputValue = InstallerInput().toLowerCase();
if (!inputValue) {
inputValue = thisQuestion.default_answer;
}
if (choiceLine && !validOpts[inputValue]) {
WScript.Echo("ERROR: Invalid option '" + inputValue + "'\n");
}
else if (thisQuestion.store_answer(inputValue)) {
validResponse = true;
}
}
WScript.Echo('');
}
WScript.Echo("\nAnope will be compiled with the following options:\n");
for (x in installerResponses) {
var thisResponse = installerResponses[x];
WScript.Echo("\t" + x + ":\t\t[" + thisResponse.toUpperCase() + "]");
}
WScript.Echo("\tAnope Version:\t\t\t" + anopeVersion);
WScript.Echo("\nTo continue, please press Enter...");
InstallerInput();
var cmake = 'cmake';
for (x in installerQuestions) {
var thisQuestion = installerQuestions[x];
cmake += ' ' + thisQuestion.cmake_argument();
}
cmake += ' "' + ScriptPath + '"';
WScript.Echo(cmake + "\n");
var shell = WScript.CreateObject('WScript.Shell');
var cmake_shell = shell.exec('%comspec% /c ' + cmake);
while (!cmake_shell.StdOut.AtEndOfStream) {
var strLine = cmake_shell.StdOut.ReadLine();
WScript.Echo(strLine);
}
if (installerResponses['Use NMake'] == 'yes') WScript.Echo("\nTo compile Anope, run 'nmake'. To install, run 'nmake install'.\n");
else WScript.Echo("\nTo compile Anope, open Anope.sln and build the solution. To install,\ndo a build on the INSTALL project.\n");
WScript.Echo("If you update Anope, you should run this script again to ensure\nall available options are set.\n");
// -----------------------------------------------------------------
// Functions
function FindAnopeVersion() {
if (!fso.FileExists(ScriptPath + 'version.log')) {
anopeVersion = 'Unknown';
return;
}
var versionLog = fso.OpenTextFile(ScriptPath + 'version.log');
while (!versionLog.atEndOfStream) {
var versionLine = versionLog.readline();
var thisMatch = versionLine.replace('\n', '');
while (thisMatch.match(/\"/g)) {
thisMatch = thisMatch.replace('"', '');
}
versionLine = thisMatch;
if (versionLine.match(/VERSION_MAJOR=/g)) {
vMaj = versionLine.replace('VERSION_MAJOR=', '');
continue;
}
if (versionLine.match(/VERSION_MINOR=/g)) {
vMin = versionLine.replace('VERSION_MINOR=', '');
continue;
}
if (versionLine.match(/VERSION_PATCH=/g)) {
vPat = versionLine.replace('VERSION_PATCH=', '');
continue;
}
if (versionLine.match(/VERSION_EXTRA=/g)) {
vExtra = versionLine.replace('VERSION_EXTRA=', '');
continue;
}
if (versionLine.match(/VERSION_BUILD=/g)) {
vBuild = versionLine.replace('VERSION_BUILD=', '');
continue;
}
}
versionLog.close();
anopeVersion = vMaj + '.' + vMin + '.' + vPat + '.' + vBuild + vExtra;
return;
}
function InstallerInput() {
var input = WScript.StdIn.Readline();
return input;
}
return false;
}
function generateRC() {
var version_matches = [
{
'find' : /VERSION_COMMA/g,
'replacement' : vMaj+","+vMin+","+vPat+","+vBuild
},
{
'find' : /VERSION_FULL/g,
'replacement' : anopeVersion
},
{
'find' : /VERSION_DOTTED/g,
'replacement' : vMaj+"."+vMin+"."+vPat+"."+vBuild
}
];
var template = fso.OpenTextFile("src/win32.rc.template", 1);
var output = fso.OpenTextFile("src/win32.rc", 2, true);
if (!template) {
WScript.Echo("ERROR: Unable to generate win32.rc file - Couldn't open source file..");
}
if (!output) {
WScript.Echo("ERROR: Unable to generate win32.rc file - Couldn't open output file..");
}
var templateText = template.ReadAll();
template.close();
for (x in version_matches) {
var thisVerStr = version_matches[x];
while (templateText.match(thisVerStr.find)) {
templateText = templateText.replace(thisVerStr.find, thisVerStr.replacement);
}
}
output.WriteLine(templateText);
output.close();
}
View File
-115
View File
@@ -1,115 +0,0 @@
# Set the source file for langcomp to use C++ as well as set it's compile flags
set_source_files_properties(langcomp.c PROPERTIES LANGUAGE CXX COMPILE_FLAGS "${CXXFLAGS}")
# Generate langcomp and set it's linker flags
add_executable(langcomp langcomp.c)
set_target_properties(langcomp PROPERTIES LINKER_LANGUAGE CXX LINK_FLAGS "${LDFLAGS}")
# Get the location of the binary to use later
get_target_property(langcomp_BINARY langcomp LOCATION)
# Add the executable to the list of files for CPack to ignore
file(RELATIVE_PATH langcomp_BINARY_RELATIVE ${Anope_BINARY_DIR} ${langcomp_BINARY})
add_to_cpack_ignored_files("${langcomp_BINARY_RELATIVE}$" TRUE)
# Determine if langtool should be built
if(MSVC)
set(BUILD_LANGTOOL TRUE)
else(MSVC)
if(NOT GREP OR NOT PERL)
set(BUILD_LANGTOOL TRUE)
else(NOT GREP OR NOT PERL)
set(BUILD_LANGTOOL FALSE)
endif(NOT GREP OR NOT PERL)
endif(MSVC)
# If grep or perl don't exist on the system, build langtool to generate index and language.h
if(BUILD_LANGTOOL)
# Set the source file for langtool to use C++ as well as set it's compile flags
set_source_files_properties(langtool.c PROPERTIES LANGUAGE CXX COMPILE_FLAGS "${CXXFLAGS}")
# Generate langtool and set it's linker flags
add_executable(langtool langtool.c)
set_target_properties(langtool PROPERTIES LINKER_LANGUAGE CXX LINK_FLAGS "${LDFLAGS}")
# Get the location of the binary to use later)
get_target_property(langtool_BINARY langtool LOCATION)
# Add the executable to the list of files for CPack to ignore
file(RELATIVE_PATH langtool_BINARY_RELATIVE ${Anope_BINARY_DIR} ${langtool_BINARY})
add_to_cpack_ignored_files("${langtool_BINARY_RELATIVE}$" TRUE)
endif(BUILD_LANGTOOL)
# If grep exists (and we aren't using Visual Studio, it hates this), use it to generate the index file
if(NOT MSVC AND GREP)
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/index
COMMAND ${GREP} '^[A-Z]' ${CMAKE_CURRENT_SOURCE_DIR}/en_us.l > ${CMAKE_CURRENT_BINARY_DIR}/index
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/en_us.l
)
# Otherwise, use langtool to generate the index file
else(NOT MSVC AND GREP)
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/index
COMMAND ${langtool_BINARY} index ${CMAKE_CURRENT_SOURCE_DIR}/en_us.l ${CMAKE_CURRENT_BINARY_DIR}/index
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/en_us.l DEPENDS langtool
)
endif(NOT MSVC AND GREP)
# Add the index file to the list of files for CPack to ignore
file(RELATIVE_PATH index_RELATIVE ${Anope_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/index)
add_to_cpack_ignored_files("${index_RELATIVE}$")
# Find all the *.l files within the current source directory, and sort the list
file(GLOB LANG_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.l")
if(CMAKE244_OR_BETTER)
list(SORT LANG_SRCS)
endif(CMAKE244_OR_BETTER)
# Iterate through the language files
foreach(LANG_L ${LANG_SRCS})
# Convert the language file's extension to have no extension
STRING(REGEX REPLACE "\\.l$" "" LANG ${LANG_L})
# Add the language file to the list of compiled language files
append_to_list(LANGS ${CMAKE_CURRENT_BINARY_DIR}/${LANG})
# Generate a compiled language file using langcomp, as well as having a dependency on the index file being generated
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${LANG}
COMMAND ${langcomp_BINARY} ${CMAKE_CURRENT_SOURCE_DIR}/${LANG_L} ${CMAKE_CURRENT_BINARY_DIR}/${LANG}
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/${LANG_L} DEPENDS langcomp ${CMAKE_CURRENT_BINARY_DIR}/index
)
# Add the language file to the list of files for CPack to ignore
file(RELATIVE_PATH LANG_RELATIVE ${Anope_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/${LANG})
add_to_cpack_ignored_files("${LANG_RELATIVE}$")
endforeach(LANG_L)
# If perl exists (and we aren't using Visual Studio, it hates this), use it to generate language.h
if(NOT MSVC AND PERL)
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/language.h
COMMAND ${PERL} -e < ${CMAKE_CURRENT_BINARY_DIR}/index > ${CMAKE_CURRENT_BINARY_DIR}/language.h 'print STDERR \"Generating language.h... \"\; $$i=0\; while \(<>\) { chop\; printf \"\#define %-32s %d\\n\", $$_, $$i++\; } print \"\\n\#define NUM_STRINGS $$i\\n\"\; print STDERR \"$$i strings\\n\"\;'
MAIN_DEPENDENCY ${CMAKE_CURRENT_BINARY_DIR}/index
)
# Otherwise, use langtool to generate language.h
else(NOT MSVC AND PERL)
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/language.h
COMMAND ${langtool_BINARY} language.h ${CMAKE_CURRENT_BINARY_DIR}/index ${CMAKE_CURRENT_BINARY_DIR}/language.h
MAIN_DEPENDENCY ${CMAKE_CURRENT_BINARY_DIR}/index DEPENDS langtool
)
endif(NOT MSVC AND PERL)
# Add language.h to the list of files for CPack to ignore
add_to_cpack_ignored_files("language.h$" TRUE)
# Add a custom target to depend on the language files and language.h
add_custom_target(language DEPENDS ${LANGS} ${CMAKE_CURRENT_BINARY_DIR}/language.h)
# If RUNGROUP was set, make the permissions be to have owner read/write as well as group read/write
if(RUNGROUP)
set(PERMS OWNER_READ OWNER_WRITE GROUP_READ GROUP_WRITE)
# Otherwise, only make the permissions be owner read/write
else(RUNGROUP)
set(PERMS OWNER_READ OWNER_WRITE)
endif(RUNGROUP)
# Set the language files to be installed to the languages directory under the data directory
install(FILES ${LANGS}
DESTINATION data/languages
PERMISSIONS ${PERMS}
)
# On non-Windows platforms, if RUNGROUP is set, change the permissions of the languages directory
if(NOT WIN32)
if(RUNGROUP)
install(CODE "execute_process(COMMAND ${CHMOD} 2770 \"\${CMAKE_INSTALL_PREFIX}/data/languages\")")
else(RUNGROUP)
install(CODE "execute_process(COMMAND ${CHMOD} 0700 \"\${CMAKE_INSTALL_PREFIX}/data/languages\")")
endif(RUNGROUP)
endif(NOT WIN32)
+33 -33
View File
@@ -1,10 +1,10 @@
# Makefile for language module
MAKEARGS = 'CFLAGS=${CFLAGS}' 'CC=${CC}' 'ANOPELIBS=${ANOPELIBS}' \
'LDFLAGS=${LDFLAGS}' 'INSTDIR=${INSTDIR}' 'INSTALL=${INSTALL}' \
'LDFLAGS=${LDFLAGS}' 'BINDEST=${BINDEST}' 'INSTALL=${INSTALL}' \
'INCLUDEDIR=${INCLUDEDIR}' 'RM=${RM}' 'CP=${CP}' \
'TOUCH=${TOUCH}' 'SHELL=${SHELL}' \
'RUNGROUP=${RUNGROUP}' 'MAKEBIN=${MAKEBIN}'
'TOUCH=${TOUCH}' 'SHELL=${SHELL}' 'DATDEST=${DATDEST}' \
'RUNGROUP=${RUNGROUP}' 'USE_MODULES=${USE_MODULES}'
LANGOBJS = cat de en_us es fr gr hun it nl pl pt ru tr
LANGSRCS = cat.l de.l en_us.l es.l fr.l gr.l hun.l it.l nl.l pl.l pt.l ru.l tr.l
@@ -18,24 +18,24 @@ all: $(LANGOBJS)
distclean: clean spotless
install: all
test -d $(INSTDIR)/data/languages || mkdir $(INSTDIR)/data/languages
test -d $(DATDEST)/languages || mkdir $(DATDEST)/languages
@if [ "$(RUNGROUP)" ] ; then \
echo chgrp -R $(RUNGROUP) $(INSTDIR)/data/languages ; \
chgrp -R $(RUNGROUP) $(INSTDIR)/data/languages ; \
echo chmod -R g+rw $(INSTDIR)/data/languages ; \
chmod -R g+rw $(INSTDIR)/data/languages ; \
$(CP) $(LANGOBJS) $(INSTDIR)/data/languages ; \
echo chgrp -R $(RUNGROUP) $(INSTDIR)/data/languages ; \
chgrp -R $(RUNGROUP) $(INSTDIR)/data/languages/* ; \
echo chmod -R g+rw $(INSTDIR)/data/languages/* ; \
chmod -R g+rw $(INSTDIR)/data/languages/* ; \
echo chgrp -R $(RUNGROUP) $(DATDEST)/languages ; \
chgrp -R $(RUNGROUP) $(DATDEST)/languages ; \
echo chmod -R g+rw $(DATDEST)/languages ; \
chmod -R g+rw $(DATDEST)/languages ; \
$(CP) $(LANGOBJS) $(DATDEST)/languages ; \
echo chgrp -R $(RUNGROUP) $(DATDEST)/languages ; \
chgrp -R $(RUNGROUP) $(DATDEST)/languages/* ; \
echo chmod -R g+rw $(DATDEST)/languages/* ; \
chmod -R g+rw $(DATDEST)/languages/* ; \
fi
@if [ ! "$(RUNGROUP)" ] ; then \
chmod 700 $(INSTDIR)/data/languages/ ; \
$(CP) $(LANGOBJS) $(INSTDIR)/data/languages ; \
chmod 600 $(INSTDIR)/data/languages/* ; \
chmod 700 $(DATDEST)/languages/ ; \
$(CP) $(LANGOBJS) $(DATDEST)/languages ; \
chmod 600 $(DATDEST)/languages/* ; \
fi
clean:
rm -f $(LANGOBJS) langcomp language.h
@@ -44,39 +44,39 @@ spotless: clean
cat: cat.l langcomp index
@./langcomp $@.l $@
./langcomp $@.l
de: de.l langcomp index
@./langcomp $@.l $@
./langcomp $@.l
en_us: en_us.l langcomp index
@./langcomp $@.l $@
./langcomp $@.l
es: es.l langcomp index
@./langcomp $@.l $@
./langcomp $@.l
fr: fr.l langcomp index
@./langcomp $@.l $@
./langcomp $@.l
gr: gr.l langcomp index
@./langcomp $@.l $@
./langcomp $@.l
hun: hun.l langcomp index
@./langcomp $@.l $@
./langcomp $@.l
it: it.l langcomp index
@./langcomp $@.l $@
./langcomp $@.l
nl: nl.l langcomp index
@./langcomp $@.l $@
./langcomp $@.l
pl: pl.l langcomp index
@./langcomp $@.l $@
./langcomp $@.l
pt: pt.l langcomp index
@./langcomp $@.l $@
./langcomp $@.l
ru: ru.l langcomp index
@./langcomp $@.l $@
./langcomp $@.l
tr: tr.l langcomp index
@./langcomp $@.l $@
./langcomp $@.l
langcomp: langcomp.c
@$(MAKEBIN) $(CC) $(CFLAGS) langcomp.c -o $@
$(CC) $(CFLAGS) langcomp.c -o $@
language.h: index Makefile
@perl -e <index >$@ 'print STDERR "Generating language.h... "; $$i=0; while (<>) { chop; printf "#define %-32s %d\n", $$_, $$i++; } print "\n#define NUM_STRINGS $$i\n"; print STDERR "$$i strings\n";'
@cp language.h ../include
cp language.h ../include
index: en_us.l
@grep '^[A-Z]' en_us.l >index
grep '^[A-Z]' en_us.l >index
+75
View File
@@ -0,0 +1,75 @@
# Makefile for language module
include ../Makefile.inc.win32
LANGOBJS = cat de en_us es fr hun gr nl pl pt tr it ru
LANGSRCS = cat de en_us.l es fr.l hun.l gr.l nl.l pl.l pt.l tr.l it.l ru.l
LANGCOMP = ./langcomp
#LANGCOMP = ./langcomp -w
all: $(LANGOBJS)
install: all
-copy cat ..\$(DATDEST)\languages
-copy en_us ..\$(DATDEST)\languages
-copy de ..\$(DATDEST)\languages
-copy es ..\$(DATDEST)\languages
-copy fr ..\$(DATDEST)\languages
-copy hun ..\$(DATDEST)\languages
-copy gr ..\$(DATDEST)\languages
-copy nl ..\$(DATDEST)\languages
-copy pl ..\$(DATDEST)\languages
-copy pt ..\$(DATDEST)\languages
-copy tr ..\$(DATDEST)\languages
-copy it ..\$(DATDEST)\languages
-copy ru ..\$(DATDEST)\languages
clean:
-@erase $(LANGOBJS) langcomp.exe langtool.exe *.obj index
spotless: clean
-@erase language.h
cat: cat.l langtool.exe langcomp.exe index
langcomp $@.l
de: de.l langtool.exe langcomp.exe index
langcomp $@.l
en_us: en_us.l langtool.exe langcomp.exe index
langcomp $@.l
es: es.l langtool.exe langcomp.exe index
langcomp $@.l
fr: fr.l langtool.exe langcomp.exe index
langcomp $@.l
hun: hun.l langtool.exe langcomp.exe index
langcomp $@.l
gr: gr.l langtool.exe langcomp.exe index
langcomp $@.l
nl: nl.l langtool.exe langcomp.exe index
langcomp $@.l
pl: pl.l langtool.exe langcomp.exe index
langcomp $@.l
pt: pt.l langtool.exe langcomp.exe index
langcomp $@.l
tr: tr.l langtool.exe langcomp.exe index
langcomp $@.l
it: it.l langtool.exe langcomp.exe index
langcomp $@.l
ru: ru.l langtool.exe langcomp.exe index
langcomp $@.l
langtool.exe: langtool.c
$(CC) $(CFLAGS) langtool.c -o $@ /link $(LFLAGS)
langcomp.exe: langcomp.c
$(CC) $(CFLAGS) langcomp.c -o $@ /link $(LFLAGS)
language.h: langtool.exe index
langtool language.h
index: langtool.exe en_us.l
langtool index
+27 -21
View File
@@ -1,6 +1,6 @@
# Catalan Language File.
#
# (C) 2003-2008 Anope Team
# (C) 2003-2009 Anope Team
# Contact us at team@anope.org
#
# Please read COPYING and README for furhter details.
@@ -1821,6 +1821,10 @@ MEMO_SENT
MEMO_MASS_SENT
A massmemo has been sent to all registered users.
# STAFF responses
MEMO_STAFF_SYNTAX
STAFF memo-text
# CANCEL responses
MEMO_CANCEL_SYNTAX
CANCEL {nick | canal}
@@ -1887,7 +1891,7 @@ MEMO_SET_UNKNOWN_OPTION
# SET NOTIFY responses
MEMO_SET_NOTIFY_SYNTAX
SET NOTIFY {ON | LOGON | NEW | OFF}
SET NOTIFY {ON | LOGON | NEW | MAIL | NOMAIL | OFF}
MEMO_SET_NOTIFY_ON
%s ara et notificara dels teus memos quant et conectis i quant et siguin enviats.
MEMO_SET_NOTIFY_LOGON
@@ -2949,6 +2953,8 @@ OPER_JUPE_SYNTAX
# RAW responses
OPER_JUPE_HOST_ERROR
Please use a valid server name when juping
OPER_JUPE_INVALID_SERVER
You can not jupe your services server or your uplink server.
# RAW responses
OPER_RAW_SYNTAX
@@ -2968,7 +2974,7 @@ OPER_CANNOT_RESTART
# LISTIGNORE responses
OPER_IGNORE_SYNTAX
Syntax: IGNORE {ADD|DEL|LIST|CLEAR} [time] [nick | mask]
IGNORE {ADD|DEL|LIST|CLEAR} [time] [nick | mask]
OPER_IGNORE_VALID_TIME
You have to enter a valid number as time.
OPER_IGNORE_TIME_DONE
@@ -3060,7 +3066,7 @@ OPER_STAFF_AFORMAT
# DefCon Messages
OPER_DEFCON_SYNTAX
Syntax: DEFCON [1|2|3|4|5]
DEFCON [1|2|3|4|5]
OPER_DEFCON_DENIED
This service is temporarly disabled, please try again later
OPER_DEFCON_NO_CONF
@@ -3333,7 +3339,7 @@ NEWS_RANDOM_TEXT
[Notícies al Atzar - %s] %s
NEWS_LOGON_SYNTAX
Sintaxis: LOGONNEWS {ADD|DEL|LIST} [text|numero]
LOGONNEWS {ADD|DEL|LIST} [text|numero]
NEWS_LOGON_LIST_HEADER
Notícies d'entrada:
NEWS_LOGON_LIST_ENTRY
@@ -3342,13 +3348,13 @@ NEWS_LOGON_LIST_ENTRY
NEWS_LOGON_LIST_NONE
No hi ha notícies de entrada.
NEWS_LOGON_ADD_SYNTAX
Sintaxis: LOGONNEWS ADD texto
LOGONNEWS ADD texto
NEWS_LOGON_ADD_FULL
La llista de notícies esta plena!
NEWS_LOGON_ADDED
Noves notícies d'entrada afegida (#%d).
NEWS_LOGON_DEL_SYNTAX
Sintaxis: LOGONNEWS DEL {numero | ALL}
LOGONNEWS DEL {numero | ALL}
NEWS_LOGON_DEL_NOT_FOUND
Notícia d'entrada #%d no trobada!
NEWS_LOGON_DELETED
@@ -3385,7 +3391,7 @@ NEWS_OPER_DELETED_ALL
Totes les notícies de oper esborrades.
NEWS_RANDOM_SYNTAX
Sintaxis: RANDOMNEWS {ADD|DEL|LIST} [text|numero]
RANDOMNEWS {ADD|DEL|LIST} [text|numero]
NEWS_RANDOM_LIST_HEADER
Notícies al Azar:
NEWS_RANDOM_LIST_ENTRY
@@ -3394,13 +3400,13 @@ NEWS_RANDOM_LIST_ENTRY
NEWS_RANDOM_LIST_NONE
No hi ha notícies al azar.
NEWS_RANDOM_ADD_SYNTAX
Sintaxis: RANDOMNEWS ADD text
RANDOMNEWS ADD text
NEWS_RANDOM_ADD_FULL
La llista de notícies esta plena!
NEWS_RANDOM_ADDED
Nova noticia a l'atzar afegida (#%d).
NEWS_RANDOM_DEL_SYNTAX
Sintaxis: RANDOMNEWS DEL {numero | ALL}
RANDOMNEWS DEL {numero | ALL}
NEWS_RANDOM_DEL_NOT_FOUND
Noticia a l'atzar #%d no trobada!
NEWS_RANDOM_DELETED
@@ -4347,7 +4353,7 @@ CHAN_HELP_CMD_GETKEY
CHAN_HELP_CMD_INFO
INFO Lists information about the named registered channel
CHAN_HELP_CMD_INVITE
INVITE Tells ChanServ to invite you or a given nick into a channel
INVITE Tells ChanServ to invite you into a channel
CHAN_HELP_CMD_KICK
KICK Kicks a selected nick from a channel
CHAN_HELP_CMD_LIST
@@ -4632,13 +4638,9 @@ CHAN_HELP_SET_PRIVATE
CHAN_HELP_SET_RESTRICTED
Sintàxi: SET canal RESTRICTED {ON | OFF}
Habilita o deshabilita l'opció de accés restringit
per a un canal. Quan l' accés restringit està
establert, Els usuaris seran inhabilitats de tenir
privilegis d'operador de canal. (usuaris amb accés
negatiu i, si seguretat de ops està establerta,
usuaris no a la llista de accés) seran
kickeajats i banejats del canal.
Enables or disables the restricted access option for a
channel. When restricted access is set, users not on
the access list will instead be kicked and banned from the channel.
CHAN_HELP_SET_SECURE
Sintàxi: SET canal SECURE {ON | OFF}
@@ -5221,6 +5223,7 @@ CHAN_HELP_CLEAR
neteja els Modes i,k,l,m,n,p,s,t).
BANS neteja tots els bans en el canal.
EXCEPTS neteja tots els excepts en el canal.
INVITES Clears all invites on the channel.
OPS Esborra estatus d'operador de canal(Mode +o)
de tots els operadors de canal.
HOPS Removes channel-halfoperator status (mode +h) from
@@ -5503,7 +5506,7 @@ MEMO_HELP_SET
sobre una opció específica.
MEMO_HELP_SET_NOTIFY
Sintàxi: SET NOTIFY {ON | LOGON | NEW | OFF}
Sintàxi: SET NOTIFY {ON | LOGON | NEW | MAIL | NOMAIL | OFF}
Canvia quan se't notificarà de nous memos:
@@ -5514,6 +5517,9 @@ MEMO_HELP_SET_NOTIFY
o quan treguis /AWAY.
NEW Sols seras notificat de memos quan se't
enviin.
MAIL You will be notified of memos by email aswell as
any other settings you have.
NOMAIL You will not be notified of memos by email.
OFF No rebràs cap notificació per memos.
ON és escencialment LOGON i NEW combinats.
@@ -6713,7 +6719,7 @@ HOST_SETALL
HOST_DELALL
vhosts for group %s have been removed.
HOST_DELALL_SYNTAX
Syntax: DELALL <nick>.
DELALL <nick>.
HOST_IDENT_SETALL
vhost for group %s set to %s@%s.
HOST_SET_ERROR
@@ -6745,7 +6751,7 @@ HOST_NOT_REGED
HOST_DEL
vhost for %s removed.
HOST_DEL_SYNTAX
Syntax: %R%s del <nick>.
DEL <nick>.
###########################################################################
#
+85 -74
View File
@@ -1,6 +1,6 @@
# Deutsches Language file.
#
# (C) 2003-2008 Anope Team
# (C) 2003-2009 Anope Team
# Contact us at team@anope.org
#
# Please read COPYING and README for furhter details.
@@ -11,9 +11,7 @@
# Translated by chemical <chem@gmx.net>,shine <dh@shinewelt.de> bis 28.02.2003
# - Solltest du irgendwelche Rechtschreibfehler oder sonstige
# Verbesserungsvorschläge haben, immer her damit!
#
# letzte Änderung: 28.02.2003
#
##########################################################################
#
# This program is free but copyrighted software; see the file COPYING for
# details.
@@ -49,7 +47,7 @@
# (including empty lines). This has to be a tab, not spaces.
##########################################################################
#
# INFO ::: Letzte Änderung: 19.10.2008 -- Han` --
# INFO ::: Letzte Änderung: 05.07.2009 -- Han` -- Han@mefalcon.org --
#
##########################################################################
@@ -1130,7 +1128,7 @@ CHAN_LOGOUT_SERVADMIN_SYNTAX
CHAN_LOGOUT_SUCCEEDED
Der User %s wurde vom Channel %s ausgeloggt.
CHAN_LOGOUT_ALL_SUCCEEDED
Alle identifizierten User wurden vom Channel ausgeloggt %s (except the channel founder).
Alle identifizierten User wurden vom Channel ausgeloggt %s (außer dem Channel Founder).
# DROP responses
CHAN_DROP_SYNTAX
@@ -1160,7 +1158,7 @@ CHAN_SUCCESSOR_CHANGED
CHAN_SUCCESSOR_UNSET
Der Eintrag des Vertreters für %s wurde entfernt.
CHAN_SUCCESSOR_IS_FOUNDER
%s kann nicht gleichzeitig Gründer und Vertreter im Channel %s sein.
%s kann nicht gleichzeitig Founder und Vertreter im Channel %s sein.
# SET PASSWORD responses
CHAN_SET_PASSWORD_FAILED
@@ -1559,7 +1557,7 @@ CHAN_LEVELS_LIST_HEADER
CHAN_LEVELS_LIST_DISABLED
%-*s (deaktiviert)
CHAN_LEVELS_LIST_FOUNDER
%-*s (nur Gründer)
%-*s (nur Founder)
CHAN_LEVELS_LIST_NORMAL
%-*s %d
CHAN_LEVELS_RESET
@@ -1583,9 +1581,9 @@ CHAN_INFO_SYNTAX
CHAN_INFO_HEADER
Informationen über den Channel %s:
CHAN_INFO_FOUNDER
Gründer: %s (%s)
Founder: %s (%s)
CHAN_INFO_NO_FOUNDER
Gründer: %s
Founder: %s
CHAN_INFO_SUCCESSOR
Vertreter: %s (%s)
CHAN_INFO_NO_SUCCESSOR
@@ -1699,7 +1697,7 @@ CHAN_GETPASS_PASSWORD_IS
CHAN_GETKEY_SYNTAX
GETKEY Channel
CHAN_GETKEY_NOKEY
Der Channel %s hat keinen Schlüßel.
Der Channel %s hat kein Passwort.
CHAN_GETKEY_KEY
KEY %s %s
@@ -1825,6 +1823,10 @@ MEMO_SENT
MEMO_MASS_SENT
Ein Massen-Memo wurde an alle regsitrierte User gesendet.
# STAFF responses
MEMO_STAFF_SYNTAX
STAFF memo-text
# CANCEL responses
MEMO_CANCEL_SYNTAX
CANCEL {Nickname | Channel}
@@ -1889,7 +1891,7 @@ MEMO_SET_UNKNOWN_OPTION
# SET NOTIFY responses
MEMO_SET_NOTIFY_SYNTAX
SET NOTIFY {ON | LOGON | NEW | OFF}
SET NOTIFY {ON | LOGON | NEW | MAIL | NOMAIL | OFF}
MEMO_SET_NOTIFY_ON
%s wird dich beim Einloggen über eingegangene Memos informieren.
MEMO_SET_NOTIFY_LOGON
@@ -2763,7 +2765,7 @@ OPER_SGLINE_VIEW_FORMAT
OPER_SGLINE_CLEAR
Die SGLINE-Liste wurde geleert.
# SZLINE responses
# SQLINE responses
OPER_SQLINE_SYNTAX
SQLINE {ADD | DEL | LIST | VIEW | CLEAR} [[+Zeit] {Hostmaske | entry-liste} [Grund]]
OPER_SQLINE_CHANNELS_UNSUPPORTED
@@ -2914,7 +2916,9 @@ OPER_JUPE_SYNTAX
# RAW responses
OPER_JUPE_HOST_ERROR
Benutze bitte einen gültigen hostnamen, wenn du jupiterst
Benutze bitte einen gültigen Hostnamen, wenn du den JUPE Befehl benutzt.
OPER_JUPE_INVALID_SERVER
Du kannst den JUPE Befehl nicht gegen Deinen Services Server oder Hub Server richten.
# RAW responses
OPER_RAW_SYNTAX
@@ -2934,7 +2938,7 @@ OPER_CANNOT_RESTART
# IGNORE respondes
OPER_IGNORE_SYNTAX
Syntax: IGNORE {ADD|DEL|LIST|CLEAR} [Zeit] [Nickname | Hostmaske]
IGNORE {ADD|DEL|LIST|CLEAR} [Zeit] [Nickname | Hostmaske]
OPER_IGNORE_VALID_TIME
Du musst eine zulässige Zahl als Zeit eingeben.
OPER_IGNORE_TIME_DONE
@@ -3012,7 +3016,7 @@ OPER_STAFF_FORMAT
OPER_STAFF_AFORMAT
%c %s %s [%s]
OPER_DEFCON_SYNTAX
Syntax: DEFCON [1|2|3|4|5]
DEFCON [1|2|3|4|5]
OPER_DEFCON_DENIED
Dieser Service ist derzeit deaktiviert, bitte versuche es später nochmal
OPER_DEFCON_NO_CONF
@@ -3284,7 +3288,7 @@ NEWS_RANDOM_TEXT
[Random News - %s] %s
NEWS_LOGON_SYNTAX
Syntax: LOGONNEWS {ADD|DEL|LIST} [Text|Nummer]
LOGONNEWS {ADD|DEL|LIST} [Text|Nummer]
NEWS_LOGON_LIST_HEADER
Logon News Einträge:
NEWS_LOGON_LIST_ENTRY
@@ -3293,13 +3297,13 @@ NEWS_LOGON_LIST_ENTRY
NEWS_LOGON_LIST_NONE
Es gibt keine Logon News.
NEWS_LOGON_ADD_SYNTAX
Syntax: LOGONNEWS ADD Text
LOGONNEWS ADD Text
NEWS_LOGON_ADD_FULL
Die News-Liste ist voll!
NEWS_LOGON_ADDED
Neuer Logon News-Eintrag hinzugefügt (#%d).
NEWS_LOGON_DEL_SYNTAX
Syntax: LOGONNEWS DEL {Nummer | ALL}
LOGONNEWS DEL {Nummer | ALL}
NEWS_LOGON_DEL_NOT_FOUND
Logon News-Eintrag #%d konnte nicht gefunden werden!
NEWS_LOGON_DELETED
@@ -3336,30 +3340,30 @@ NEWS_OPER_DELETED_ALL
Alle Oper-News-Einträge wurden entfernt.
NEWS_RANDOM_SYNTAX
Syntax: RANDOMNEWS {ADD|DEL|LIST} [Text|Nummer]
RANDOMNEWS {ADD|DEL|LIST} [Text|Nummer]
NEWS_RANDOM_LIST_HEADER
Random news Einträge:
NEWS_RANDOM_LIST_ENTRY
%5d (%s von %s)
%s
NEWS_RANDOM_LIST_NONE
Keine randomnews vorhanden.
Keine Randomnews vorhanden.
NEWS_RANDOM_ADD_SYNTAX
Syntax: RANDOMNEWS ADD Text
RANDOMNEWS ADD Text
NEWS_RANDOM_ADD_FULL
Die News Liste ist voll!
NEWS_RANDOM_ADDED
Neuer randomnews Eintrag hinzugefügt (#%d).
Neuer Randomnews Eintrag hinzugefügt (#%d).
NEWS_RANDOM_DEL_SYNTAX
Syntax: RANDOMNEWS DEL {Nummer | ALL}
RANDOMNEWS DEL {Nummer | ALL}
NEWS_RANDOM_DEL_NOT_FOUND
Randomnews Eintrag #%d nicht gefunden!
NEWS_RANDOM_DELETED
Randomnews Eintrag #%d gelöscht.
NEWS_RANDOM_DEL_NONE
Keine randomnews Einträge zu löschen!
Keine Randomnews Einträge zu löschen!
NEWS_RANDOM_DELETED_ALL
Ale randomnews Einträge wurden gelöscht.
Ale Randomnews Einträge wurden gelöscht.
NEWS_HELP_LOGON
Syntax: LOGONNEWS ADD Text
@@ -3371,7 +3375,7 @@ NEWS_HELP_LOGON
angezeigt. (Es werden jedoch nur max. %s angezeigt, um ein
Flooding des Users zu verhindern. Wenn mehr News
existieren, werden nur die neuesten angezeigt.)
NewsCount can be configured in services.conf.
Die Anzahl der News können in der services.conf festgelegt werden.
LOGONNEWS LIST kann von jedem IRC Operator benutzt werden
um die aktuelle Liste der Logon News anzeigen zu lassen.
@@ -3389,7 +3393,7 @@ NEWS_HELP_OPER
(Es werden jedoch nur max. %s Nachrichten angezeigt, um ein
Flooding des Users zu verhindern. Wenn mehr News
existieren, werden nur die neüsten angezeigt.)
NewsCount can be configured in services.conf.
Die Anzahl der News können in der services.conf festgelegt werden.
OPERNEWS LIST kann von jedem IRC Operator benutzt werden
um die aktuelle Liste der Oper-News anzeigen zu lassen.
@@ -3616,7 +3620,7 @@ NICK_HELP_UPDATE
Updatet deinen derzeiten Status, z.B. prüft es auf neue Nachrichten,
setzt benötigte Channel-Modes (ModeonID), aktualisiert deinen vHost und
deine userflags (lastseentime, etc).
deine Userflags (lastseentime, etc).
NICK_HELP_LOGOUT
Syntax: LOGOUT
@@ -4349,12 +4353,11 @@ CHAN_HELP_CMD_DEVOICE
DEVOICE Enfernt den Voice-Status des angegebenen Nicknamens
in einen Channel
CHAN_HELP_CMD_GETKEY
GETKEY Gibt den Channel-Schlüßel wieder
GETKEY Gibt das Channel-Passwort wieder
CHAN_HELP_CMD_INFO
INFO Zeigt Informationen über den angegebenen Channel
CHAN_HELP_CMD_INVITE
INVITE Veranlaßt den ChanServ den angegebenen Nickname in
einen Channel eizuladen
INVITE Befiehlt Chanserv Dich in einen Channel einzuladen
CHAN_HELP_CMD_KICK
KICK Kickt den angegebenen Nicknamen aus einen Channel
CHAN_HELP_CMD_LIST
@@ -4366,7 +4369,7 @@ CHAN_HELP_CMD_OP
CHAN_HELP_CMD_TOPIC
TOPIC Ändert den Topic des angegebenen Channels
CHAN_HELP_CMD_UNBAN
UNBAN Enfernt ein ban(s) die dich betreffen aus einen Channel
UNBAN Enfernt den oder die ban(s) die dich betreffen aus einen Channel
CHAN_HELP_CMD_VOICE
VOICE Gibt den angegebenen User Voice-Status in einen Channel
CHAN_HELP_CMD_VOP
@@ -4375,7 +4378,7 @@ CHAN_HELP_CMD_DEHALFOP
DEHALFOP Enfernt den HalfOP-Status des angegebenen Nicknamens
in einen Channel
CHAN_HELP_CMD_DEOWNER
DEOWNER Entfernt dein Gründer Status in einen Channel
DEOWNER Entfernt dein Founder (Gründer) Status in einen Channel
CHAN_HELP_CMD_DEPROTECT
DEPROTECT Entfernt den schutz des angegebenen Nicknamens
in einen Channel
@@ -4384,7 +4387,7 @@ CHAN_HELP_CMD_HALFOP
CHAN_HELP_CMD_HOP
HOP Verwaltet die HOP-Liste von einen Channel
CHAN_HELP_CMD_OWNER
OWNER Gibt dir Gründer Staus in einen Channel
OWNER Gibt dir Founder (Gründer) Staus in einen Channel
CHAN_HELP_CMD_PROTECT
PROTECT Schützt den angegebenen Nicknamen in einen Channel
CHAN_HELP_CMD_ADMIN
@@ -4442,7 +4445,7 @@ CHAN_HELP_IDENTIFY
Syntax: IDENTIFY Channel Passwort
Identifiziert ein Nickname gegenüber %S als
Gründer (Founder) des angegebenen Channels.
Founder (Gründer) des angegebenen Channels.
Das Passwort muss dasselbe wie bei der
registrierung des angegebenen Channels sein
und ist in der Regel von den Real-Founder des
@@ -4471,7 +4474,7 @@ CHAN_HELP_SET
Verfügbare Optionen:
FOUNDER Stellt den Gründer des Channels ein
FOUNDER Stellt den Founder (Gründer) des Channels ein
SUCCESSOR Stellt den Vertreter des Founders ein
PASSWORD Ändert das Passwort des Channel-Founders
DESC Ändert die Channel-Beschreibung
@@ -4510,10 +4513,10 @@ CHAN_HELP_SET_FOUNDER
CHAN_HELP_SET_SUCCESSOR
Syntax: SET Channel SUCCESSOR Nickname
Ändert den Vertreter des Gründers in dem Channel. Wenn
der Nickname des Gründers ausläuft oder gedropped wird,
Ändert den Vertreter des Founders (Gründer) in dem Channel.
Wenn der Nickname des Founders ausläuft oder gedropped wird,
wenn der Channel registriert ist, wird der Vertreter
der neue Gründer des Channels. Wenn jedoch der
der neue Founder des Channels. Wenn jedoch der
Vertreter bereits zu viele Channels registriert hat
(max %d), wird der Channel gedropped.
@@ -4705,7 +4708,7 @@ CHAN_HELP_SET_XOP
wechselst, werden die Zugriffslevel geändert, folglich wirst du
nicht die selben Werte finden, wenn du zu Access zurückwechselst.
Du solltest nach einem Wechsel zum xOP System darauf achten,
Du solltest nach einem Wechsel zum XOP System darauf achten,
dass die User das richtige Level besitzen, da das Umwechseln
auf Vermutung basiert und nicht immer perfekt funktioniert.
Es ist nicht empfohlen nach einer Änderung der Levels das xOP
@@ -5061,9 +5064,9 @@ CHAN_HELP_OP
Setzt den Operator-Status des angegebenen Nicknamen
in dem Channel. Wird kein Nickname angegeben, wird
ChanServ dich oppen, vorausgesetzt, du hast die
entsprechenden Rechte in der Zugriffsliste um
diesen Befehl auszuführen.
ChanServ Dir Op Status geben, vorausgesetzt,
du hast dieentsprechenden Rechte in der Zugriffsliste
um diesen Befehl auszuführen.
Standardmässig ist dafür ein Level von 5 oder
grösser erforderlich.
@@ -5072,10 +5075,11 @@ CHAN_HELP_DEOP
Syntax: DEOP [Channel [Nickname]]
Entfernt den Operator-Status eines bestimmten Nickname
in dem Channel. Wird kein Nickname angegeben, wird ChanServ
dich deoppen. Wird weder Channel noch Nick als Parameter
übergeben, wird ChanServ dich in allen Channels deoppen
in denen du die entsprechenden Rechte hast.
in dem Channel. Wird kein Nickname angegeben, wird
ChanServ Dir den Op Status nehmen. Wird weder Channel
noch Nick als Parameter übergeben, wird ChanServ Dir
in allen Channels den Op Status nehmen, in denen Du die
entsprechenden Rechte hast.
Standardmässig ist dafür ein Level von 5 oder
grösser erforderlich.
@@ -5084,53 +5088,53 @@ CHAN_HELP_VOICE
Syntax: VOICE [Channel [Nickname]]
Erteilt dem angegebenen Nickname Voice-Status in dem
Channel. Wird kein Nick angegeben, wird ChanServ dich
voicen. Wird weder Channel noch Nickane angegeben, wird
ChanServ dich in allen Channels voicen, in denen du
die entsprechenden Rechte hast.
Channel. Wird kein Nick angegeben, wird ChanServ Dir
Voice geben. Wird weder Channel noch Nickane angegeben,
wird ChanServ Dir in allen Channels Voice geben,
in denen Du die entsprechenden Rechte hast.
Standardmässig brauchst du dafür ein Level von 5
um anderen Voice zu erteilen, oder Level 3 um dich
selbst zu voicen.
um anderen Voice zu erteilen, oder Level 3 um Dir
selbst Voice zu geben.
CHAN_HELP_DEVOICE
Syntax: DEVOICE [Channel [Nickname]]
Entfernt den Voice-Status des Nicknamen in dem Channel.
Wird kein Nickname angegeben, wird ChanServ dich devoicen.
Wird weder Channel noch Nick angegeben, wird ChanServ
dich in allen Channels voicen, in denen du die
entsprechenden Rechte hast.
Wird kein Nickname angegeben, wird ChanServ Dir den
Voice Status nehmen.Wird weder Channel noch Nick angegeben,
wird ChanServ Dir in allen Channels den Voice Status nehmen,
in denen Du die entsprechenden Rechte hast.
Standardmässig brauchst du dafür ein Level von 5
um andere zu devoicen, oder Level 3 um dich selbst
vom Voice-Flag zu befreien.
um anderen den Voice Status zu nehmen, oder Level 3 um
dich selbst vom Voice-Flag zu befreien.
CHAN_HELP_HALFOP
Syntax: HALFOP [Channel [Nickname]]
Setzt den Half-Op-Status des angegebenen Nicknamen in dem
Channel. Wird kein Nickname angegeben, wird ChanServ dich
halfoppen. Wird weder Channel noch Nickname angegeben,
wird ChanServ dich in allen Channels halfoppen, in denen
du die entsprechenden Rechte hast.
Channel. Wird kein Nickname angegeben, wird ChanServ Dir
den Halfop geben. Wird weder Channel noch Nickname angegeben,
wird ChanServ Dir in allen Channels den Halfop geben,
in denen du die entsprechenden Rechte hast.
Standardmässig brauchst du dafür ein Level von 5
um andere zu halfoppen, oder Level 4 um dich selbst zu
halfoppen.
um andere den Halfop Status zu geben, oder Level 4
um Dir selbst den Halfop Status zu geben.
CHAN_HELP_DEHALFOP
Syntax: DEHALFOP [Channel [Nickname]]
Entfernt den Half-Op-Status des angegebenen Nicknamen in dem
Channel. Wird kein Nickname angegeben, wird ChanServ dich
dehalfoppen. Wird weder Channel noch Nickname angegeben,
wird ChanServ dich in allen Channels dehalfoppen, in denen
Channel. Wird kein Nickname angegeben, wird ChanServ Dir
den Halfop nehmen. Wird weder Channel noch Nickname angegeben,
wird ChanServ Dir in allen Channels den Halfop nehmen, in denen
du die entsprechenden Rechte hast.
Standardmässig brauchst du dafür ein Level von 5
um andere zu dehalfoppen, oder Level 4 um dich selbst zu
dehalfoppen.
um andere den Halfop Status zu nehmen, oder Level 4
um Dir selbst den Halfop Status zu nehmen.
CHAN_HELP_PROTECT
Syntax: PROTECT [Channel [Nickname]]
@@ -5240,6 +5244,7 @@ CHAN_HELP_CLEAR
(z.B. Modi i,k,l,m,n,p,s und t)
BANS Entfernt alle Bans in dem Channel
EXCEPTS Entfernt alle Excepts in dem Channel
INVITES Clears all invites on the channel
OPS Entfernt jeden Operator-Status (mode +o)
in dem Channel.
HOPS Entfernt jeden Halfoperator-Status (mode +h)
@@ -5535,7 +5540,7 @@ MEMO_HELP_SET
über eine bestimmte Option.
MEMO_HELP_SET_NOTIFY
Syntax: SET NOTIFY {ON | LOGON | NEW | OFF}
Syntax: SET NOTIFY {ON | LOGON | NEW | MAIL | NOMAIL | OFF}
Ändert den Zeitpunkt, wann MemoServ dich über neue
eingegangene Memos informiert:
@@ -5548,10 +5553,16 @@ MEMO_HELP_SET_NOTIFY
machst.
NEW Du wirst nur informiert, wenn sie an dich
gesendet werden.
MAIL Du wirst über neue memos per email informiert.
NOMAIL Du wirst nicht über neue memos informiert per email.
OFF Es wird keine Benachrichtigung über neue
Memos stattfinden.
ON ist eine Kombination aus LOGON und NEW.
MAIL und NOMAIL sind optionale Einstellungen und
beeinflussen ON | LOGON | NEW nicht. Nach der Einstellung
OFF muß die Option Mail erneut gesetzt werden, damit
memos per email zugestellt werden sollen.
MEMO_HELP_SET_LIMIT
Syntax: SET LIMIT [Channel] Limit
@@ -6711,7 +6722,7 @@ HOST_SETALL
HOST_DELALL
vHost für die Gruppe %s wurden gelöscht.
HOST_DELALL_SYNTAX
Syntax: DELALL Nickname.
DELALL Nickname.
HOST_IDENT_SETALL
vHost für die Gruppe %s wurde gesetzt: %s@%s.
HOST_SET_ERROR
@@ -6745,7 +6756,7 @@ HOST_NOT_REGED
HOST_DEL
vHost für %s wurde gelöscht.
HOST_DEL_SYNTAX
Syntax: %R%s DEL Nickname.
DEL Nickname.
HOST_OFF
Your vhost was removed and the normal cloaking restored.
HOST_OFF_UNREAL
+30 -23
View File
@@ -1,6 +1,6 @@
# United States English language file.
#
# (C) 2003-2008 Anope Team
# (C) 2003-2009 Anope Team
# Contact us at team@anope.org
#
# Please read COPYING and README for further details.
@@ -1786,6 +1786,10 @@ MEMO_SENT
MEMO_MASS_SENT
A massmemo has been sent to all registered users.
# STAFF responses
MEMO_STAFF_SYNTAX
STAFF memo-text
# CANCEL responses
MEMO_CANCEL_SYNTAX
CANCEL {nick | channel}
@@ -1850,7 +1854,7 @@ MEMO_SET_UNKNOWN_OPTION
# SET NOTIFY responses
MEMO_SET_NOTIFY_SYNTAX
SET NOTIFY {ON | LOGON | NEW | MAIL | OFF }
SET NOTIFY {ON | LOGON | NEW | MAIL | NOMAIL | OFF}
MEMO_SET_NOTIFY_ON
%s will now notify you of memos when you log on and when they are sent to you.
MEMO_SET_NOTIFY_LOGON
@@ -2861,6 +2865,8 @@ OPER_JUPE_SYNTAX
JUPE servername [reason]
OPER_JUPE_HOST_ERROR
Please use a valid server name when juping
OPER_JUPE_INVALID_SERVER
You can not jupe your services server or your uplink server.
# RAW responses
OPER_RAW_SYNTAX
@@ -2880,7 +2886,7 @@ OPER_CANNOT_RESTART
# IGNORE respondes
OPER_IGNORE_SYNTAX
Syntax: IGNORE {ADD|DEL|LIST|CLEAR} [time] [nick | mask]
IGNORE {ADD|DEL|LIST|CLEAR} [time] [nick | mask]
OPER_IGNORE_VALID_TIME
You have to enter a valid number as time.
OPER_IGNORE_TIME_DONE
@@ -2950,7 +2956,7 @@ OPER_STAFF_AFORMAT
# DefCon Messages
OPER_DEFCON_SYNTAX
Syntax: DEFCON [1|2|3|4|5]
DEFCON [1|2|3|4|5]
OPER_DEFCON_DENIED
Services are in Defcon mode, Please try again later.
OPER_DEFCON_NO_CONF
@@ -3193,7 +3199,7 @@ NEWS_RANDOM_TEXT
[Random News - %s] %s
NEWS_LOGON_SYNTAX
Syntax: LOGONNEWS {ADD|DEL|LIST} [text|num]
LOGONNEWS {ADD|DEL|LIST} [text|num]
NEWS_LOGON_LIST_HEADER
Logon news items:
NEWS_LOGON_LIST_ENTRY
@@ -3202,13 +3208,13 @@ NEWS_LOGON_LIST_ENTRY
NEWS_LOGON_LIST_NONE
There is no logon news.
NEWS_LOGON_ADD_SYNTAX
Syntax: LOGONNEWS ADD text
LOGONNEWS ADD text
NEWS_LOGON_ADD_FULL
News list is full!
NEWS_LOGON_ADDED
Added new logon news item (#%d).
NEWS_LOGON_DEL_SYNTAX
Syntax: LOGONNEWS DEL {num | ALL}
LOGONNEWS DEL {num | ALL}
NEWS_LOGON_DEL_NOT_FOUND
Logon news item #%d not found!
NEWS_LOGON_DELETED
@@ -3219,7 +3225,7 @@ NEWS_LOGON_DELETED_ALL
All logon news items deleted.
NEWS_OPER_SYNTAX
Syntax: OPERNEWS {ADD|DEL|LIST} [text|num]
OPERNEWS {ADD|DEL|LIST} [text|num]
NEWS_OPER_LIST_HEADER
Oper news items:
NEWS_OPER_LIST_ENTRY
@@ -3228,13 +3234,13 @@ NEWS_OPER_LIST_ENTRY
NEWS_OPER_LIST_NONE
There is no oper news.
NEWS_OPER_ADD_SYNTAX
Syntax: OPERNEWS ADD text
OPERNEWS ADD text
NEWS_OPER_ADD_FULL
News list is full!
NEWS_OPER_ADDED
Added new oper news item (#%d).
NEWS_OPER_DEL_SYNTAX
Syntax: OPERNEWS DEL {num | ALL}
OPERNEWS DEL {num | ALL}
NEWS_OPER_DEL_NOT_FOUND
Oper news item #%d not found!
NEWS_OPER_DELETED
@@ -3245,7 +3251,7 @@ NEWS_OPER_DELETED_ALL
All oper news items deleted.
NEWS_RANDOM_SYNTAX
Syntax: RANDOMNEWS {ADD|DEL|LIST} [text|num]
RANDOMNEWS {ADD|DEL|LIST} [text|num]
NEWS_RANDOM_LIST_HEADER
Random news items:
NEWS_RANDOM_LIST_ENTRY
@@ -3254,13 +3260,13 @@ NEWS_RANDOM_LIST_ENTRY
NEWS_RANDOM_LIST_NONE
There is no random news.
NEWS_RANDOM_ADD_SYNTAX
Syntax: RANDOMNEWS ADD text
RANDOMNEWS ADD text
NEWS_RANDOM_ADD_FULL
News list is full!
NEWS_RANDOM_ADDED
Added new random news item (#%d).
NEWS_RANDOM_DEL_SYNTAX
Syntax: RANDOMNEWS DEL {num | ALL}
RANDOMNEWS DEL {num | ALL}
NEWS_RANDOM_DEL_NOT_FOUND
Random news item #%d not found!
NEWS_RANDOM_DELETED
@@ -4156,7 +4162,7 @@ CHAN_HELP_CMD_GETKEY
CHAN_HELP_CMD_INFO
INFO Lists information about the named registered channel
CHAN_HELP_CMD_INVITE
INVITE Tells ChanServ to invite you or a given nick into a channel
INVITE Tells ChanServ to invite you into a channel
CHAN_HELP_CMD_KICK
KICK Kicks a selected nick from a channel
CHAN_HELP_CMD_LIST
@@ -4426,11 +4432,8 @@ CHAN_HELP_SET_RESTRICTED
Syntax: SET channel RESTRICTED {ON | OFF}
Enables or disables the restricted access option for a
channel. When restricted access is set, users who would
normally be disallowed from having channel operator
privileges (users with negative access levels and, if
secure ops is set, users not on the access list) will
instead be kicked and banned from the channel.
channel. When restricted access is set, users not on
the access list will instead be kicked and banned from the channel.
CHAN_HELP_SET_SECURE
Syntax: SET channel SECURE {ON | OFF}
@@ -4993,6 +4996,7 @@ CHAN_HELP_CLEAR
modes i,k,l,m,n,p,s,t).
BANS Clears all bans on the channel.
EXCEPTS Clears all excepts on the channel.
INVITES Clears all invites on the channel.
OPS Removes channel-operator status (mode +o) from
all channel operators.
HOPS Removes channel-halfoperator status (mode +h) from
@@ -5248,7 +5252,7 @@ MEMO_HELP_SET
on a specific option.
MEMO_HELP_SET_NOTIFY
Syntax: SET NOTIFY {ON | LOGON | NEW | OFF}
Syntax: SET NOTIFY {ON | LOGON | NEW | MAIL | NOMAIL | OFF}
Changes when you will be notified about new memos:
@@ -5259,6 +5263,9 @@ MEMO_HELP_SET_NOTIFY
on or when you unset /AWAY.
NEW You will only be notified of memos when they
are sent to you.
MAIL You will be notified of memos by email aswell as
any other settings you have.
NOMAIL You will not be notified of memos by email.
OFF You will not receive any notification of memos.
ON is essentially LOGON and NEW combined.
@@ -6345,7 +6352,7 @@ HOST_SETALL
HOST_DELALL
vhosts for group %s have been removed.
HOST_DELALL_SYNTAX
Syntax: DELALL <nick>.
DELALL <nick>.
HOST_IDENT_SETALL
vhost for group %s set to %s@%s.
HOST_SET_ERROR
@@ -6377,9 +6384,9 @@ HOST_NOT_REGED
HOST_DEL
vhost for %s removed.
HOST_DEL_SYNTAX
Syntax: %R%s del <nick>.
DEL <nick>.
HOST_OFF
Your vhost was removed and the normal cloaking restored.
Your vhost was removed and the normal cloaking restored.
HOST_OFF_UNREAL
Your vhost was removed. To re-enable the standard host cloaking, type /mode %s +%s
HOST_NO_VIDENT
+27 -21
View File
@@ -1,6 +1,6 @@
# Spanish Language File.
#
# (C) 2003-2008 Anope Team
# (C) 2003-2009 Anope Team
# Contact us at team@anope.org
#
# Please read COPYING and README for furhter details.
@@ -1821,6 +1821,10 @@ MEMO_SENT
MEMO_MASS_SENT
Un massmemo ha sido enviado a todos los usuarios registrados.
# STAFF responses
MEMO_STAFF_SYNTAX
STAFF memo-text
# CANCEL responses
MEMO_CANCEL_SYNTAX
CANCEL {nick | canal}
@@ -1887,7 +1891,7 @@ MEMO_SET_UNKNOWN_OPTION
# SET NOTIFY responses
MEMO_SET_NOTIFY_SYNTAX
SET NOTIFY {ON | LOGON | NEW | OFF}
SET NOTIFY {ON | LOGON | NEW | MAIL | NOMAIL | OFF}
MEMO_SET_NOTIFY_ON
%s ahora te notificara de tus memos cuando te conectes y cuando te sean enviados.
MEMO_SET_NOTIFY_LOGON
@@ -2922,6 +2926,8 @@ OPER_JUPE_SYNTAX
# RAW responses
OPER_JUPE_HOST_ERROR
Por favor usa un nombre de servidor valido cuando use JUPE
OPER_JUPE_INVALID_SERVER
You can not jupe your services server or your uplink server.
# RAW responses
OPER_RAW_SYNTAX
@@ -2942,7 +2948,7 @@ OPER_CANNOT_RESTART
# IGNORE responses
OPER_IGNORE_SYNTAX
Sintaxis: IGNORE {ADD|DEL|LIST|CLEAR} [tiempo] [nick | mask]
IGNORE {ADD|DEL|LIST|CLEAR} [tiempo] [nick | mask]
OPER_IGNORE_VALID_TIME
Debes ingresar un numero valido como tiempo.
OPER_IGNORE_TIME_DONE
@@ -3034,7 +3040,7 @@ OPER_STAFF_AFORMAT
# DefCon Messages
OPER_DEFCON_SYNTAX
Sintaxis: DEFCON [1|2|3|4|5]
DEFCON [1|2|3|4|5]
OPER_DEFCON_DENIED
Los servicios estan deshabilitados temporalmente, por favor intenta mas tarde
OPER_DEFCON_NO_CONF
@@ -3307,7 +3313,7 @@ NEWS_RANDOM_TEXT
[Noticias al Azar - %s] %s
NEWS_LOGON_SYNTAX
Sintaxis: LOGONNEWS {ADD|DEL|LIST} [texto|numero]
LOGONNEWS {ADD|DEL|LIST} [texto|numero]
NEWS_LOGON_LIST_HEADER
Noticias de entrada:
NEWS_LOGON_LIST_ENTRY
@@ -3316,13 +3322,13 @@ NEWS_LOGON_LIST_ENTRY
NEWS_LOGON_LIST_NONE
No hay Noticias de entrada.
NEWS_LOGON_ADD_SYNTAX
Sintaxis: LOGONNEWS ADD texto
LOGONNEWS ADD texto
NEWS_LOGON_ADD_FULL
La lista de noticias esta llena!
NEWS_LOGON_ADDED
Nueva noticia de entrada anadida (#%d).
NEWS_LOGON_DEL_SYNTAX
Sintaxis: LOGONNEWS DEL {numero | ALL}
LOGONNEWS DEL {numero | ALL}
NEWS_LOGON_DEL_NOT_FOUND
Noticia de entrada #%d no encontrada!
NEWS_LOGON_DELETED
@@ -3359,7 +3365,7 @@ NEWS_OPER_DELETED_ALL
Todas las noticias de oper borradas.
NEWS_RANDOM_SYNTAX
Sintaxis: RANDOMNEWS {ADD|DEL|LIST} [texto|numero]
RANDOMNEWS {ADD|DEL|LIST} [texto|numero]
NEWS_RANDOM_LIST_HEADER
Noticias al Azar:
NEWS_RANDOM_LIST_ENTRY
@@ -3368,13 +3374,13 @@ NEWS_RANDOM_LIST_ENTRY
NEWS_RANDOM_LIST_NONE
No hay Noticias al azar.
NEWS_RANDOM_ADD_SYNTAX
Sintaxis: RANDOMNEWS ADD texto
RANDOMNEWS ADD texto
NEWS_RANDOM_ADD_FULL
La lista de noticias esta llena!
NEWS_RANDOM_ADDED
Nueva noticia al azar anadida (#%d).
NEWS_RANDOM_DEL_SYNTAX
Sintaxis: RANDOMNEWS DEL {numero | ALL}
RANDOMNEWS DEL {numero | ALL}
NEWS_RANDOM_DEL_NOT_FOUND
Noticia al azar #%d no encontrada!
NEWS_RANDOM_DELETED
@@ -4318,7 +4324,7 @@ CHAN_HELP_CMD_GETKEY
CHAN_HELP_CMD_INFO
INFO Lists information about the named registered channel
CHAN_HELP_CMD_INVITE
INVITE Tells ChanServ to invite you or a given nick into a channel
INVITE Tells ChanServ to invite you into a channel
CHAN_HELP_CMD_KICK
KICK Kicks a selected nick from a channel
CHAN_HELP_CMD_LIST
@@ -4604,13 +4610,9 @@ CHAN_HELP_SET_PRIVATE
CHAN_HELP_SET_RESTRICTED
Sintaxis: SET canal RESTRICTED {ON | OFF}
Habilita o deshabilita la opcion de acceso restringido
para un canal. Cuando el acceso restringido esta
seteado, Los usuarios seran inhabilitados de tener
privilegios de operador de canal. (usuarios con acceso
negativo y, si seguridad de ops esta seteada,
usuarios no en la lista de acceso) seran en vez
kickeados y baneados del canal.
Enables or disables the restricted access option for a
channel. When restricted access is set, users not on
the access list will instead be kicked and banned from the channel.
CHAN_HELP_SET_SECURE
Sintaxis: SET canal SECURE {ON | OFF}
@@ -5195,6 +5197,7 @@ CHAN_HELP_CLEAR
limpia los modos i,k,l,m,n,p,s,t).
BANS Limpia todos los bans en el canal.
EXCEPTS Limpia todos los excepts en el canal.
INVITES Clears all invites on the channel.
OPS Remueve estatus de operador de canal(modo +o)
de todos los operadores de canal.
HOPS Removes channel-halfoperator status (mode +h) from
@@ -5469,7 +5472,7 @@ MEMO_HELP_SET
acerca de una opcion especifica.
MEMO_HELP_SET_NOTIFY
Sintaxis: SET NOTIFY {ON | LOGON | NEW | OFF}
Sintaxis: SET NOTIFY {ON | LOGON | NEW | MAIL | NOMAIL | OFF}
Cambia cuando seras notificado acerca de nuevos memos:
@@ -5480,6 +5483,9 @@ MEMO_HELP_SET_NOTIFY
o cuando saques tu /AWAY.
NEW Solo seras notificado de memos cuando te sean
enviados.
MAIL You will be notified of memos by email aswell as
any other settings you have.
NOMAIL You will not be notified of memos by email.
OFF No recibiras ninguna notificacion por memos.
ON es escencialmente LOGON y NEW combinados.
@@ -6682,7 +6688,7 @@ HOST_SETALL
HOST_DELALL
El vhost para el group %s ha sido removido.
HOST_DELALL_SYNTAX
Sintaxis: DELALL <nick>.
DELALL <nick>.
HOST_IDENT_SETALL
vhost para el grupo %s seteado a %s@%s.
HOST_SET_ERROR
@@ -6714,7 +6720,7 @@ HOST_NOT_REGED
HOST_DEL
vhost para %s removido.
HOST_DEL_SYNTAX
Sintaxis: %R%s del <nick>.
DEL <nick>.
###########################################################################
#
+27 -22
View File
@@ -1,6 +1,6 @@
# French language file.
#
# (C) 2003-2008 Anope Team
# (C) 2003-2009 Anope Team
# Contact us at team@anope.org
#
# Please read COPYING and README for furhter details.
@@ -1830,6 +1830,10 @@ MEMO_SENT
MEMO_MASS_SENT
Un mass memo a été envoyé a tout les pseudos enregistrés.
# STAFF responses
MEMO_STAFF_SYNTAX
STAFF memo-text
# CANCEL responses
MEMO_CANCEL_SYNTAX
CANCEL {pseudo | canal}
@@ -1896,7 +1900,7 @@ MEMO_SET_UNKNOWN_OPTION
# SET NOTIFY responses
MEMO_SET_NOTIFY_SYNTAX
SET NOTIFY {ON | LOGON | NEW | OFF}
SET NOTIFY {ON | LOGON | NEW | MAIL | NOMAIL | OFF}
MEMO_SET_NOTIFY_ON
%s vous notifiera maintenant des memos quand vous vous connectez et quand ils vous sont envoyés.
MEMO_SET_NOTIFY_LOGON
@@ -2972,6 +2976,8 @@ OPER_JUPE_SYNTAX
# RAW responses
OPER_JUPE_HOST_ERROR
Veuillez indiquer un nom de serveur valide pour JUPE.
OPER_JUPE_INVALID_SERVER
You can not jupe your services server or your uplink server.
# RAW responses
OPER_RAW_SYNTAX
@@ -2993,7 +2999,7 @@ OPER_CANNOT_RESTART
# LISTIGNORE responses
OPER_IGNORE_SYNTAX
Syntaxe: IGNORE {ADD|DEL|LIST|CLEAR} [durée] [nick | mask]
IGNORE {ADD|DEL|LIST|CLEAR} [durée] [nick | mask]
OPER_IGNORE_VALID_TIME
Vous devez entrer une durée valide
OPER_IGNORE_TIME_DONE
@@ -3085,7 +3091,7 @@ OPER_STAFF_AFORMAT
# DefCon Messages
OPER_DEFCON_SYNTAX
Syntaxe: DEFCON [1|2|3|4|5]
DEFCON [1|2|3|4|5]
OPER_DEFCON_DENIED
Ce service est temporairement désactivé, veuillez réessayer ultérieurement.
OPER_DEFCON_NO_CONF
@@ -3361,7 +3367,7 @@ NEWS_RANDOM_TEXT
[News Aléatoire - %s] %s
NEWS_LOGON_SYNTAX
Syntaxe: LOGONNEWS {ADD|DEL|LIST} [texte|nombre]
LOGONNEWS {ADD|DEL|LIST} [texte|nombre]
NEWS_LOGON_LIST_HEADER
Articles des logon news:
NEWS_LOGON_LIST_ENTRY
@@ -3370,13 +3376,13 @@ NEWS_LOGON_LIST_ENTRY
NEWS_LOGON_LIST_NONE
Il n'y a pas de logon news.
NEWS_LOGON_ADD_SYNTAX
Syntaxe: LOGONNEWS ADD texte
LOGONNEWS ADD texte
NEWS_LOGON_ADD_FULL
La liste des News est pleine!
NEWS_LOGON_ADDED
Ajouté un nouvel article de logon news (#%d).
NEWS_LOGON_DEL_SYNTAX
Syntaxe: LOGONNEWS DEL {num | ALL}
LOGONNEWS DEL {num | ALL}
NEWS_LOGON_DEL_NOT_FOUND
Article de logon news #%d non trouvé!
NEWS_LOGON_DELETED
@@ -3413,7 +3419,7 @@ NEWS_OPER_DELETED_ALL
Tous les articles oper news supprimés.
NEWS_RANDOM_SYNTAX
Syntaxe: RANDOMNEWS {ADD|DEL|LIST} [texte|nombre]
RANDOMNEWS {ADD|DEL|LIST} [texte|nombre]
NEWS_RANDOM_LIST_HEADER
Nouvelles aléatoires:
NEWS_RANDOM_LIST_ENTRY
@@ -3422,13 +3428,13 @@ NEWS_RANDOM_LIST_ENTRY
NEWS_RANDOM_LIST_NONE
Il n'y a pas de nouvelles aléatoires.
NEWS_RANDOM_ADD_SYNTAX
Syntaxe: RANDOMNEWS ADD texte
RANDOMNEWS ADD texte
NEWS_RANDOM_ADD_FULL
La liste de nouvelles est pleine!
NEWS_RANDOM_ADDED
Nouvelle aléatoire ajoutée (n°%d).
NEWS_RANDOM_DEL_SYNTAX
Syntaxe: RANDOMNEWS DEL {num | ALL}
RANDOMNEWS DEL {num | ALL}
NEWS_RANDOM_DEL_NOT_FOUND
Nouvelle aléatoire n°%d non trouvée!
NEWS_RANDOM_DELETED
@@ -4389,8 +4395,7 @@ CHAN_HELP_CMD_GETKEY
CHAN_HELP_CMD_INFO
INFO Liste les informations sur un canal enregistré
CHAN_HELP_CMD_INVITE
INVITE Ordone à ChanServ de vous inviter ou d'inviter un pseudo
sur un canal
INVITE Tells ChanServ to invite you into a channel
CHAN_HELP_CMD_KICK
KICK Kick le pseudo spécifié d'un canal
CHAN_HELP_CMD_LIST
@@ -4674,13 +4679,9 @@ CHAN_HELP_SET_PRIVATE
CHAN_HELP_SET_RESTRICTED
Syntaxe: SET canal RESTRICTED {ON | OFF}
Active ou désactive l'option d'accès restreint pour un
canal. Lorsque l'accès restreint est actif, les
utilisateurs qui n'auraient normalement pas la permission
d'être opérateur du canal (les utilisateurs avec un niveau
d'accès négatif et, si le contrôle des ops est actif, les utilisateurs
qui ne sont pas sur la liste d'accès) seront kickés et bannis
du canal.
Enables or disables the restricted access option for a
channel. When restricted access is set, users not on
the access list will instead be kicked and banned from the channel.
CHAN_HELP_SET_SECURE
Syntaxe: SET canal SECURE {ON | OFF}
@@ -5263,6 +5264,7 @@ CHAN_HELP_CLEAR
MODES Réinitialise tous les modes d'un canal
BANS Enlève tous les bans d'un canal.
EXCEPTS Enlève tous les excepts d'un canal.
INVITES Clears all invites on the channel.
OPS Enlève le status d'opérateur du canal à
tous les opérateurs du canal.
HOPS Enlève le status d'halfop (mode +h) a tout les halfop
@@ -5547,7 +5549,7 @@ MEMO_HELP_SET
d'informations sur une option spécifique.
MEMO_HELP_SET_NOTIFY
Syntaxe: SET NOTIFY {ON | LOGON | NEW | OFF}
Syntaxe: SET NOTIFY {ON | LOGON | NEW | MAIL | NOMAIL | OFF}
Change quand vous serez notifié de vos nouveaux
memos:
@@ -5560,6 +5562,9 @@ MEMO_HELP_SET_NOTIFY
/AWAY.
NEW Vous serez uniquement notifiés des memos
lorsqu'ils vous sont envoyés.
MAIL You will be notified of memos by email aswell as
any other settings you have.
NOMAIL You will not be notified of memos by email.
OFF Vous ne recevrez aucune notification.
ON est la combination de LOGON et NEW.
@@ -6765,7 +6770,7 @@ HOST_SETALL
HOST_DELALL
Le vhosts pour le groupe %s a été supprimé.
HOST_DELALL_SYNTAX
Syntaxe: DELALL <pseudo>.
DELALL <pseudo>.
HOST_IDENT_SETALL
Le vhost pour le groupe %s enregistrée en %s@%s.
HOST_SET_ERROR
@@ -6797,7 +6802,7 @@ HOST_NOT_REGED
HOST_DEL
Le vhost pour %s a été supprimé.
HOST_DEL_SYNTAX
Syntaxe: %R%s del <pseudo>.
DEL <pseudo>.
###########################################################################
#
+28 -19
View File
@@ -1,6 +1,6 @@
# Greek language file.
#
# (C) 2003-2008 Anope Team
# (C) 2003-2009 Anope Team
# Contact us at team@anope.org
#
# Please read COPYING and README for furhter details.
@@ -1821,7 +1821,11 @@ MEMO_SENT
# CANCEL responses
MEMO_MASS_SENT
A massmemo has been sent to all registered users.
A mass memo has been sent to all registered users.
# STAFF responses
MEMO_STAFF_SYNTAX
STAFF memo-text
# CANCEL responses
MEMO_CANCEL_SYNTAX
@@ -1889,7 +1893,7 @@ MEMO_SET_UNKNOWN_OPTION
# SET NOTIFY responses
MEMO_SET_NOTIFY_SYNTAX
SET NOTIFY {ON | LOGON | NEW | OFF}
SET NOTIFY {ON | LOGON | NEW | MAIL | NOMAIL | OFF}
MEMO_SET_NOTIFY_ON
%s áðü ôþñá üôáí èá êÜíåéò åíôïëÞ logon èá âëÝðåéò ôá ìçíýìáôá ðïõ èá óïõ óôÝëíïõí êáèþò èáóáé óôï äßêôõï.
MEMO_SET_NOTIFY_LOGON
@@ -2952,6 +2956,8 @@ OPER_JUPE_SYNTAX
# RAW responses
OPER_JUPE_HOST_ERROR
Please use a valid server name when juping
OPER_JUPE_INVALID_SERVER
You can not jupe your services server or your uplink server.
# RAW responses
OPER_RAW_SYNTAX
@@ -2971,7 +2977,7 @@ OPER_CANNOT_RESTART
# LISTIGNORE responses
OPER_IGNORE_SYNTAX
Syntax: IGNORE {ADD|DEL|LIST|CLEAR} [time] [nick | mask]
IGNORE {ADD|DEL|LIST|CLEAR} [time] [nick | mask]
OPER_IGNORE_VALID_TIME
You have to enter a valid number as time.
OPER_IGNORE_TIME_DONE
@@ -3063,7 +3069,7 @@ OPER_STAFF_AFORMAT
# DefCon Messages
OPER_DEFCON_SYNTAX
Syntax: DEFCON [1|2|3|4|5]
DEFCON [1|2|3|4|5]
OPER_DEFCON_DENIED
This service is temporarly disabled, please try again later
OPER_DEFCON_NO_CONF
@@ -3325,7 +3331,7 @@ NEWS_RANDOM_TEXT
[ÍÝá ó÷åôéêÜ ìå ôï äßêôõï - %s] %s
NEWS_LOGON_SYNTAX
Óýíôáîç: LOGONNEWS {ADD|DEL|LIST} [ðåñéå÷üìåíï|íïýìåñï]
LOGONNEWS {ADD|DEL|LIST} [ðåñéå÷üìåíï|íïýìåñï]
NEWS_LOGON_LIST_HEADER
Êáíïíéóìïß:
NEWS_LOGON_LIST_ENTRY
@@ -3334,13 +3340,13 @@ NEWS_LOGON_LIST_ENTRY
NEWS_LOGON_LIST_NONE
Äåí õðÜñ÷ïõí êáíïíéóìïß Þ ðëçñïöïñßåò.
NEWS_LOGON_ADD_SYNTAX
Óýíôáîç: LOGONNEWS ADD ðåñéå÷üìåíï
LOGONNEWS ADD ðåñéå÷üìåíï
NEWS_LOGON_ADD_FULL
Ç ëßóôá ôùí íÝùí åßíáé ãåìÜôç!
NEWS_LOGON_ADDED
ÐñïóôÝèçêå Ýíáò êáíïíéóìüò Þ ðëçñïöïñßá óôç èÝóç (#%d).
NEWS_LOGON_DEL_SYNTAX
Óýíôáîç: LOGONNEWS DEL {íïýìåñï | ALL}
LOGONNEWS DEL {íïýìåñï | ALL}
NEWS_LOGON_DEL_NOT_FOUND
Êáíïíéóìüò óôç èÝóç #%d äåí âñÝèçêå!
NEWS_LOGON_DELETED
@@ -3377,7 +3383,7 @@ NEWS_OPER_DELETED_ALL
¼ëá ôá íÝá ãéá ôïõò opers äéáãñÜöçêáí.
NEWS_RANDOM_SYNTAX
Óýíôáîç: RANDOMNEWS {ADD|DEL|LIST} [ðåñéå÷üìåíï|íïýìåñï]
RANDOMNEWS {ADD|DEL|LIST} [ðåñéå÷üìåíï|íïýìåñï]
NEWS_RANDOM_LIST_HEADER
ÍÝá ãéá ôï äßêôõï:
NEWS_RANDOM_LIST_ENTRY
@@ -3386,13 +3392,13 @@ NEWS_RANDOM_LIST_ENTRY
NEWS_RANDOM_LIST_NONE
Äåí õðÜñ÷ïõí íÝá.
NEWS_RANDOM_ADD_SYNTAX
Óýíôáîç: RANDOMNEWS ADD ðåñéå÷üìåíï
RANDOMNEWS ADD ðåñéå÷üìåíï
NEWS_RANDOM_ADD_FULL
Ç ëßóôá åßíáé ãåìÜôç!
NEWS_RANDOM_ADDED
ÐñïóèÝèçêå Ýíá íÝï ìÞíõìá óôçí èÝóç (#%d).
NEWS_RANDOM_DEL_SYNTAX
Óýíôáîç: RANDOMNEWS DEL {íïýìåñï | ALL}
RANDOMNEWS DEL {íïýìåñï | ALL}
NEWS_RANDOM_DEL_NOT_FOUND
Ôï ìÞíõìá óôçí èÝóç #%d äåí âñÝèçêå!
NEWS_RANDOM_DELETED
@@ -4337,7 +4343,7 @@ CHAN_HELP_CMD_GETKEY
CHAN_HELP_CMD_INFO
INFO Lists information about the named registered channel
CHAN_HELP_CMD_INVITE
INVITE Tells ChanServ to invite you or a given nick into a channel
INVITE Tells ChanServ to invite you into a channel
CHAN_HELP_CMD_KICK
KICK Kicks a selected nick from a channel
CHAN_HELP_CMD_LIST
@@ -4608,10 +4614,9 @@ CHAN_HELP_SET_PRIVATE
CHAN_HELP_SET_RESTRICTED
Óýíôáîç: SET êáíÜëé RESTRICTED {ON | OFF}
Åíåñãïðïéåß Þ áðåñíåñãïðïéåß ôçí restricted access åðéëïãÞ ôïõ
êáíáëéïý. ¼ôáí åíåñãïðéçèåß ç restricted access , ÷ñÞóôåò ïé
ïðïßïé äåí Ý÷ïõí access óôï êáíÜëé, ïé õðçñåóßåò èá ôïõò êÜíïõí
kick êáé ban áðü ôï êáíÜëé.
Enables or disables the restricted access option for a
channel. When restricted access is set, users not on
the access list will instead be kicked and banned from the channel.
CHAN_HELP_SET_SECURE
Óýíôáîç: SET êáíÜëé SECURE {ON | OFF}
@@ -5167,6 +5172,7 @@ CHAN_HELP_CLEAR
modes i,k,l,m,n,p,s,t).
BANS Êáèáñßæåé üëá ôá bans áðü ôï êáíÜëé.
EXCEPTS Êáèáñßæåé üëá ôá excepts áðü ôï êáíÜëé.
INVITES Clears all invites on the channel.
OPS Áöáéñåß ôï channel-operator status (mode +o) áðü
üëïõò ôïõò channel operators.
HOPS Removes channel-halfoperator status (mode +h) from
@@ -5441,7 +5447,7 @@ MEMO_HELP_SET
óå ìéá óõãêåêñéìÝíç åðéëïãÞ.
MEMO_HELP_SET_NOTIFY
Óýíôáîç: SET NOTIFY {ON | LOGON | NEW | OFF}
Óýíôáîç: SET NOTIFY {ON | LOGON | NEW | MAIL | NOMAIL | OFF}
ÁëëáãÝò ãéá ôï ðùò èÝëåôå íá åíçìåñþíåóôå ãéá íÝá ìçíýìáôá:
@@ -5452,6 +5458,9 @@ MEMO_HELP_SET_NOTIFY
on Þ üôáí èá åðáíÝñ÷åóôå áðü /AWAY.
NEW Èá åíçìåñþíåóôå ãéá ôá ìçíýìáôá óáò ìüíï üôáí èá óáò
ôá óôÝëíïõí.
MAIL You will be notified of memos by email aswell as
any other settings you have.
NOMAIL You will not be notified of memos by email.
OFF Äåí èá åíçìåñþíåóôå ðïôÝ ãéá íÝá ìçíýìáôá Þ ðáëéÜ.
Ç åðéëïãÞ ON ðéï ïõóéþäçò,ç LOGON êáé ç NEW óõíäéáóôéêÞ.
@@ -6596,7 +6605,7 @@ HOST_SETALL
HOST_DELALL
vhosts for group %s have been removed.
HOST_DELALL_SYNTAX
Syntax: DELALL <nick>.
DELALL <nick>.
HOST_IDENT_SETALL
vhost for group %s set to %s@%s.
HOST_SET_ERROR
@@ -6628,7 +6637,7 @@ HOST_NOT_REGED
HOST_DEL
vhost for %s removed.
HOST_DEL_SYNTAX
Syntax: %R%s del <nick>.
DEL <nick>.
###########################################################################
#
+27 -21
View File
@@ -1,6 +1,6 @@
# Hungarian (magyar) language file.
#
# (C) 2003-2008 Anope Team
# (C) 2003-2009 Anope Team
# Contact us at team@anope.org
#
# Translated by:
@@ -1826,6 +1826,10 @@ MEMO_CANCEL_NONE
Nincs visszavont memo üzenet.
MEMO_CANCELLED
%s részére küldött utolsó memo üzenet visszavonva.
# STAFF responses
MEMO_STAFF_SYNTAX
STAFF memo-text
# LIST válaszok
MEMO_LIST_SYNTAX
@@ -1881,7 +1885,7 @@ MEMO_SET_UNKNOWN_OPTION
# SET NOTIFY válaszok
MEMO_SET_NOTIFY_SYNTAX
SET NOTIFY {ON | LOGON | NEW | OFF}
SET NOTIFY {ON | LOGON | NEW | MAIL | NOMAIL | OFF}
MEMO_SET_NOTIFY_ON
%s értesíteni fog az üzenetekrõl csatlakozáskor.
MEMO_SET_NOTIFY_LOGON
@@ -2911,6 +2915,8 @@ OPER_JUPE_SYNTAX
JUPE szervernév [leírás]
OPER_JUPE_HOST_ERROR
Kérlek használj érvényes szerver nevet amikor jupolsz!
OPER_JUPE_INVALID_SERVER
You can not jupe your services server or your uplink server.
# RAW válaszok
OPER_RAW_SYNTAX
@@ -2932,7 +2938,7 @@ OPER_CANNOT_RESTART
# IGNORE válaszok
OPER_IGNORE_SYNTAX
Syntax: IGNORE {ADD|DEL|LIST|CLEAR} [idõ] [nick | mask]
IGNORE {ADD|DEL|LIST|CLEAR} [idõ] [nick | mask]
OPER_IGNORE_VALID_TIME
Használj érvényes számot idõnek.
(Adj meg érvényes számot az idõhöz.)
@@ -3005,7 +3011,7 @@ OPER_STAFF_AFORMAT
# DefCon Üzenet
OPER_DEFCON_SYNTAX
Syntax: DEFCON [1|2|3|4|5]
DEFCON [1|2|3|4|5]
OPER_DEFCON_DENIED
Szervíz Defcon módban fut, próbáld késõbb.
OPER_DEFCON_NO_CONF
@@ -3259,7 +3265,7 @@ NEWS_RANDOM_TEXT
[Véletlenszerû Hír] - %s %s
NEWS_LOGON_SYNTAX
Syntax: LOGONNEWS { ADD | DEL | LIST } [szöveg|szám]
LOGONNEWS { ADD | DEL | LIST } [szöveg|szám]
NEWS_LOGON_LIST_HEADER
Fellépési hírek:
NEWS_LOGON_LIST_ENTRY
@@ -3268,13 +3274,13 @@ NEWS_LOGON_LIST_ENTRY
NEWS_LOGON_LIST_NONE
Nincs fellépõ üzenet.
NEWS_LOGON_ADD_SYNTAX
Syntax: LOGONNEWS ADD szöveg
LOGONNEWS ADD szöveg
NEWS_LOGON_ADD_FULL
A Hírlista tele!
NEWS_LOGON_ADDED
Hozzáadva az új fellépési hír: (#%d).
NEWS_LOGON_DEL_SYNTAX
Syntax: LOGONNEWS DEL {szám | ALL}
LOGONNEWS DEL {szám | ALL}
NEWS_LOGON_DEL_NOT_FOUND
Logon news tétel #%d nem található!
NEWS_LOGON_DELETED
@@ -3311,7 +3317,7 @@ NEWS_OPER_DELETED_ALL
Összes oper hír törölve.
NEWS_RANDOM_SYNTAX
Syntax: RANDOMNEWS { ADD | DEL | LIST } [ szöveg | szám ]
RANDOMNEWS { ADD | DEL | LIST } [ szöveg | szám ]
NEWS_RANDOM_LIST_HEADER
Véletlenszerû hírek listája:
NEWS_RANDOM_LIST_ENTRY
@@ -3320,13 +3326,13 @@ NEWS_RANDOM_LIST_ENTRY
NEWS_RANDOM_LIST_NONE
Nincs véletlenszerû hír.
NEWS_RANDOM_ADD_SYNTAX
Syntax: RANDOMNEWS ADD szöveg
RANDOMNEWS ADD szöveg
NEWS_RANDOM_ADD_FULL
News lista tele!
NEWS_RANDOM_ADDED
Hozzáadva az új random news tétel (#%d).
NEWS_RANDOM_DEL_SYNTAX
Syntax: RANDOMNEWS DEL {szám | ALL}
RANDOMNEWS DEL {szám | ALL}
NEWS_RANDOM_DEL_NOT_FOUND
Random news tétel #%d nem található!
NEWS_RANDOM_DELETED
@@ -4256,7 +4262,7 @@ CHAN_HELP_CMD_GETKEY
CHAN_HELP_CMD_INFO
INFO Lists information about the named registered channel
CHAN_HELP_CMD_INVITE
INVITE Tells ChanServ to invite you or a given nick into a channel
INVITE Tells ChanServ to invite you into a channel
CHAN_HELP_CMD_KICK
KICK Kicks a selected nick from a channel
CHAN_HELP_CMD_LIST
@@ -4526,13 +4532,9 @@ CHAN_HELP_SET_PRIVATE
CHAN_HELP_SET_RESTRICTED
Syntax: SET #szoba RESTRICTED {ON | OFF}
Engedélyezi vagy letiltja a korlátozott hozzáférés
opciót a csatornán. Amikor a korlátozott hozzáférés
be van kapcsolva, a userek nem kaphatnak szoba
operátori jogokat (userek negatív access szinttel,
ha a secure opsopció be van kapcsolva, akkor azok a
userek, akik nem szerepelnek az access listán) azonnal
ki lesznek rúgva és tiltva a szobából belépéskor.
Enables or disables the restricted access option for a
channel. When restricted access is set, users not on
the access list will instead be kicked and banned from the channel.
CHAN_HELP_SET_SECURE
Syntax: SET #szoba SECURE {ON | OFF}
@@ -5112,6 +5114,7 @@ CHAN_HELP_CLEAR
mode lockjában.
BANS Törli az összes tiltást a csatornán.
EXCEPTS Törli az összes kivételt a csatornán.
INVITES Clears all invites on the channel.
OPS Elvesz minden opot a csatornán
HOPS Eltávolít minden félop csatorna státuszt (+h mód)
az összes csatornán lévõ féloperátortól, ha támogatott.
@@ -5377,7 +5380,7 @@ MEMO_HELP_SET
További információért írd be: %R%S HELP SET opció
MEMO_HELP_SET_NOTIFY
Syntax: SET NOTIFY {ON | LOGON | NEW | OFF}
Syntax: SET NOTIFY {ON | LOGON | NEW | MAIL | NOMAIL | OFF}
Itt tudod beállítani, ha értesítést szeretnél kapni
az új üzenetekrõl:
@@ -5387,6 +5390,9 @@ MEMO_HELP_SET_NOTIFY
LOGON Értesítést kapsz az új üzenetekrõl csatlakozáskor
vagy ha visszajössz /AWAY-ból.
NEW Csak akkor kapsz értesítést, ha új üzenet érkezett.
MAIL You will be notified of memos by email aswell as
any other settings you have.
NOMAIL You will not be notified of memos by email.
OFF Nem kapsz értesítést az üzeneteidrõl.
Az ON ekvivalens a LOGON és a NEW kombinálásával.
@@ -6505,7 +6511,7 @@ HOST_SETALL
HOST_DELALL
A %s csoport vhostja törölve.
HOST_DELALL_SYNTAX
Syntax: DELALL <nick>.
DELALL <nick>.
HOST_IDENT_SETALL
A %s csoport vhostja erre változott: %s@%s.
HOST_SET_ERROR
@@ -6537,7 +6543,7 @@ HOST_NOT_REGED
HOST_DEL
%s vhosztja törölve lett.
HOST_DEL_SYNTAX
Szintaktika: %R%s del <nick>.
DEL <nick>.
HOST_OFF
Your vhost was removed and the normal cloaking restored.
HOST_OFF_UNREAL
+27 -20
View File
@@ -1,6 +1,6 @@
# Italian language file.
#
# (C) 2003-2008 Anope Team
# (C) 2003-2009 Anope Team
# Contact us at team@anope.org
#
# Please read COPYING and README for further details.
@@ -1798,6 +1798,10 @@ MEMO_SENT
MEMO_MASS_SENT
Un memo di massa è stato inviato a tutti gli utenti registrati.
# STAFF responses
MEMO_STAFF_SYNTAX
STAFF memo-text
# CANCEL responses
MEMO_CANCEL_SYNTAX
CANCEL {nick | canale}
@@ -1862,7 +1866,7 @@ MEMO_SET_UNKNOWN_OPTION
# SET NOTIFY responses
MEMO_SET_NOTIFY_SYNTAX
SET NOTIFY {ON | LOGON | NEW | OFF}
SET NOTIFY {ON | LOGON | NEW | MAIL | NOMAIL | OFF}
MEMO_SET_NOTIFY_ON
%s ti informerà dei nuovi memo quando ti connetti e quando li ricevi.
MEMO_SET_NOTIFY_LOGON
@@ -2875,6 +2879,8 @@ OPER_JUPE_SYNTAX
JUPE nomeserver [motivo]
OPER_JUPE_HOST_ERROR
Prego utilizzare un nome server valido per jupe
OPER_JUPE_INVALID_SERVER
You can not jupe your services server or your uplink server.
# RAW responses
OPER_RAW_SYNTAX
@@ -2894,7 +2900,7 @@ OPER_CANNOT_RESTART
# IGNORE responses
OPER_IGNORE_SYNTAX
Sintassi: IGNORE {ADD|DEL|LIST|CLEAR} [tempo] [nick | mask]
IGNORE {ADD|DEL|LIST|CLEAR} [tempo] [nick | mask]
OPER_IGNORE_VALID_TIME
Devi inserire un numero valido per indicare il tempo.
OPER_IGNORE_TIME_DONE
@@ -2965,7 +2971,7 @@ OPER_STAFF_AFORMAT
# DefCon Messages
OPER_DEFCON_SYNTAX
Sintassi: DEFCON [1|2|3|4|5]
DEFCON [1|2|3|4|5]
OPER_DEFCON_DENIED
I servizi sono in modalità Defcon, prego riprovare più tardi.
OPER_DEFCON_NO_CONF
@@ -3218,7 +3224,7 @@ NEWS_RANDOM_TEXT
[Messaggio del giorno - %s] %s
NEWS_LOGON_SYNTAX
Sintassi: LOGONNEWS {ADD|DEL|LIST} [testo|numero]
LOGONNEWS {ADD|DEL|LIST} [testo|numero]
NEWS_LOGON_LIST_HEADER
Lista delle Logon News:
NEWS_LOGON_LIST_ENTRY
@@ -3227,13 +3233,13 @@ NEWS_LOGON_LIST_ENTRY
NEWS_LOGON_LIST_NONE
Non c'è nessuna Logon News.
NEWS_LOGON_ADD_SYNTAX
Sintassi: LOGONNEWS ADD testo
LOGONNEWS ADD testo
NEWS_LOGON_ADD_FULL
La lista delle news è piena!
NEWS_LOGON_ADDED
Aggiunta una nuova Logon News (numero %d).
NEWS_LOGON_DEL_SYNTAX
Sintassi: LOGONNEWS DEL {numero | ALL}
LOGONNEWS DEL {numero | ALL}
NEWS_LOGON_DEL_NOT_FOUND
Impossibile trovare la Logon News numero %d!
NEWS_LOGON_DELETED
@@ -3270,7 +3276,7 @@ NEWS_OPER_DELETED_ALL
Tutte le Oper News sono state eliminate.
NEWS_RANDOM_SYNTAX
Sintassi: RANDOMNEWS {ADD|DEL|LIST} [testo|numero]
RANDOMNEWS {ADD|DEL|LIST} [testo|numero]
NEWS_RANDOM_LIST_HEADER
Lista delle Random News:
NEWS_RANDOM_LIST_ENTRY
@@ -3279,13 +3285,13 @@ NEWS_RANDOM_LIST_ENTRY
NEWS_RANDOM_LIST_NONE
Non c'è nessuna Random News.
NEWS_RANDOM_ADD_SYNTAX
Sintassi: RANDOMNEWS ADD testo
RANDOMNEWS ADD testo
NEWS_RANDOM_ADD_FULL
La lista delle news è piena!
NEWS_RANDOM_ADDED
Aggiunta una nuova Random News (numero %d).
NEWS_RANDOM_DEL_SYNTAX
Sintassi: RANDOMNEWS DEL {numero | ALL}
RANDOMNEWS DEL {numero | ALL}
NEWS_RANDOM_DEL_NOT_FOUND
Impossibile trovare la Random News numero %d!
NEWS_RANDOM_DELETED
@@ -4513,13 +4519,9 @@ CHAN_HELP_SET_PRIVATE
CHAN_HELP_SET_RESTRICTED
Sintassi: SET canale RESTRICTED {ON | OFF}
Attiva o disattiva l'accesso limitato (restricted)
per il canale. Quando questa opzione è attiva, gli
utenti che non potrebbero avere i privilegi di operatore
di canale (gli utenti con livelli di accesso negativi e,
se l'opzione secure ops è attiva, tutti gli utenti che
non si trovano in alcuna lista di accesso) verrano invece
kickati e bannati dal canale.
Enables or disables the restricted access option for a
channel. When restricted access is set, users not on
the access list will instead be kicked and banned from the channel.
CHAN_HELP_SET_SECURE
Sintassi: SET canale SECURE {ON | OFF}
@@ -5126,6 +5128,8 @@ CHAN_HELP_CLEAR
MODES Annulla tutti i modi di canale (cioè elimina
i modi i,k,l,m,n,p,s,t).
BANS Annulla tutti i ban del canale.
EXCEPTS Clears all excepts on the channel.
INVITES Clears all invites on the channel.
OPS Rimuove lo stato di operatore (modo +o) da
tutti gli operatori del canale.
HOPS Rimuove lo stato di halfoperator (modo +h) da
@@ -5408,7 +5412,7 @@ MEMO_HELP_SET
maggiori informazioni su un'opzione specifica.
MEMO_HELP_SET_NOTIFY
Sintassi: SET NOTIFY {ON | LOGON | NEW | OFF}
Sintassi: SET NOTIFY {ON | LOGON | NEW | MAIL | NOMAIL | OFF}
Cambia il modo in cui si verrà informati della ricezione
di nuovi memo:
@@ -5420,6 +5424,9 @@ MEMO_HELP_SET_NOTIFY
connette o quando si torna dall'/AWAY.
NEW Si verrà informati dei nuovi memo solo quando
vengono inviati (se si è online).
MAIL You will be notified of memos by email aswell as
any other settings you have.
NOMAIL You will not be notified of memos by email.
OFF Non si verrà informati in nessun caso della
ricezione dei nuovi memo.
@@ -6569,7 +6576,7 @@ HOST_SETALL
HOST_DELALL
i vhost per il gruppo %s sono stati rimossi.
HOST_DELALL_SYNTAX
Sintassi: DELALL <nick>.
DELALL <nick>.
HOST_IDENT_SETALL
Il vhost per il gruppo di %s è stato impostato a %s@%s.
HOST_SET_ERROR
@@ -6601,7 +6608,7 @@ HOST_NOT_REGED
HOST_DEL
Il vhost di %s è stato rimosso.
HOST_DEL_SYNTAX
Sintassi: %R%s del <nick>.
DEL <nick>.
HOST_OFF
Your vhost was removed and the normal cloaking restored.
HOST_OFF_UNREAL
+161 -150
View File
@@ -7,7 +7,7 @@
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
*
* $Id$
*
*/
@@ -66,36 +66,36 @@ char *anopeStrDup(const char *src);
int read_index_file()
{
FILE *f;
char buf[256];
int i;
FILE *f;
char buf[256];
int i;
if (!(f = fopen("index", "rb"))) {
perror("fopen(index)");
return -1;
if (!(f = fopen("index", "rb"))) {
perror("fopen(index)");
return -1;
}
while (fgets(buf, sizeof(buf), f))
numstrings++;
if (!(stringnames = calloc(sizeof(char *), numstrings))) {
perror("calloc(stringnames)");
return -1;
}
if (!(strings = calloc(sizeof(char *), numstrings))) {
perror("calloc(strings)");
return -1;
}
fseek(f, 0, SEEK_SET);
i = 0;
while (fgets(buf, sizeof(buf), f)) {
if (buf[strlen(buf)-1] == '\n')
buf[strlen(buf)-1] = '\0';
if (!(stringnames[i++] = anopeStrDup(buf))) {
perror("strdup()");
return -1;
}
while (fgets(buf, sizeof(buf), f))
numstrings++;
if (!(stringnames = static_cast<char **>(calloc(sizeof(char *), numstrings)))) {
perror("calloc(stringnames)");
return -1;
}
if (!(strings = static_cast<char **>(calloc(sizeof(char *), numstrings)))) {
perror("calloc(strings)");
return -1;
}
fseek(f, 0, SEEK_SET);
i = 0;
while (fgets(buf, sizeof(buf), f)) {
if (buf[strlen(buf) - 1] == '\n')
buf[strlen(buf) -1] = '\0';
if (!(stringnames[i++] = anopeStrDup(buf))) {
perror("strdup()");
return -1;
}
}
fclose(f);
return 0;
}
fclose(f);
return 0;
}
/*************************************************************************/
@@ -104,13 +104,13 @@ int read_index_file()
int stringnum(const char *name)
{
int i;
int i;
for (i = 0; i < numstrings; i++) {
if (strcmp(stringnames[i], name) == 0)
return i;
}
return -1;
for (i = 0; i < numstrings; i++) {
if (strcmp(stringnames[i], name) == 0)
return i;
}
return -1;
}
/*************************************************************************/
@@ -120,18 +120,18 @@ int stringnum(const char *name)
char *ano_getline(FILE *f)
{
static char buf[1024];
char *s;
static char buf[1024];
char *s;
do {
if (!(fgets(buf, sizeof(buf), f)))
return NULL;
linenum++;
} while (*buf == '#' || *buf == '\n');
s = buf + strlen(buf) - 1;
if (*s == '\n')
*s = '\0';
return buf;
do {
if (!(fgets(buf, sizeof(buf), f)))
return NULL;
linenum++;
} while (*buf == '#' || *buf == '\n');
s = buf + strlen(buf)-1;
if (*s == '\n')
*s = '\0';
return buf;
}
/*************************************************************************/
@@ -140,125 +140,136 @@ char *ano_getline(FILE *f)
int fput32(int val, FILE *f)
{
if (fputc(val >> 24, f) < 0 ||
fputc(val >> 16, f) < 0 ||
fputc(val >> 8, f) < 0 ||
fputc(val, f) < 0
) {
return -1;
} else {
return 0;
}
if (fputc(val>>24, f) < 0 ||
fputc(val>>16, f) < 0 ||
fputc(val>> 8, f) < 0 ||
fputc(val , f) < 0
) {
return -1;
} else {
return 0;
}
}
/*************************************************************************/
char *anopeStrDup(const char *src)
{
char *ret=NULL;
if (src) {
if ((ret = static_cast<char *>(malloc(strlen(src) + 1)))) {
strcpy(ret,src);
}
}
return ret;
char *anopeStrDup(const char *src) {
char *ret=NULL;
if(src) {
if( (ret = (char *)malloc(strlen(src)+1)) ) {;
strcpy(ret,src);
}
}
return ret;
}
/*************************************************************************/
int main(int ac, char **av)
{
char *filename = NULL, *outfile;
FILE *in, *out;
int warn = 0;
int retval = 0;
int curstring = -2, i;
char *line;
int pos;
int maxerr = 50; /* Max errors before we bail out */
char *filename = NULL, *s;
char langname[254], outfile[256];
FILE *in, *out;
int warn = 0;
int retval = 0;
int curstring = -2, i;
char *line;
int pos;
int maxerr = 50; /* Max errors before we bail out */
if (ac >= 3 && strcmp(av[1], "-w") == 0) {
warn = 1;
av[1] = av[2];
av[2] = av[3];
ac--;
}
if (ac != 3) {
fprintf(stderr, "Usage: %s [-w] <lang-file> <out-file>\n", av[0]);
return 1;
}
filename = av[1];
outfile = av[2];
if (ac >= 2 && strcmp(av[1], "-w") == 0) {
warn = 1;
av[1] = av[2];
ac--;
}
if (ac != 2) {
fprintf(stderr, "Usage: %s [-w] <lang-file>\n", av[0]);
return 1;
}
filename = av[1];
s = strrchr(filename, '.');
if (!s)
s = filename + strlen(filename);
if (s-filename > sizeof(langname)-3)
s = filename + sizeof(langname)-1;
strncpy(langname, filename, s-filename);
langname[s-filename] = '\0';
snprintf(outfile, sizeof(outfile), "%s", langname);
if (read_index_file() < 0)
return 1;
if (!(in = fopen(filename, "rb"))) {
perror(filename);
return 1;
}
if (!(out = fopen(outfile, "wb"))) {
perror(outfile);
return 1;
}
if (read_index_file() < 0)
return 1;
if (!(in = fopen(filename, "rb"))) {
perror(filename);
return 1;
}
if (!(out = fopen(outfile, "wb"))) {
perror(outfile);
return 1;
}
while (maxerr > 0 && (line = ano_getline(in)) != NULL) {
if (*line == '\t') {
if (curstring == -2) {
fprintf(stderr, "%s:%d: Junk at beginning of file\n", filename, linenum);
retval = 1;
} else if (curstring >= 0) {
line++;
i = strings[curstring] ? strlen(strings[curstring]) : 0;
if (!(strings[curstring] = static_cast<char *>(realloc(strings[curstring], i + strlen(line) + 2)))) {
fprintf(stderr, "%s:%d: Out of memory!\n", filename, linenum);
return 2;
}
sprintf(strings[curstring] + i, "%s\n", line);
}
} else {
if ((curstring = stringnum(line)) < 0) {
fprintf(stderr, "%s:%d: Unknown string name `%s'\n", filename, linenum, line);
retval = 1;
maxerr--;
} else if (strings[curstring]) {
fprintf(stderr, "%s:%d: Duplicate occurrence of string `%s'\n", filename, linenum, line);
retval = 1;
maxerr--;
} else {
if (!(strings[curstring] = static_cast<char *>(malloc(1)))) {
fprintf(stderr, "%s:%d: Out of memory!\n", filename, linenum);
return 2;
}
*strings[curstring] = '\0';
}
if (maxerr == 0)
fprintf(stderr, "%s:%d: Too many errors!\n", filename, linenum);
while (maxerr > 0 && (line = ano_getline(in)) != NULL) {
if (*line == '\t') {
if (curstring == -2) {
fprintf(stderr, "%s:%d: Junk at beginning of file\n",
filename, linenum);
retval = 1;
} else if (curstring >= 0) {
line++;
i = strings[curstring] ? strlen(strings[curstring]) : 0;
if (!(strings[curstring] =
realloc(strings[curstring], i+strlen(line)+2))) {
fprintf(stderr, "%s:%d: Out of memory!\n",filename,linenum);
return 2;
}
}
sprintf(strings[curstring]+i, "%s\n", line);
}
} else {
fput32(numstrings, out);
pos = numstrings * 8 + 4;
for (i = 0; i < numstrings; i++) {
int len = strings[i] && *strings[i] ? strlen(strings[i]) - 1 : 0;
fput32(pos, out);
fput32(len, out);
pos += len;
}
for (i = 0; i < numstrings; i++) {
if (strings[i]) {
if (*strings[i])
strings[i][strlen(strings[i])-1] = '\0'; /* kill last \n */
if (*strings[i])
fputs(strings[i], out);
} else if (warn) {
fprintf(stderr, "%s: String `%s' missing\n", filename, stringnames[i]);
if ((curstring = stringnum(line)) < 0) {
fprintf(stderr, "%s:%d: Unknown string name `%s'\n",
filename, linenum, line);
retval = 1;
maxerr--;
} else if (strings[curstring]) {
fprintf(stderr, "%s:%d: Duplicate occurrence of string `%s'\n",
filename, linenum, line);
retval = 1;
maxerr--;
} else {
if (!(strings[curstring] = malloc(1))) {
fprintf(stderr, "%s:%d: Out of memory!\n",filename,linenum);
return 2;
}
}
*strings[curstring] = '\0';
}
fclose(in);
fclose(out);
return retval;
if (maxerr == 0)
fprintf(stderr, "%s:%d: Too many errors!\n", filename, linenum);
}
}
fput32(numstrings, out);
pos = numstrings * 8 + 4;
for (i = 0; i < numstrings; i++) {
int len = strings[i] && *strings[i] ? strlen(strings[i])-1 : 0;
fput32(pos, out);
fput32(len, out);
pos += len;
}
for (i = 0; i < numstrings; i++) {
if (strings[i]) {
if (*strings[i])
strings[i][strlen(strings[i])-1] = '\0'; /* kill last \n */
if (*strings[i])
fputs(strings[i], out);
} else if (warn) {
fprintf(stderr, "%s: String `%s' missing\n", filename,
stringnames[i]);
}
}
fclose(in);
fclose(out);
return retval;
}
/*************************************************************************/
+73 -75
View File
@@ -1,76 +1,74 @@
/* Language stuff generator for win32.
*
* (C) 2003-2009 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for furhter details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
* Written by Dominick Meglio <codemastr@unrealircd.com>
*
*/
#include <string.h>
#include <stdio.h>
#include <cstdlib>
#include <cctype>
char *strip(char *str)
{
char *c;
if ((c = strchr(str,'\n')))
*c = 0;
if ((c = strchr(str,'\r')))
*c = 0;
return str;
}
int main(int argc, char *argv[])
{
if (argc < 4)
exit(1);
/* Build the index file */
if (!strcmp(argv[1], "index"))
{
FILE *fd = fopen(argv[2], "rb");
FILE *fdout = fopen(argv[3], "wb");
char buf[1024];
if (!fd || !fdout)
exit(2);
while (fgets(buf, 1023, fd))
{
if (isupper(*buf))
fprintf(fdout, "%s", buf);
}
/* Language stuff generator for win32.
*
* (C) 2003-2009 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for furhter details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
* Written by Dominick Meglio <codemastr@unrealircd.com>
*
*/
#include <string.h>
#include <stdio.h>
char *strip(char *str)
{
char *c;
if ((c = strchr(str,'\n')))
*c = 0;
if ((c = strchr(str,'\r')))
*c = 0;
return str;
}
int main(int argc, char *argv[])
{
if (argc < 2)
exit(1);
/* Build the index file */
if (!strcmp(argv[1], "index"))
{
FILE *fd = fopen("en_us.l", "rb");
FILE *fdout = fopen("index", "wb");
char buf[1024];
if (!fd || !fdout)
exit(2);
while (fgets(buf, 1023, fd))
{
if (isupper(*buf))
fprintf(fdout, "%s", buf);
}
fclose(fd);
fclose(fdout);
}
/* Build the language.h file */
else if (!strcmp(argv[1], "language.h"))
{
FILE *fd = fopen("index", "r");
FILE *fdout = fopen("language.h", "w");
char buf[1024];
int i = 0;
if (!fd || !fdout)
exit(2);
fprintf(stderr, "Generating language.h... ");
while (fgets(buf, 1023, fd)) {
fprintf(fdout, "#define %-32s %d\n", strip(buf), i++);
}
fprintf(fdout, "#define NUM_STRINGS %d\n", i);
fprintf(stderr, "%d strings\n", i);
fclose(fd);
fclose(fdout);
}
/* Build the language.h file */
else if (!strcmp(argv[1], "language.h"))
{
FILE *fd = fopen(argv[2], "r");
FILE *fdout = fopen(argv[3], "w");
char buf[1024];
int i = 0;
if (!fd || !fdout)
exit(2);
fprintf(stderr, "Generating language.h... ");
while (fgets(buf, 1023, fd)) {
fprintf(fdout, "#define %-32s %d\n", strip(buf), i++);
}
fprintf(fdout, "#define NUM_STRINGS %d\n", i);
fprintf(stderr, "%d strings\n", i);
fclose(fd);
fclose(fdout);
}
return 0;
}
fclose(fdout);
}
return 0;
}
+28 -22
View File
@@ -1,6 +1,6 @@
# Dutch Language File
#
# (C) 2003-2008 Anope Team
# (C) 2003-2009 Anope Team
# Contact us at team@anope.org
#
# Please read COPYING and README for furhter details.
@@ -1810,11 +1810,13 @@ MEMO_X_HAS_TOO_MANY_MEMOS
%s heeft momenteel te veel memo's en kan er geen meer ontvangen.
MEMO_SENT
Memo verstuurd naar %s.
# CANCEL responses
MEMO_MASS_SENT
Een memo werd gestuurd naar alle geregistreerde gebruikers.
# STAFF responses
MEMO_STAFF_SYNTAX
STAFF memo-text
# CANCEL responses
MEMO_CANCEL_SYNTAX
CANCEL {nick | kanaal}
@@ -1879,7 +1881,7 @@ MEMO_SET_UNKNOWN_OPTION
# SET NOTIFY responses
MEMO_SET_NOTIFY_SYNTAX
SET NOTIFY {ON | LOGON | NEW | OFF}
SET NOTIFY {ON | LOGON | NEW | MAIL | NOMAIL | OFF}
MEMO_SET_NOTIFY_ON
%s zal je nu informeren over memo's zodra je inlogt en wanneer deze naar je toe gezonden worden.
MEMO_SET_NOTIFY_LOGON
@@ -2923,6 +2925,8 @@ OPER_JUPE_SYNTAX
JUPE servername [reden]
OPER_JUPE_HOST_ERROR
Gebruik een geldige servernaam bij het jupen
OPER_JUPE_INVALID_SERVER
You can not jupe your services server or your uplink server.
# RAW responses
OPER_RAW_SYNTAX
@@ -2942,7 +2946,7 @@ OPER_CANNOT_RESTART
# IGNORE respondes
OPER_IGNORE_SYNTAX
Gebruik: IGNORE {ADD|DEL|LIST|CLEAR} [tijd] [nick | mask]
IGNORE {ADD|DEL|LIST|CLEAR} [tijd] [nick | mask]
OPER_IGNORE_VALID_TIME
Je moet een geldig nummer als tijd invoeren.
OPER_IGNORE_TIME_DONE
@@ -3024,7 +3028,7 @@ OPER_STAFF_AFORMAT
# DefCon Messages
OPER_DEFCON_SYNTAX
Syntax: DEFCON [1|2|3|4|5]
DEFCON [1|2|3|4|5]
OPER_DEFCON_DENIED
Services zijn in Defcon modus. Probeer later opnieuw.
OPER_DEFCON_NO_CONF
@@ -3287,7 +3291,7 @@ NEWS_RANDOM_TEXT
[Willekeurig Nieuws - %s] %s
NEWS_LOGON_SYNTAX
Genbruik: LOGONNEWS {ADD|DEL|LIST} [text|nr]
LOGONNEWS {ADD|DEL|LIST} [text|nr]
NEWS_LOGON_LIST_HEADER
Login nieuwsberichten:
NEWS_LOGON_LIST_ENTRY
@@ -3296,13 +3300,13 @@ NEWS_LOGON_LIST_ENTRY
NEWS_LOGON_LIST_NONE
Er is geen login nieuws.
NEWS_LOGON_ADD_SYNTAX
Gebruik: LOGONNEWS ADD text
LOGONNEWS ADD text
NEWS_LOGON_ADD_FULL
Nieuws lijst is vol!
NEWS_LOGON_ADDED
Nieuw login nieuws toegevoegd (#%d).
NEWS_LOGON_DEL_SYNTAX
Gebruik: LOGONNEWS DEL {nr | ALL}
LOGONNEWS DEL {nr | ALL}
NEWS_LOGON_DEL_NOT_FOUND
Login nieuwsbericht #%d niet gevonden!
NEWS_LOGON_DELETED
@@ -3339,7 +3343,7 @@ NEWS_OPER_DELETED_ALL
Alle oper nieuwsberichten zijn verwijderd.
NEWS_RANDOM_SYNTAX
Gebruik: RANDOMNEWS {ADD|DEL|LIST} [text|nr]
RANDOMNEWS {ADD|DEL|LIST} [text|nr]
NEWS_RANDOM_LIST_HEADER
Willekeurige nieuwsberichten:
NEWS_RANDOM_LIST_ENTRY
@@ -3348,13 +3352,13 @@ NEWS_RANDOM_LIST_ENTRY
NEWS_RANDOM_LIST_NONE
Er is geen willekeurig nieuws.
NEWS_RANDOM_ADD_SYNTAX
Gebruik: RANDOMNEWS ADD text
RANDOMNEWS ADD text
NEWS_RANDOM_ADD_FULL
Nieuwslijst is vol!
NEWS_RANDOM_ADDED
Nieuw willekeurig nieuwsbericht toegevoegd (#%d).
NEWS_RANDOM_DEL_SYNTAX
Gebruik: RANDOMNEWS DEL {nr | ALL}
RANDOMNEWS DEL {nr | ALL}
NEWS_RANDOM_DEL_NOT_FOUND
Willekeurig nieuwsbericht #%d niet gevonden!
NEWS_RANDOM_DELETED
@@ -4267,7 +4271,7 @@ CHAN_HELP_CMD_GETKEY
CHAN_HELP_CMD_INFO
INFO Lists information about the named registered channel
CHAN_HELP_CMD_INVITE
INVITE Tells ChanServ to invite you or a given nick into a channel
INVITE Tells ChanServ to invite you into a channel
CHAN_HELP_CMD_KICK
KICK Kicks a selected nick from a channel
CHAN_HELP_CMD_LIST
@@ -4546,12 +4550,9 @@ CHAN_HELP_SET_PRIVATE
CHAN_HELP_SET_RESTRICTED
Gebruik: SET kanaal RESTRICTED {ON | OFF}
Zet de beperkte toegang optie aan of uit voor een kanaal.
Wanneer beperkte toegang aan staat zullen gebruikers die
normaliter geen kanaaloperator status mogen hebben (dwz
gebruikers met negatieve toegangsniveaus en, als de veilige
ops optie aan staat, ook gebruikers die niet op de toegangs-
lijst staan) worden gekicked en gebanned van het kanaal.
Enables or disables the restricted access option for a
channel. When restricted access is set, users not on
the access list will instead be kicked and banned from the channel.
CHAN_HELP_SET_SECURE
Gebruik: SET kanaal SECURE {ON | OFF}
@@ -5131,6 +5132,8 @@ CHAN_HELP_CLEAR
MODES Verwijder alle modes op het kanaal (verwijdert
modes i,k,l,m,n,p,s,t).
BANS Verwijder alle bans op het kanaal.
EXCEPTS Clears all excepts on the channel.
INVITES Clears all invites on the channel.
OPS Verwijder kanaal-operator status (mode +o) van
alle kanaal-operators.
HOPS Verwijder kanaal-halfoperator status (mode +h)
@@ -5396,7 +5399,7 @@ MEMO_HELP_SET
een specifieke optie.
MEMO_HELP_SET_NOTIFY
Gebruik: SET NOTIFY {ON | LOGON | NEW | OFF}
Gebruik: SET NOTIFY {ON | LOGON | NEW | MAIL | NOMAIL | OFF}
Verandert wanneer je geinformeerd zal worden over nieuwe memo's:
@@ -5407,6 +5410,9 @@ MEMO_HELP_SET_NOTIFY
of wanneer je terugkomt van /AWAY.
NEW Je wordt alleen geinformeerd over memo's wanner ze
naar je worden verstuurd.
MAIL You will be notified of memos by email aswell as
any other settings you have.
NOMAIL You will not be notified of memos by email.
OFF Je zal geen informaties over memo's ontvangen.
ON is wezenlijk LOGON en NEW gecombineerd.
@@ -6530,7 +6536,7 @@ HOST_SETALL
HOST_DELALL
vhosts voor group %s zijn verwijderd.
HOST_DELALL_SYNTAX
Gebruik: DELALL <nick>.
DELALL <nick>.
HOST_IDENT_SETALL
vhost voor groep %s gezet op %s@%s.
HOST_SET_ERROR
@@ -6562,7 +6568,7 @@ HOST_NOT_REGED
HOST_DEL
vhost voor %s verwijderd.
HOST_DEL_SYNTAX
Gebruik: %R%s del <nick>.
DEL <nick>.
HOST_OFF
Your vhost was removed and the normal cloaking restored.
HOST_OFF_UNREAL
+25 -19
View File
@@ -14,7 +14,7 @@
#
###########################################################################
#
# (C) 2003-2008 Anope Team
# (C) 2003-2009 Anope Team
# Contact us at team@anope.org
#
# Please read COPYING and README for further details.
@@ -2376,6 +2376,9 @@ MEMO_SENT
MEMO_MASS_SENT
Wiadomo¶æ zosta³a wys³ana do wszystkich zarejestrowanych u¿ytkowników.
# STAFF responses
MEMO_STAFF_SYNTAX
STAFF memo-text
# CANCEL responses
MEMO_CANCEL_SYNTAX
@@ -2464,7 +2467,7 @@ MEMO_SET_UNKNOWN_OPTION
# SET NOTIFY responses
MEMO_SET_NOTIFY_SYNTAX
SET NOTIFY {ON | LOGON | NEW | MAIL | OFF }
SET NOTIFY {ON | LOGON | NEW | MAIL | MAIL | NOMAIL | OFF }
MEMO_SET_NOTIFY_ON
%s powiadomi Ciê o wiadomo¶ciach podczas logowania i w momencie ich nadej¶cia.
@@ -3865,6 +3868,8 @@ OPER_JUPE_SYNTAX
OPER_JUPE_HOST_ERROR
Proszê u¿yæ prawid³owej nazwy serwera.
OPER_JUPE_INVALID_SERVER
You can not jupe your services server or your uplink server.
# RAW responses
OPER_RAW_SYNTAX
@@ -3885,7 +3890,7 @@ OPER_CANNOT_RESTART
# IGNORE respondes
OPER_IGNORE_SYNTAX
Sk³adnia: IGNORE {ADD|DEL|LIST|CLEAR} [czas] [nick | maska]
IGNORE {ADD|DEL|LIST|CLEAR} [czas] [nick | maska]
OPER_IGNORE_VALID_TIME
Musisz podaæ prawid³ow± liczbê dla czasu.
@@ -3977,7 +3982,7 @@ OPER_STAFF_AFORMAT
# DefCon Messages
OPER_DEFCON_SYNTAX
Sk³adnia: DEFCON [1|2|3|4|5]
DEFCON [1|2|3|4|5]
OPER_DEFCON_DENIED
Serwisy s± w trybie defcon, spróbuj ponownie pó¼niej.
@@ -4269,7 +4274,7 @@ NEWS_RANDOM_TEXT
[Losowa wiadomo¶æ - %s] %s
NEWS_LOGON_SYNTAX
Sk³adnia: LOGONNEWS {ADD|DEL|LIST} [tekst|numer]
LOGONNEWS {ADD|DEL|LIST} [tekst|numer]
NEWS_LOGON_LIST_HEADER
Wiadomo¶ci powitalne:
@@ -4291,7 +4296,7 @@ NEWS_LOGON_ADDED
Dodano now± wiadomo¶æ powitaln± (#%d).
NEWS_LOGON_DEL_SYNTAX
Sk³adnia: LOGONNEWS DEL {numer | ALL}
LOGONNEWS DEL {numer | ALL}
NEWS_LOGON_DEL_NOT_FOUND
Wiadomo¶æ powitalna #%d nie zosta³a znaleziona!
@@ -4343,7 +4348,7 @@ NEWS_OPER_DELETED_ALL
Wszystkie wiadomo¶ci dla operatorów zosta³y skasowane.
NEWS_RANDOM_SYNTAX
Sk³adnia: RANDOMNEWS {ADD|DEL|LIST} [tekst|numer]
RANDOMNEWS {ADD|DEL|LIST} [tekst|numer]
NEWS_RANDOM_LIST_HEADER
Losowe wiadomo¶ci:
@@ -4356,7 +4361,7 @@ NEWS_RANDOM_LIST_NONE
Nie ma losowych wiadomo¶ci.
NEWS_RANDOM_ADD_SYNTAX
Sk³adnia: RANDOMNEWS ADD tekst
RANDOMNEWS ADD tekst
NEWS_RANDOM_ADD_FULL
Lista wiadomo¶ci jest pe³na!
@@ -4365,7 +4370,7 @@ NEWS_RANDOM_ADDED
Dodano now± losow± wiadomo¶æ (#%d).
NEWS_RANDOM_DEL_SYNTAX
Sk³adnia: RANDOMNEWS DEL {numer | ALL}
RANDOMNEWS DEL {numer | ALL}
NEWS_RANDOM_DEL_NOT_FOUND
Losowa wiadomo¶æ #%d nie zosta³a znaleziona!
@@ -5307,7 +5312,7 @@ CHAN_HELP_CMD_INFO
INFO Pokazuje informacje o zarejestrowanym kanale
CHAN_HELP_CMD_INVITE
INVITE Zaprasza Ciebie lub wskazany nick na kana³
INVITE Tells ChanServ to invite you into a channel
CHAN_HELP_CMD_KICK
KICK Wyrzuca wskazany nick z kana³u
@@ -5593,12 +5598,9 @@ CHAN_HELP_SET_PRIVATE
CHAN_HELP_SET_RESTRICTED
Sk³adnia: SET kana³ RESTRICTED {ON | OFF}
W³±cza lub wy³±cza ograniczenie dostêpu do kana³u.
W³±czenie tej opcji powoduje usuwanie z kana³u
u¿ytkowników, którzy nie maj± uprawnieñ operatora.
Przy w³±czonej opcji secure ops u¿ytkownicy bez
zdefiniowanego poziomu dostêpu oraz z ujemnym poziomem
tak¿e bêd± usuwani.
Enables or disables the restricted access option for a
channel. When restricted access is set, users not on
the access list will instead be kicked and banned from the channel.
CHAN_HELP_SET_SECURE
Sk³adnia: SET kana³ SECURE {ON | OFF}
@@ -6225,6 +6227,7 @@ CHAN_HELP_CLEAR
MODES Zdejmuje wszystkie tryby z kana³u
BANS Zdejmuje wszystkie bany na kanale
EXCEPTS Zdejmuje wyj±tki od banów na kanale
INVITES Clears all invites on the channel.
OPS Odbiera wszystkim status operatora
HOPS Odbiera wszystkim status pó³-operatora
VOICES Odbiera wszystkim prawo g³osu
@@ -6495,7 +6498,7 @@ MEMO_HELP_SET
%R%S HELP SET opcja
MEMO_HELP_SET_NOTIFY
Sk³adnia: SET NOTIFY {ON | LOGON | NEW | OFF}
Sk³adnia: SET NOTIFY {ON | LOGON | NEW | MAIL | NOMAIL | OFF}
Ustala sposób wys³ania powiadomieñ o nowych wiadomo¶ciach:
@@ -6508,6 +6511,9 @@ MEMO_HELP_SET_NOTIFY
trybu /AWAY.
NEW Powiadomienie bêdzie wysy³ane jedynie w
momencie otrzymania wiadomo¶ci.
MAIL You will be notified of memos by email aswell as
any other settings you have.
NOMAIL You will not be notified of memos by email.
OFF Powiadomienia nie bêd± wysy³ane.
Opcja ON jest kombinacj± opcji LOGON oraz NEW.
@@ -7575,7 +7581,7 @@ HOST_DELALL
Vhosty dla grupy %s zosta³y usuniête.
HOST_DELALL_SYNTAX
Sk³adnia: DELALL <nick>.
DELALL <nick>.
HOST_IDENT_SETALL
Vhosty dla grupy %s zosta³y zmienione na %s@%s.
@@ -7623,7 +7629,7 @@ HOST_DEL
Vhost dla %s zosta³ usuniêty.
HOST_DEL_SYNTAX
Sk³adnia: %R%s DEL <nick>.
DEL <nick>.
HOST_OFF
Your vhost was removed and the normal cloaking restored.
HOST_OFF_UNREAL
+21 -14
View File
@@ -1,6 +1,6 @@
# Portuguese language file.
#
# (C) 2003-2008 Anope Team
# (C) 2003-2009 Anope Team
# Contact us at team@anope.org
#
# Please read COPYING and README for furhter details.
@@ -1808,6 +1808,10 @@ MEMO_SENT
MEMO_MASS_SENT
Uma mensagem global foi enviada a todos os usuários registrados.
# STAFF responses
MEMO_STAFF_SYNTAX
STAFF memo-text
# CANCEL responses
MEMO_CANCEL_SYNTAX
CANCEL {nick | canal}
@@ -1872,7 +1876,7 @@ MEMO_SET_UNKNOWN_OPTION
# SET NOTIFY responses
MEMO_SET_NOTIFY_SYNTAX
SET NOTIFY {ON | LOGON | NEW | OFF}
SET NOTIFY {ON | LOGON | NEW | MAIL | NOMAIL | OFF}
MEMO_SET_NOTIFY_ON
%s irá agora notificá-lo de novos memos quando você conectar, quando eles lhe forem enviados ou quando desativar o /AWAY.
MEMO_SET_NOTIFY_LOGON
@@ -2887,6 +2891,8 @@ OPER_JUPE_SYNTAX
JUPE servidor [motivo]
OPER_JUPE_HOST_ERROR
Por favor, use um nome de servidor válido quando estiver "jupando".
OPER_JUPE_INVALID_SERVER
You can not jupe your services server or your uplink server.
# RAW responses
OPER_RAW_SYNTAX
@@ -2906,7 +2912,7 @@ OPER_CANNOT_RESTART
# LISTIGNORE responses
OPER_IGNORE_SYNTAX
Sintaxe: IGNORE {ADD|DEL|LIST|CLEAR} [tempo] [nick | mask]
IGNORE {ADD|DEL|LIST|CLEAR} [tempo] [nick | mask]
OPER_IGNORE_VALID_TIME
Você precisa digitar um número válido como tempo.
OPER_IGNORE_TIME_DONE
@@ -2978,7 +2984,7 @@ OPER_STAFF_AFORMAT
# DefCon Messages
OPER_DEFCON_SYNTAX
Sintaxe: DEFCON [1|2|3|4|5]
DEFCON [1|2|3|4|5]
OPER_DEFCON_DENIED
Este serviço está temporariamente desabilitado, por favor tente novamente mais tarde
OPER_DEFCON_NO_CONF
@@ -4219,7 +4225,7 @@ CHAN_HELP_CMD_GETKEY
CHAN_HELP_CMD_INFO
INFO Mostra informações sobre algum canal registrado
CHAN_HELP_CMD_INVITE
INVITE Pede ao ChanServ para convidar você ou um nick fornecido para um canal
INVITE Tells ChanServ to invite you into a channel
CHAN_HELP_CMD_KICK
KICK Kicka (expulsa) um nick de um canal
CHAN_HELP_CMD_LIST
@@ -4495,12 +4501,9 @@ CHAN_HELP_SET_PRIVATE
CHAN_HELP_SET_RESTRICTED
Sintaxe: SET canal RESTRICTED {ON|OFF}
Ativa ou desativa a opção de acesso restrito para um canal.
Quando o acesso restrito estiver ativado, usuários que
normalmente não possuem privilegios de OP no canal
(usuários com nível negativo de acesso e, se secure ops
estiver ativado, usuários que não pertencem à lista de
acesso) serão imediatamente kickados e banidos do canal.
Enables or disables the restricted access option for a
channel. When restricted access is set, users not on
the access list will instead be kicked and banned from the channel.
CHAN_HELP_SET_SECURE
Sintaxe: SET canal SECURE {ON|OFF}
@@ -5075,6 +5078,7 @@ CHAN_HELP_CLEAR
travados com MLOCK.
BANS Remove todos os bans do canal.
EXCEPTS Remove todos os excepts do canal.
INVITES Clears all invites on the channel.
OPS Remove o status de Operador de canal (modo +o)
de todos os Operadores do canal.
HOPS Remove o status de Half-Operador de canal (modo +h)
@@ -5348,7 +5352,7 @@ MEMO_HELP_SET
uma opção específica.
MEMO_HELP_SET_NOTIFY
Sintaxe: SET NOTIFY {ON | LOGON | NEW | OFF}
Sintaxe: SET NOTIFY {ON | LOGON | NEW | MAIL | NOMAIL | OFF}
Altera quando você será notificado sobre novas mensagens:
@@ -5359,6 +5363,9 @@ MEMO_HELP_SET_NOTIFY
conectar ou quando voltar de um /AWAY.
NEW Você só será notificado sobre mensagens quando elas
forem enviadas a você.
MAIL You will be notified of memos by email aswell as
any other settings you have.
NOMAIL You will not be notified of memos by email.
OFF Você não receberá nenhuma notificação sobre mensagens.
ON é essencialmente a combinação de LOGON e NEW.
@@ -6494,7 +6501,7 @@ HOST_SETALL
HOST_DELALL
vhosts do grupo %s foi removido.
HOST_DELALL_SYNTAX
Sintaxe: DELALL <nick>.
DELALL <nick>.
HOST_IDENT_SETALL
vhost do grupo %s ajustado para %s@%s.
HOST_SET_ERROR
@@ -6526,7 +6533,7 @@ HOST_NOT_REGED
HOST_DEL
vhost para %s removido.
HOST_DEL_SYNTAX
Sintaxe: %R%s del <nick>.
DEL <nick>.
HOST_OFF
Your vhost was removed and the normal cloaking restored.
HOST_OFF_UNREAL
+26 -17
View File
@@ -1,6 +1,6 @@
# Russian language file for Anope
#
# (C) 2003-2008 Anope Team
# (C) 2003-2009 Anope Team
# Contact us at team@anope.org
#
# Please read COPYING and README for further details.
@@ -1785,6 +1785,10 @@ MEMO_SENT
Ìåìî-ñîîáùåíèå äëÿ %s óñïåøíî îòïðàâëåíî.
MEMO_MASS_SENT
Ìàññîâîå ñîîáùåíèå óñïåøíî îòïðàâëåíî âñåì çàðåãèñòðèðîâàííûì ïîëüçîâàòåëÿì.
# STAFF responses
MEMO_STAFF_SYNTAX
STAFF memo-text
# CANCEL responses
MEMO_CANCEL_SYNTAX
@@ -1850,7 +1854,7 @@ MEMO_SET_UNKNOWN_OPTION
# SET NOTIFY responses
MEMO_SET_NOTIFY_SYNTAX
SET NOTIFY {ON | LOGON | NEW | OFF}
SET NOTIFY {ON | LOGON | NEW | MAIL | NOMAIL | OFF}
MEMO_SET_NOTIFY_ON
Ñ ýòîãî ìîìåíòà, %s áóäåò óâåäîìëÿòü âàñ î íîâûõ ñîîáùåíèÿõ ñðàçó ïîñëå èäåíòèôèêàöèè ê íèêó èëè ïðè ïîñòóïëåíèè íîâûõ ñîîáùåíèé.
MEMO_SET_NOTIFY_LOGON
@@ -2858,6 +2862,8 @@ OPER_JUPE_SYNTAX
JUPE èìÿ_ñåðâåðà [ïðè÷èíà]
OPER_JUPE_HOST_ERROR
 êà÷åñòâå îñíîâíîãî ïàðàìåòðà âû äîëæíû óêàçàòü ðåàëüíîå èìÿ ñåðåâåðà
OPER_JUPE_INVALID_SERVER
You can not jupe your services server or your uplink server.
# RAW responses
OPER_RAW_SYNTAX
@@ -2877,7 +2883,7 @@ OPER_CANNOT_RESTART
# IGNORE respondes
OPER_IGNORE_SYNTAX
Ñèíòàêñòñ: IGNORE {ADD|DEL|LIST|CLEAR} [âðåìÿ] [íèê]
IGNORE {ADD|DEL|LIST|CLEAR} [âðåìÿ] [íèê]
OPER_IGNORE_VALID_TIME
Çíà÷åíèå ïàðàìåòðà "âðåìÿ" óêàçàíî íå âåðíî.
OPER_IGNORE_TIME_DONE
@@ -2947,7 +2953,7 @@ OPER_STAFF_AFORMAT
# DefCon Messages
OPER_DEFCON_SYNTAX
Ñèíòàêñèñ: DEFCON [1|2|3|4|5]
DEFCON [1|2|3|4|5]
OPER_DEFCON_DENIED
Íà äàííûé ìîìåíò ñåðâèñû ðàáîòàþò â DEFCON-ðåæèìå. Ïîâòîðèòå ñâîé çàïðîñ ïîçæå.
OPER_DEFCON_NO_CONF
@@ -3206,7 +3212,7 @@ NEWS_RANDOM_TEXT
[Ñëó÷àéíàÿ íîâîñòü - %s] %s
NEWS_LOGON_SYNTAX
Ñèíòàêñèñ: LOGONNEWS {ADD|DEL|LIST} [òåêñò|íîìåð]
LOGONNEWS {ADD|DEL|LIST} [òåêñò|íîìåð]
NEWS_LOGON_LIST_HEADER
Òåêóùèå ñïèñîê íîâîñòåé:
NEWS_LOGON_LIST_ENTRY
@@ -3215,13 +3221,13 @@ NEWS_LOGON_LIST_ENTRY
NEWS_LOGON_LIST_NONE
Ñïèñîê íîâîñòåé ïóñò.
NEWS_LOGON_ADD_SYNTAX
Ñèíòàêñèñ: LOGONNEWS ADD òåêñò
LOGONNEWS ADD òåêñò
NEWS_LOGON_ADD_FULL
Ñïèñîê íîâîñòåé ïåðåïîëíåí.
NEWS_LOGON_ADDED
Íîâîñòü óñïåøíî äîáàâëåíà, åå íîìåð: #%d
NEWS_LOGON_DEL_SYNTAX
Ñèíòàêñèñ: LOGONNEWS DEL {íîìåð | ALL}
LOGONNEWS DEL {íîìåð | ALL}
NEWS_LOGON_DEL_NOT_FOUND
Íîâîñòü ïîä íîìåðîì #%d íå îáíàðóæåíà.
NEWS_LOGON_DELETED
@@ -3258,7 +3264,7 @@ NEWS_OPER_DELETED_ALL
Ñïèñîê íîâîñòåé äëÿ îïåðàòîðîâ ïîëíîñòüþ î÷èùåí.
NEWS_RANDOM_SYNTAX
Ñèíòàêñèñ: RANDOMNEWS {ADD|DEL|LIST} [òåêñò|íîìåð]
RANDOMNEWS {ADD|DEL|LIST} [òåêñò|íîìåð]
NEWS_RANDOM_LIST_HEADER
Ñïèñîê ñëó÷àéíûõ íîâîñòåé:
NEWS_RANDOM_LIST_ENTRY
@@ -3267,13 +3273,13 @@ NEWS_RANDOM_LIST_ENTRY
NEWS_RANDOM_LIST_NONE
Ñïèñîê ñëó÷àéíûõ íîâîñòåé ïóñò.
NEWS_RANDOM_ADD_SYNTAX
Ñèíòàêñèñ: RANDOMNEWS ADD òåêñò
RANDOMNEWS ADD òåêñò
NEWS_RANDOM_ADD_FULL
Ñïèñîê ñëó÷àéíûõ íîâîñòåé ïåðåïîëíåí.
NEWS_RANDOM_ADDED
Íîâîñòü óñïåøíî äîáàâëåíà, åå íîìåð: #%d
NEWS_RANDOM_DEL_SYNTAX
Ñèíòàêñèñ: RANDOMNEWS DEL {íîìåð | ALL}
RANDOMNEWS DEL {íîìåð | ALL}
NEWS_RANDOM_DEL_NOT_FOUND
Íîâîñòü ïîä íîìåðîì #%d íå îáíàðóæåíà.
NEWS_RANDOM_DELETED
@@ -4245,7 +4251,7 @@ CHAN_HELP_CMD_GETKEY
CHAN_HELP_CMD_INFO
INFO Çàïðîñ èíôîðìàöèè îá óêàçàííîì êàíàëå
CHAN_HELP_CMD_INVITE
INVITE Çàñòàâëÿåò ñåðâèñû ïðèãëàñèòü âàñ íà óêàçàííûé êàíàë.
INVITE Tells ChanServ to invite you into a channel
CHAN_HELP_CMD_KICK
KICK Âûêèäûâàåò óêàçàííîãî ïîëüçîâàòåëÿ ñ êàíàëà
CHAN_HELP_CMD_LIST
@@ -4525,9 +4531,9 @@ CHAN_HELP_SET_PRIVATE
CHAN_HELP_SET_RESTRICTED
Ñèíòàêñèñ: SET #êàíàë RESTRICTED {ON | OFF}
Àêòèâèðóåò/äåàêòèâèðóåò îãðàíè÷åííûé äîñòóï íà êàíàë. Äàííûé ðåæèì
ïîçâîëÿåò çàïðåòèòü äîñòóï íà êàíàë âñåì òåì ïîëüçîâàòåëÿì, êîòîðûå
íå ÷èñëÿòñÿ â ñïèñêå äîñòóïà êàíàëà.
Enables or disables the restricted access option for a
channel. When restricted access is set, users not on
the access list will instead be kicked and banned from the channel.
CHAN_HELP_SET_SECURE
Ñèíòàêñèñ: SET #êàíàë SECURE {ON | OFF}
@@ -5409,7 +5415,7 @@ MEMO_HELP_SET
êîìàíäîé %R%S HELP SET îïöèÿ.
MEMO_HELP_SET_NOTIFY
Ñèíòàêñèñ: SET NOTIFY {ON | LOGON | NEW | OFF}
Ñèíòàêñèñ: SET NOTIFY {ON | LOGON | NEW | MAIL | NOMAIL | OFF}
Äàííàÿ îïöèÿ ïîçâîëÿåò íàñòðîèòü âàø ëè÷íûé ìåòîä óâåäîìëåíèÿ î
íîâûõ ñîîáùåíèÿõ, ïîñëàííûõ âàì êåì-ëèáî.
@@ -5423,6 +5429,9 @@ MEMO_HELP_SET_NOTIFY
/AWAY (îòîøåë).
NEW óâåäîìëåíèå áóäåò ïîñòóïàòü ñðàçó, êàê òîëüêî êòî-òî
îòïðàâèò âàì íîâîå ñîîáùåíèå.
MAIL You will be notified of memos by email aswell as
any other settings you have.
NOMAIL You will not be notified of memos by email.
OFF óâåäîìëåíèé î ïîëó÷åíèè íîâûõ ñîîáùåíèé ïîñòóïàòü
íå áóäåò
@@ -6632,7 +6641,7 @@ HOST_SETALL
HOST_DELALL
Âñå âèðòóàëüíûå õîñòû äëÿ ãðóïïû %s áûëè óäàëåíû.
HOST_DELALL_SYNTAX
Ñèíòàêñèñ: DELALL <íèê>.
DELALL <íèê>.
HOST_IDENT_SETALL
Âèðòóàëüíûé õîñò äëÿ ãðóïïû %s óñòàíîâëåí â %s@%s.
HOST_SET_ERROR
@@ -6664,7 +6673,7 @@ HOST_NOT_REGED
HOST_DEL
Âèðòóàëüíûé õîñò äëÿ %s óäàëåí.
HOST_DEL_SYNTAX
Ñèíòàêñèñ: %R%s del <íèê>.
DEL <íèê>.
HOST_OFF
Your vhost was removed and the normal cloaking restored.
HOST_OFF_UNREAL
+27 -19
View File
@@ -1,6 +1,6 @@
# Turkish language file.
#
# (C) 2003-2008 Anope Team
# (C) 2003-2009 Anope Team
# Contact us at team@anope.org
#
# Please read COPYING and README for furhter details.
@@ -1818,6 +1818,10 @@ MEMO_SENT
MEMO_MASS_SENT
A massmemo has been sent to all registered users.
# STAFF responses
MEMO_STAFF_SYNTAX
STAFF memo-text
# CANCEL responses
MEMO_CANCEL_SYNTAX
CANCEL {nick | kanaladý}
@@ -1884,7 +1888,7 @@ MEMO_SET_UNKNOWN_OPTION
# SET NOTIFY responses
MEMO_SET_NOTIFY_SYNTAX
SET NOTIFY {ON | LOGON | NEW | OFF}
SET NOTIFY {ON | LOGON | NEW | MAIL | NOMAIL | OFF}
MEMO_SET_NOTIFY_ON
%s sizi yeni mesajlar için baðlandýðýnýzda veya mesajlar size gönderildiði anda uyaracak.
MEMO_SET_NOTIFY_LOGON
@@ -2946,6 +2950,8 @@ OPER_JUPE_SYNTAX
# RAW responses
OPER_JUPE_HOST_ERROR
Please use a valid server name when juping
OPER_JUPE_INVALID_SERVER
You can not jupe your services server or your uplink server.
# RAW responses
OPER_RAW_SYNTAX
@@ -2965,7 +2971,7 @@ OPER_CANNOT_RESTART
# LISTIGNORE responses
OPER_IGNORE_SYNTAX
Syntax: IGNORE {ADD|DEL|LIST|CLEAR} [time] [nick | mask]
IGNORE {ADD|DEL|LIST|CLEAR} [time] [nick | mask]
OPER_IGNORE_VALID_TIME
You have to enter a valid number as time.
OPER_IGNORE_TIME_DONE
@@ -3057,7 +3063,7 @@ OPER_STAFF_AFORMAT
# DefCon Messages
OPER_DEFCON_SYNTAX
Syntax: DEFCON [1|2|3|4|5]
DEFCON [1|2|3|4|5]
OPER_DEFCON_DENIED
This service is temporarly disabled, please try again later
OPER_DEFCON_NO_CONF
@@ -3328,7 +3334,7 @@ NEWS_RANDOM_TEXT
[Karisik Haberler - %s] %s
NEWS_LOGON_SYNTAX
Kullanýmý: LOGONNEWS {ADD|DEL|LIST} [yazý|num]
LOGONNEWS {ADD|DEL|LIST} [yazý|num]
NEWS_LOGON_LIST_HEADER
Baðlantý haberleri:
NEWS_LOGON_LIST_ENTRY
@@ -3337,13 +3343,13 @@ NEWS_LOGON_LIST_ENTRY
NEWS_LOGON_LIST_NONE
Hiç baðlantý haberi yok.
NEWS_LOGON_ADD_SYNTAX
Kullanýmý: LOGONNEWS ADD yazý
LOGONNEWS ADD yazý
NEWS_LOGON_ADD_FULL
Haber listesi dolu!
NEWS_LOGON_ADDED
Yeni baðlantý haberleri maddesi eklendi (#%d).
NEWS_LOGON_DEL_SYNTAX
Kullanýmý: LOGONNEWS DEL {num | ALL}
LOGONNEWS DEL {num | ALL}
NEWS_LOGON_DEL_NOT_FOUND
Baðlantý haberleri maddesi #%d bulunamadý!
NEWS_LOGON_DELETED
@@ -3380,7 +3386,7 @@ NEWS_OPER_DELETED_ALL
Tüm operatör haberleri maddeleri silindi.
NEWS_RANDOM_SYNTAX
Kullanýmý: RANDOMNEWS {ADD|DEL|LIST} [yazi|no]
RANDOMNEWS {ADD|DEL|LIST} [yazi|no]
NEWS_RANDOM_LIST_HEADER
Karisik haberler:
NEWS_RANDOM_LIST_ENTRY
@@ -3389,13 +3395,13 @@ NEWS_RANDOM_LIST_ENTRY
NEWS_RANDOM_LIST_NONE
Hiç karisik haber yok.
NEWS_RANDOM_ADD_SYNTAX
Kullanýmý: RANDOMNEWS ADD yazi
RANDOMNEWS ADD yazi
NEWS_RANDOM_ADD_FULL
Haber listesi dolu!
NEWS_RANDOM_ADDED
Yeni karisik haber eklendi (#%d).
NEWS_RANDOM_DEL_SYNTAX
Kullanýmý: RANDOMNEWS DEL {no | ALL}
RANDOMNEWS DEL {no | ALL}
NEWS_RANDOM_DEL_NOT_FOUND
#%d numarali karisik haber bulunamadi!
NEWS_RANDOM_DELETED
@@ -4330,7 +4336,7 @@ CHAN_HELP_CMD_GETKEY
CHAN_HELP_CMD_INFO
INFO Lists information about the named registered channel
CHAN_HELP_CMD_INVITE
INVITE Tells ChanServ to invite you or a given nick into a channel
INVITE Tells ChanServ to invite you into a channel
CHAN_HELP_CMD_KICK
KICK Kicks a selected nick from a channel
CHAN_HELP_CMD_LIST
@@ -4591,11 +4597,9 @@ CHAN_HELP_SET_PRIVATE
CHAN_HELP_SET_RESTRICTED
Kullanýmý: SET kanaladý RESTRICTED {ON | OFF}
Bir kanal için izinli giriþ özelliðini açar yada kapatýr.
izinli giriþ özelliði aktifse, kanal opu özelliði olmayan
kullanýcýlar(negatif access seviyesi olanlar, secure ops
özelliði aktif olanlar, ve access listesinde olmayan
kullanýcýlar) kanaldan atýlýp banlanýrlar.
Enables or disables the restricted access option for a
channel. When restricted access is set, users not on
the access list will instead be kicked and banned from the channel.
CHAN_HELP_SET_SECURE
Kullanýmý: SET kanaladý SECURE {ON | OFF}
@@ -5132,6 +5136,7 @@ CHAN_HELP_CLEAR
modlarýný temizler).
BANS Kanaldaki tüm banlarý kaldýrýr.
EXCEPTS Clears all excepts on the channel.
INVITES Clears all invites on the channel.
OPS Kanal opu statüsünde olanlarýn (mode +o)
oplarýný alýr.
HOPS Removes channel-halfoperator status (mode +h) from
@@ -5397,7 +5402,7 @@ MEMO_HELP_SET
%R%S HELP SET özellik yazýn.
MEMO_HELP_SET_NOTIFY
Kullanýmý: SET NOTIFY {ON | LOGON | NEW | OFF}
Kullanýmý: SET NOTIFY {ON | LOGON | NEW | MAIL | NOMAIL | OFF}
Yeni mesajlarda ne zaman uyarýlacaðýnýzý belirler:
@@ -5408,6 +5413,9 @@ MEMO_HELP_SET_NOTIFY
dönüþte uyarýlýrsýnýz.
NEW Yeni mesajlar için sadece size gönderildikleri
anda uyarýlýrsýnýz.
MAIL You will be notified of memos by email aswell as
any other settings you have.
NOMAIL You will not be notified of memos by email.
OFF Yeni mesajlar için herhangi bir uyarý almazsýnýz.
ON parametresi LOGON ve NEW 'in kombinasyonudur
@@ -6523,7 +6531,7 @@ HOST_SETALL
HOST_DELALL
vhosts for group %s have been removed.
HOST_DELALL_SYNTAX
Syntax: DELALL <nick>.
DELALL <nick>.
HOST_IDENT_SETALL
vhost for group %s set to %s@%s.
HOST_SET_ERROR
@@ -6555,7 +6563,7 @@ HOST_NOT_REGED
HOST_DEL
vhost for %s removed.
HOST_DEL_SYNTAX
Syntax: %R%s del <nick>.
DEL <nick>.
###########################################################################
#
+99
View File
@@ -0,0 +1,99 @@
#
# Anope IRC Services 1.7.9 for Windows
#
# Contact us at team@anope.org
#
# Please read COPYING and README for further details.
#
# Based on the original code of Epona by Lara.
# Based on the original code of Services by Andy Church.
#
# Please read and edit the configurations options below.
# Set this to 1 to enable MySQL support
USE_MYSQL=0
# Set this to the path where the MySQL includes can be found
#MYSQL_INC="c:\\mysql\\include\\"
# Set this to the path where the MySQL libraries can be found
#MYSQL_LIB="c:\\mysql\\lib\\opt\\"
# Set this to 1 to enable database encryption
DB_ENCRYPTION=0
# If you want to change the names/locations of files/folders, you
# can do that here.
PROGRAM=anope.exe
DATDEST=data
# If you are compiling using VC6, or get __ftol2 errors, please uncomment
# the following line:
#VC6=/QIfist
# If you are getting errors such as 'Cannot find wsock32.lib', then change
# the following line to the path where the library files can be found.
#
# Eg: LIBPATH=C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\lib
#
LIBPATH=
# If you edited the line above, uncomment the next line.
#LFLAGS=/LIBPATH:"$(LIBPATH)"
###############################################################
#Don't touch anything below unless you know what you are doing#
###############################################################
CC=cl
RC=rc
MAKE=nmake -f Makefile.win32
BASE_CFLAGS=/O2 /MD
LIBS=wsock32.lib advapi32.lib /NODEFAULTLIB:libcmtd.lib
ELIBS=
MLIBS=
!IF $(USE_MYSQL) == 1
!IF $(MYSQL_LIB) != ""
LIBS=$(LIBS) /LIBPATH:$(MYSQL_LIB)
MYSQL_LIB_PATH=/LIBPATH:$(MYSQL_LIB)
!ENDIF
!IF $(MYSQL_INC) != ""
BASE_CFLAGS=$(BASE_CFLAGS) /I $(MYSQL_INC)
MYSQL_INC_PATH=/I $(MYSQL_INC)
!ENDIF
RDB_C=rdb.c
RDB_O=rdb.obj
MYSQL_C=mysql.c
MYSQL_O=mysql.obj
BASE_CFLAGS=/D USE_MYSQL /D USE_RDB $(BASE_CFLAGS) /D HAVE_MYSQL_MYSQL_H
MYPASQL_BUILD=$(CC) /LD $(MYSQL_INC_PATH) src\mypasql.c /link $(MYSQL_LIB_PATH) $(LFLAGS) \
/DEF:src\mypasql.def libmysql.lib zlib.lib ws2_32.lib advapi32.lib /NODEFAULTLIB:LIBCMTD.lib
LIBS=$(LIBS) libmysql.lib zlib.lib
!ENDIF
!IF $(DB_ENCRYPTION) == 1
BASE_CFLAGS=/D USE_ENCRYPTION /D ENCRYPT_MD5 $(BASE_CFLAGS)
!ENDIF
# Note that changing any of these options (or, in fact, anything in this
# file) will automatically cause a full rebuild of Services.
# Compilation options:
# -DCLEAN_COMPILE Attempt to compile without any warnings (note that
# this may reduce performance)
# -DSTREAMLINED Leave out "fancy" options to enhance performance
CDEFS =
# Add any extra flags you want here. The default line enables warnings and
# debugging symbols on GCC. If you have a non-GCC compiler, you may want
# to comment it out or change it.
MORE_CFLAGS = /I"../include"
CFLAGS = /nologo $(VC6) $(CDEFS) $(BASE_CFLAGS) $(MORE_CFLAGS)
-224
View File
@@ -1,224 +0,0 @@
#!/usr/bin/env perl
### THIS IS DESIGNED TO BE RUN BY MAKE! DO NOT RUN FROM THE SHELL (because it MIGHT sigterm the shell)! ###
use strict;
use warnings FATAL => qw(all);
use POSIX ();
# Runs the compiler, passing it the given arguments.
# Filters select output from the compiler's standard error channel and
# can take different actions as a result.
# NOTE: this is *NOT* a hash (sadly: a hash would stringize all the regexes and thus render them useless, plus you can't index a hash based on regexes anyway)
# even though we use the => in it.
# The subs are passed the message, and anything the regex captured.
my $flag = shift(@ARGV);
my $quiet = 0;
my $cc;
if ($flag eq "-q") {
$quiet = 1;
$cc = shift(@ARGV);
}
else {
$cc = $flag;
}
my $showncmdline = 0;
# GCC's "location of error stuff", which accumulates the "In file included from" include stack
my $location = "";
my @msgfilters = (
[ qr/^(.*) warning: cannot pass objects of non-POD type `(.*)' through `\.\.\.'; call will abort at runtime/ => sub {
my ($msg, $where, $type) = @_;
my $errstr = $location . "$where error: cannot pass objects of non-POD type `$type' through `...'\n";
$location = "";
if ($type =~ m/::(basic_)?string/) {
$errstr .= "$where (Did you forget to call c_str()?)\n";
}
die $errstr;
} ],
# Start of an include stack.
[ qr/^In file included from .*[,:]$/ => sub {
my ($msg) = @_;
$location = "$msg\n";
return undef;
} ],
# Continuation of an include stack.
[ qr/^ from .*[,:]$/ => sub {
my ($msg) = @_;
$location .= "$msg\n";
return undef;
} ],
# A function, method, constructor, or destructor is the site of a problem
[ qr/In ((con|de)structor|(member )?function)/ => sub {
my ($msg) = @_;
# If a complete location string is waiting then probably we dropped an error, so drop the location for a new one.
if ($location =~ m/In ((con|de)structor|(member )?function)/) {
$location = "$msg\n";
} else {
$location .= "$msg\n";
}
return undef;
} ],
[ qr/^.* warning: / => sub {
my ($msg) = @_;
my $str = $location . "\e[33;1m$msg\e[0m\n";
$showncmdline = 1;
$location = "";
return $str;
} ],
[ qr/^.* error: / => sub {
my ($msg) = @_;
my $str = "";
$str = "An error occured when executing:\e[37;1m $cc " . join(' ', @ARGV) . "\n" unless $showncmdline;
$showncmdline = 1;
$str .= $location . "\e[31;1m$msg\e[0m\n";
$location = "";
return $str;
} ],
[ qr/./ => sub {
my ($msg) = @_;
$msg = $location . $msg;
$location = "";
$msg =~ s/std::basic_string\<char\, std\:\:char_traits\<char\>, std::allocator\<char\> \>(\s+|)/std::string/g;
$msg =~ s/std::basic_string\<char\, .*?irc_char_traits\<char\>, std::allocator\<char\> \>(\s+|)/irc::string/g;
for my $stl (qw(deque vector list)) {
$msg =~ s/std::$stl\<(\S+), std::allocator\<\1\> \>/std::$stl\<$1\>/g;
$msg =~ s/std::$stl\<(std::pair\<\S+, \S+\>), std::allocator\<\1 \> \>/std::$stl<$1 >/g;
}
$msg =~ s/std::map\<(\S+), (\S+), std::less\<\1\>, std::allocator\<std::pair\<const \1, \2\> \> \>/std::map<$1, $2>/g;
# Warning: These filters are GNU C++ specific!
$msg =~ s/__gnu_cxx::__normal_iterator\<(\S+)\*, std::vector\<\1\> \>/std::vector<$1>::iterator/g;
$msg =~ s/__gnu_cxx::__normal_iterator\<(std::pair\<\S+, \S+\>)\*, std::vector\<\1 \> \>/std::vector<$1 >::iterator/g;
$msg =~ s/__gnu_cxx::__normal_iterator\<char\*, std::string\>/std::string::iterator/g;
$msg =~ s/__gnu_cxx::__normal_iterator\<char\*, irc::string\>/irc::string::iterator/g;
return $msg;
} ],
);
my $pid;
my ($r_stderr, $w_stderr);
my $name = "";
my $action = "";
if ($cc eq "ar") {
$name = $ARGV[1];
$action = "ARCHIVE";
} else {
foreach my $n (@ARGV)
{
if ($n =~ /\.cpp|\.c$/)
{
if ($action eq "BUILD")
{
$name .= " " . $n;
}
else
{
$action = "BUILD";
$name = $n;
}
}
elsif ($action eq "BUILD") # .cpp has priority.
{
next;
}
elsif ($n eq "-o")
{
$action = $name = $n;
}
elsif ($name eq "-o")
{
$action = "LINK";
$name = $n;
}
}
}
if (!defined($cc) || $cc eq "") {
die "Compiler not specified!\n";
}
pipe($r_stderr, $w_stderr) or die "pipe stderr: $!\n";
$pid = fork;
die "Cannot fork to start $cc! $!\n" unless defined($pid);
if ($pid) {
if ($quiet == 0) {
printf "\t\e[1;32m%-20s\e[0m%s\n", $action . ":", $name unless $name eq "";
}
my $fail = 0;
# Parent - Close child-side pipes.
close $w_stderr;
# Close STDIN to ensure no conflicts with child.
close STDIN;
# Now read each line of stderr
LINE: while (defined(my $line = <$r_stderr>)) {
chomp $line;
for my $filter (@msgfilters) {
my @caps;
if (@caps = ($line =~ $filter->[0])) {
$@ = "";
$line = eval {
$filter->[1]->($line, @caps);
};
if ($@) {
# Note that $line is undef now.
$fail = 1;
print STDERR $@;
}
next LINE unless defined($line);
}
}
# Chomp off newlines again, in case the filters put some back in.
chomp $line;
print STDERR "$line\n";
}
waitpid $pid, 0;
close $r_stderr;
my $exit = $?;
# Simulate the same exit, so make gets the right termination info.
if (POSIX::WIFSIGNALED($exit)) {
# Make won't get the right termination info (it gets ours, not the compiler's), so we must tell the user what really happened ourselves!
print STDERR "$cc killed by signal " . POSIX::WTERMSIGN($exit) . "\n";
kill "TERM", getppid(); # Needed for bsd make.
kill "TERM", $$;
}
else {
if (POSIX::WEXITSTATUS($exit) == 0) {
if ($fail) {
kill "TERM", getppid(); # Needed for bsd make.
kill "TERM", $$;
}
exit 0;
} else {
exit POSIX::WEXITSTATUS($exit);
}
}
} else {
# Child - Close parent-side pipes.
close $r_stderr;
# Divert stderr
open STDERR, ">&", $w_stderr or die "Cannot divert STDERR: $!\n";
# Run the compiler!
exec { $cc } $cc, @ARGV;
die "exec $cc: $!\n";
}
-77
View File
@@ -1,77 +0,0 @@
# Find all the *.c and *.cpp files within the current source directory, and sort the list
file(GLOB SRC_SRCS_C RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.c")
file(GLOB SRC_SRCS_CPP RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.cpp")
set(SRC_SRCS ${SRC_SRCS_C} ${SRC_SRCS_CPP})
# If not using Visual Studio, don't include win32_memory.cpp, it's only required by Visual Studio to override it's override of the new/delete operators
if(NOT MSVC)
list(REMOVE_ITEM SRC_SRCS win32_memory.cpp)
endif(NOT MSVC)
# If not using Windows, don't include windows.cpp, as it's Windows-specific
if(NOT WIN32)
list(REMOVE_ITEM SRC_SRCS windows.cpp)
endif(NOT WIN32)
if(CMAKE244_OR_BETTER)
list(SORT SRC_SRCS)
endif(CMAKE244_OR_BETTER)
# Set all the files to use C++ as well as set their compile flags (use the module-specific compile flags, though)
set_source_files_properties(${SRC_SRCS} PROPERTIES LANGUAGE CXX COMPILE_FLAGS "${CXXFLAGS}")
# Iterate through all the source files
foreach(SRC ${SRC_SRCS})
# Calculate the header file dependencies for the given source file
calculate_depends(${SRC})
endforeach(SRC)
# Under Windows, we also include a resource file to the build
if(WIN32)
# Make sure that the resource file is seen as an RC file to be compiled with a resource compiler, not a C++ compiler
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/win32.rc LANGUAGE RC)
# Add the resource file to the list of sources
append_to_list(SRC_SRCS ${CMAKE_CURRENT_BINARY_DIR}/win32.rc)
# For MinGW, we have to change the compile flags
if(MINGW)
set(RC_CFLAGS "-DMINGW -Ocoff -I${Anope_SOURCE_DIR}/include")
# If any sort of debugging is being enabled, add a _DEBUG define to the flags for the resource compiler
if(CMAKE_BUILD_TYPE STREQUAL "DEBUG" OR CMAKE_BUILD_TYPE STREQUAL "RELWITHDEBINFO")
set(RC_CFLAGS "${RC_CFLAGS} -D_DEBUG")
endif(CMAKE_BUILD_TYPE STREQUAL "DEBUG" OR CMAKE_BUILD_TYPE STREQUAL "RELWITHDEBINFO")
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/win32.rc COMPILE_FLAGS "${RC_CFLAGS}")
# For anything else, assumingly Visual Studio at this point, use a different set of compile flags
else(MINGW)
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/win32.rc COMPILE_FLAGS "/i\"${Anope_SOURCE_DIR}/include\"")
endif(MINGW)
endif(WIN32)
# Generate the Anope executable and set it's linker flags, also set it to export it's symbols even though it's not a module
add_executable(${PROGRAM_NAME} ${SRC_SRCS})
set_target_properties(${PROGRAM_NAME} PROPERTIES LINKER_LANGUAGE CXX LINK_FLAGS "${LDFLAGS}" ENABLE_EXPORTS ON)
# On Windows, also link Anope to the wsock32 library, as well as set the version
if(WIN32)
target_link_libraries(${PROGRAM_NAME} wsock32)
set_target_properties(${PROGRAM_NAME} PROPERTIES VERSION "${VERSION_DOTTED}")
endif(WIN32)
# Building the Anope executable requires the language files to be compiled first as well as the version.h header to be generated
add_dependencies(${PROGRAM_NAME} language headers)
# Get the filename of the Anope executable as it is in on this system
get_target_property(SERVICES_BINARY ${PROGRAM_NAME} LOCATION)
get_filename_component(SERVICES_BINARY ${SERVICES_BINARY} NAME)
set(SERVICES_BIN "${SERVICES_BINARY}")
# Add the Anope executable to the list of files for CPack to ignore
add_to_cpack_ignored_files("${SERVICES_BINARY}$" TRUE)
# Generate sysconf.h from the earlier configuration
configure_file(${Anope_SOURCE_DIR}/include/sysconf.h.cmake ${Anope_BINARY_DIR}/include/sysconf.h)
# Go into the following directories and run their CMakeLists.txt as well
add_subdirectory(bin)
add_subdirectory(core)
add_subdirectory(modules)
add_subdirectory(protocol)
add_subdirectory(tools)
# Set Anope to be installed to the bin directory
install(TARGETS ${PROGRAM_NAME}
DESTINATION bin
)
+61 -60
View File
@@ -1,27 +1,31 @@
OBJS = actions.o base64.o bots.o botserv.o channels.o chanserv.o commands.o compat.o \
config.o datafiles.o encrypt.o events.o hashcomp.o helpserv.o hostserv.o init.o ircd.o language.o log.o mail.o main.o \
MYSQL_OBJ = $(MYSQL:.c=.o)
RDB_OBJ = $(RDB:.c=.o)
OBJS = actions.o base64.o botserv.o channels.o chanserv.o commands.o compat.o \
config.o datafiles.o encrypt.o events.o helpserv.o hostserv.o init.o ircd.o language.o list.o log.o mail.o main.o \
memory.o memoserv.o messages.o misc.o modules.o news.o nickserv.o operserv.o \
process.o send.o servers.o sessions.o slist.o sockutil.o timeout.o users.o module.o modulemanager.o configreader.o
process.o send.o servers.o sessions.o slist.o sockutil.o timeout.o users.o \
$(RDB_OBJ) $(MYSQL_OBJ)
SRCS = actions.c base64.c botserv.c channels.c chanserv.c commands.c compat.c \
config.c datafiles.c encrypt.c events.c helpserv.c hostserv.c init.c ircd.c language.c list.c log.c mail.c main.c \
memory.c memoserv.c messages.c misc.c modules.c news.c nickserv.c operserv.c \
process.c send.c servers.c sessions.c slist.c sockutil.c timeout.c users.c \
$(RDB) $(MYSQL)
INCLUDES = ../include/commands.h ../include/defs.h ../include/language.h \
../include/pseudo.h ../include/sysconf.h ../include/config.h \
../include/encrypt.h ../include/messages.h ../include/services.h \
../include/timeout.h ../include/datafiles.h ../include/extern.h \
../include/modules.h ../include/slist.h ../include/hashcomp.h
../include/modules.h ../include/slist.h
MAKEARGS = 'CFLAGS=${CFLAGS}' 'CC=${CC}' 'ANOPELIBS=${ANOPELIBS}' \
'LDFLAGS=${LDFLAGS}' 'INSTDIR=${INSTDIR}' 'INSTALL=${INSTALL}' \
'LDFLAGS=${LDFLAGS}' 'BINDEST=${BINDEST}' 'INSTALL=${INSTALL}' \
'INCLUDEDIR=${INCLUDEDIR}' 'RM=${RM}' 'CP=${CP}' \
'TOUCH=${TOUCH}' 'SHELL=${SHELL}' \
'RUNGROUP=${RUNGROUP}' \
'SHARED=${SHARED}' 'MODULEFLAGS=${MODULEFLAGS}' \
'MAKEBIN=${MAKEBIN}'
'TOUCH=${TOUCH}' 'SHELL=${SHELL}' 'DATDEST=${DATDEST}' \
'RUNGROUP=${RUNGROUP}' 'MODULE_PATH=${MODULE_PATH}' 'MYSQL=${MYSQL}'\
'RDB=${RDB}' 'SHARED=${SHARED}' 'MODULEFLAGS=${MODULEFLAGS}'
.c.o:
@$(MAKEBIN) $(CC) $(CFLAGS) -I../include/ -c $<
.cpp.o:
@$(MAKEBIN) $(CC) $(CFLAGS) -I../include/ -c $<
$(CC) $(CFLAGS) -I../include/ -c $<
all: services
@@ -29,26 +33,26 @@ distclean: spotless
distclean_modules: clean_modules spotless
services: $(OBJS) mod_version
@$(MAKEBIN) $(CC) $(CFLAGS) $(OBJS) $(ANOPELIBS) $(MLIBS) -o $@ $(LDFLAGS)
$(CC) $(CFLAGS) $(OBJS) $(ANOPELIBS) $(MLIBS) -o $@ $(LDFLAGS)
$(OBJS): Makefile
actions.o: actions.c $(INCLUDES)
base64.o: base64.c $(INCLUDES)
bots.o: bots.cpp $(INCLUDES)
botserv.o: botserv.c $(INCLUDES)
channels.o: channels.c $(INCLUDES)
chanserv.o: chanserv.c $(INCLUDES)
commands.o: commands.c $(INCLUDES)
base64.o: base64.c $(INCLUDES)
botserv.o: botserv.c $(INCLUDES)
channels.o: channels.c $(INCLUDES)
chanserv.o: chanserv.c $(INCLUDES)
commands.o: commands.c $(INCLUDES)
compat.o: compat.c $(INCLUDES)
config.o: config.c $(INCLUDES)
config.o: config.c $(INCLUDES)
datafiles.o: datafiles.c $(INCLUDES)
encrypt.o: encrypt.c $(INCLUDES)
encrypt.o: encrypt.c $(INCLUDES)
events.o: events.c $(INCLUDES)
init.o: init.c $(INCLUDES)
ircd.o: ircd.c $(INCLUDES)
helpserv.o: helpserv.c $(INCLUDES)
hostserv.o: hostserv.c $(INCLUDES)
language.o: language.c $(INCLUDES)
helpserv.o: helpserv.c $(INCLUDES)
hostserv.o: hostserv.c $(INCLUDES)
language.o: language.c $(INCLUDES)
list.o: list.c $(INCLUDES)
log.o: log.c $(INCLUDES)
mail.o: mail.c $(INCLUDES)
main.o: main.c $(INCLUDES)
@@ -56,8 +60,6 @@ memory.o: memory.c $(INCLUDES)
memoserv.o: memoserv.c $(INCLUDES)
messages.o: messages.c $(INCLUDES)
modules.o: modules.c $(INCLUDES)
module.o: module.cpp $(INCLUDES)
modulemanager.o: modulemanager.cpp $(INCLUDES)
misc.o: misc.c $(INCLUDES)
news.o: news.c $(INCLUDES)
nickserv.o: nickserv.c $(INCLUDES)
@@ -71,67 +73,66 @@ sockutil.o: sockutil.c $(INCLUDES)
timeout.o: timeout.c $(INCLUDES)
users.o: users.c $(INCLUDES)
vsnprintf.o: vsnprintf.c $(INCLUDES)
mysql.o: mysql.c $(INCLUDES)
rdb.o: rdb.c $(INCLUDES)
mod_version: mod_version.c $(INCLUDES)
@$(MAKEBIN) $(CC) $(CDEFS) $(CFLAGS) $(MODULEFLAGS) -I../include/ -c mod_version.c
$(CC) $(CDEFS) $(CFLAGS) $(MODULEFLAGS) -I../include/ -c mod_version.c
modules: DUMMY
@modules/configure modules
@${MAKE} -C modules ${MAKEARGS} all
(cd modules ; ./configure ; ${MAKE} ${MAKEARGS} all)
protocols: DUMMY
@protocol/configure protocol
@${MAKE} -C protocol ${MAKEARGS} all
(cd protocol ; ./configure ; ${MAKE} ${MAKEARGS} all)
core: DUMMY
@core/configure core
@${MAKE} -C core ${MAKEARGS} all
(cd core ; ./configure ; ${MAKE} ${MAKEARGS} all)
clean: clean_modules clean_protocols clean_core
rm -f *.o services a.out
clean_modules:
@touch modules/Makefile.inc # Horribly ugly...
@${MAKE} -C modules clean
(cd modules ; ${MAKE} clean)
clean_protocols:
@touch protocol/Makefile.inc
@${MAKE} -C protocol clean
(cd protocol ; ${MAKE} clean)
clean_core:
@touch core/Makefile.inc
@${MAKE} -C core clean
(cd core ; ${MAKE} clean)
spotless:
@${MAKE} -C modules distclean
@${MAKE} -C protocol distclean
@${MAKE} -C core distclean
(cd modules ; ${MAKE} distclean)
(cd protocol ; ${MAKE} distclean)
(cd core ; ${MAKE} distclean)
install: services
test -d ${INSTDIR} || mkdir ${INSTDIR}
test -d ${INSTDIR}/bin || mkdir ${INSTDIR}/bin
$(INSTALL) services $(INSTDIR)/bin/services
$(INSTALL) bin/anoperc $(INSTDIR)/bin/anoperc
test -d ${INSTDIR}/data || mkdir ${INSTDIR}/data
test -d ${BINDEST} || mkdir ${BINDEST}
$(INSTALL) services $(BINDEST)/services
$(INSTALL) bin/anoperc $(BINDEST)/anoperc
rm -f $(BINDEST)/listnicks $(BINDEST)/listchans
ln $(BINDEST)/services $(BINDEST)/listnicks
ln $(BINDEST)/services $(BINDEST)/listchans
(cd ../lang ; $(MAKE) install)
$(CP) ../data/* $(INSTDIR)/data
$(INSTALL) bin/mydbgen $(INSTDIR)/data/mydbgen
test -d $(INSTDIR)/data/backups || mkdir $(INSTDIR)/data/backups
test -d $(INSTDIR)/data/logs || mkdir $(INSTDIR)/data/logs
@if [ "$(INSTDIR)/data/modules" ] ; then \
test -d ${INSTDIR}/data/modules || mkdir ${INSTDIR}/data/modules ; \
test -d ${INSTDIR}/data/modules/runtime || mkdir ${INSTDIR}/data/modules/runtime ; \
$(CP) ../data/* $(DATDEST)
$(INSTALL) bin/mydbgen $(DATDEST)/mydbgen
test -d $(DATDEST)/backups || mkdir $(DATDEST)/backups
test -d $(DATDEST)/logs || mkdir $(DATDEST)/logs
@if [ "$(MODULE_PATH)" ] ; then \
test -d ${MODULE_PATH} || mkdir ${MODULE_PATH} ; \
test -d ${MODULE_PATH}/runtime || mkdir ${MODULE_PATH}/runtime ; \
(cd modules ; $(MAKE) install) ; \
(cd protocol ; ${MAKE} install) ; \
(cd core ; ${MAKE} install) ; \
fi
@if [ "$(RUNGROUP)" ] ; then \
echo chgrp -R $(RUNGROUP) $(INSTDIR)/data ; \
chgrp -R $(RUNGROUP) $(INSTDIR)/data ; \
echo chmod -R g+rw $(INSTDIR)/data ; \
chmod -R g+rw $(INSTDIR)/data ; \
echo find $(INSTDIR)/data -type d -exec chmod g+xs \'\{\}\' \\\; ; \
find $(INSTDIR)/data -type d -exec chmod g+xs '{}' \; ; \
echo chgrp -R $(RUNGROUP) $(DATDEST) ; \
chgrp -R $(RUNGROUP) $(DATDEST) ; \
echo chmod -R g+rw $(DATDEST) ; \
chmod -R g+rw $(DATDEST) ; \
echo find $(DATDEST) -type d -exec chmod g+xs \'\{\}\' \\\; ; \
find $(DATDEST) -type d -exec chmod g+xs '{}' \; ; \
fi
DUMMY:
+154 -149
View File
@@ -6,9 +6,9 @@
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
* $Id$
* Based on the original code of Services by Andy Church.
*
* $Id$
*
*/
@@ -24,20 +24,20 @@
*/
void bad_password(User * u)
{
time_t now = time(NULL);
time_t now = time(NULL);
if (!u || !BadPassLimit) {
return;
}
if (!u || !BadPassLimit) {
return;
}
if (BadPassTimeout > 0 && u->invalid_pw_time > 0
&& u->invalid_pw_time < now - BadPassTimeout)
u->invalid_pw_count = 0;
u->invalid_pw_count++;
u->invalid_pw_time = now;
if (u->invalid_pw_count >= BadPassLimit) {
kill_user(NULL, u->nick, "Too many invalid passwords");
}
if (BadPassTimeout > 0 && u->invalid_pw_time > 0
&& u->invalid_pw_time < now - BadPassTimeout)
u->invalid_pw_count = 0;
u->invalid_pw_count++;
u->invalid_pw_time = now;
if (u->invalid_pw_count >= BadPassLimit) {
kill_user(NULL, u->nick, "Too many invalid passwords");
}
}
/*************************************************************************/
@@ -49,27 +49,27 @@ void bad_password(User * u)
* @param reason for the kill
* @return void
*/
void kill_user(const char *source, const char *user, const char *reason)
void kill_user(char *source, char *user, char *reason)
{
char buf[BUFSIZE];
char buf[BUFSIZE];
if (!user || !*user) {
return;
}
if (!source || !*source) {
source = ServerName;
}
if (!reason) {
reason = "";
}
if (!user || !*user) {
return;
}
if (!source || !*source) {
source = ServerName;
}
if (!reason) {
reason = "";
}
snprintf(buf, sizeof(buf), "%s (%s)", source, reason);
snprintf(buf, sizeof(buf), "%s (%s)", source, reason);
ircdproto->SendSVSKill(source, user, buf);
anope_cmd_svskill(source, user, buf);
if (!ircd->quitonkill && finduser(user)) {
do_kill(user, buf);
}
if (!ircd->quitonkill && finduser(user)) {
do_kill(user, buf);
}
}
/*************************************************************************/
@@ -82,42 +82,42 @@ void kill_user(const char *source, const char *user, const char *reason)
*/
void sqline(char *mask, char *reason)
{
int i;
Channel *c, *next;
const char *av[3];
struct c_userlist *cu, *cunext;
int i;
Channel *c, *next;
char *av[3];
struct c_userlist *cu, *cunext;
if (ircd->chansqline) {
if (*mask == '#') {
ircdproto->SendSQLine(mask, reason);
if (ircd->chansqline) {
if (*mask == '#') {
anope_cmd_sqline(mask, reason);
for (i = 0; i < 1024; i++) {
for (c = chanlist[i]; c; c = next) {
next = c->next;
for (i = 0; i < 1024; i++) {
for (c = chanlist[i]; c; c = next) {
next = c->next;
if (!match_wild_nocase(mask, c->name)) {
continue;
}
for (cu = c->users; cu; cu = cunext) {
cunext = cu->next;
if (is_oper(cu->user)) {
continue;
}
av[0] = c->name;
av[1] = cu->user->nick;
av[2] = reason;
ircdproto->SendKick(findbot(s_OperServ), av[0], av[1],
"Q-Lined: %s", av[2]);
do_kick(s_ChanServ, 3, av);
}
}
}
} else {
ircdproto->SendSQLine(mask, reason);
}
} else {
ircdproto->SendSQLine(mask, reason);
}
if (!match_wild_nocase(mask, c->name)) {
continue;
}
for (cu = c->users; cu; cu = cunext) {
cunext = cu->next;
if (is_oper(cu->user)) {
continue;
}
av[0] = c->name;
av[1] = cu->user->nick;
av[2] = reason;
anope_cmd_kick(s_OperServ, av[0], av[1],
"Q-Lined: %s", av[2]);
do_kick(s_ChanServ, 3, av);
}
}
}
} else {
anope_cmd_sqline(mask, reason);
}
} else {
anope_cmd_sqline(mask, reason);
}
}
/*************************************************************************/
@@ -130,72 +130,77 @@ void sqline(char *mask, char *reason)
*/
void common_unban(ChannelInfo * ci, char *nick)
{
const char *av[4];
char *host = NULL;
char buf[BUFSIZE];
int ac;
uint32 ip = 0;
User *u;
Entry *ban, *next;
char *av[4];
char *host = NULL;
char buf[BUFSIZE];
int ac;
uint32 ip = 0;
User *u;
Entry *ban, *next;
if (!ci || !ci->c || !nick) {
return;
}
if (!ci || !ci->c || !nick) {
return;
}
if (!(u = finduser(nick))) {
return;
}
if (!(u = finduser(nick))) {
return;
}
if (!ci->c->bans || (ci->c->bans->count == 0))
return;
if (!ci->c->bans || (ci->c->bans->count == 0))
return;
if (u->hostip == NULL) {
host = host_resolve(u->host);
/* we store the just resolved hostname so we don't
* need to do this again */
if (host) {
u->hostip = sstrdup(host);
}
} else {
host = sstrdup(u->hostip);
}
/* Convert the host to an IP.. */
if (host)
ip = str_is_ip(host);
if (u->hostip == NULL) {
host = host_resolve(u->host);
/* we store the just resolved hostname so we don't
* need to do this again */
if (host) {
u->hostip = sstrdup(host);
}
} else {
host = sstrdup(u->hostip);
}
/* Convert the host to an IP.. */
if (host)
ip = str_is_ip(host);
if (ircd->svsmode_unban) {
ircdproto->SendBanDel(ci->name, nick);
} else {
if (ircdcap->tsmode) {
snprintf(buf, BUFSIZE - 1, "%ld", static_cast<long>(time(NULL)));
av[0] = ci->name;
av[1] = buf;
av[2] = "-b";
ac = 4;
} else {
av[0] = ci->name;
av[1] = "-b";
ac = 3;
}
if (ircd->svsmode_unban) {
anope_cmd_unban(ci->name, nick);
} else {
if (ircdcap->tsmode) {
snprintf(buf, BUFSIZE - 1, "%ld", (long int) time(NULL));
av[0] = ci->name;
av[1] = buf;
av[2] = sstrdup("-b");
ac = 4;
} else {
av[0] = ci->name;
av[1] = sstrdup("-b");
ac = 3;
}
for (ban = ci->c->bans->entries; ban; ban = next) {
next = ban->next;
if (entry_match(ban, u->nick, u->username, u->host, ip) ||
entry_match(ban, u->nick, u->username, u->vhost, ip)) {
ircdproto->SendMode(whosends(ci), ci->name, "-b %s", ban->mask);
if (ircdcap->tsmode)
av[3] = ban->mask;
else
av[2] = ban->mask;
for (ban = ci->c->bans->entries; ban; ban = next) {
next = ban->next;
if (entry_match(ban, u->nick, u->username, u->host, ip) ||
entry_match(ban, u->nick, u->username, u->vhost, ip)) {
anope_cmd_mode(whosends(ci), ci->name, "-b %s", ban->mask);
if (ircdcap->tsmode)
av[3] = ban->mask;
else
av[2] = ban->mask;
do_cmode(whosends(ci)->nick, ac, av);
}
}
}
/* host_resolve() sstrdup us this info so we gotta free it */
if (host) {
delete [] host;
}
do_cmode(whosends(ci), ac, av);
}
}
if (ircdcap->tsmode)
free(av[2]);
else
free(av[1]);
}
/* host_resolve() sstrdup us this info so we gotta free it */
if (host) {
free(host);
}
}
/*************************************************************************/
@@ -207,19 +212,19 @@ void common_unban(ChannelInfo * ci, char *nick)
* @param arg the arguments for the user modes
* @return void
*/
void common_svsmode(User * u, const char *modes, const char *arg)
void common_svsmode(User * u, char *modes, char *arg)
{
int ac = 1;
const char *av[2];
int ac = 1;
char *av[2];
av[0] = modes;
if (arg) {
av[1] = arg;
ac++;
}
av[0] = modes;
if (arg) {
av[1] = arg;
ac++;
}
ircdproto->SendSVSMode(u, ac, av);
ircdproto->ProcessUsermodes(u, ac, av);
anope_cmd_svsmode(u, ac, av);
anope_set_umode(u, ac, av);
}
/*************************************************************************/
@@ -232,15 +237,15 @@ void common_svsmode(User * u, const char *modes, const char *arg)
*/
char *common_get_vhost(User * u)
{
if (!u)
return NULL;
if (!u)
return NULL;
if (ircd->vhostmode && (u->mode & ircd->vhostmode))
return u->vhost;
else if (ircd->vhost && u->vhost)
return u->vhost;
else
return u->host;
if (ircd->vhostmode && (u->mode & ircd->vhostmode))
return u->vhost;
else if (ircd->vhost && u->vhost)
return u->vhost;
else
return u->host;
}
/*************************************************************************/
@@ -253,13 +258,13 @@ char *common_get_vhost(User * u)
*/
char *common_get_vident(User * u)
{
if (!u)
return NULL;
if (!u)
return NULL;
if (ircd->vhostmode && (u->mode & ircd->vhostmode))
return u->vident;
else if (ircd->vident && u->vident)
return u->vident;
else
return u->username;
if (ircd->vhostmode && (u->mode & ircd->vhostmode))
return u->vident;
else if (ircd->vident && u->vident)
return u->vident;
else
return u->username;
}
+278 -278
View File
@@ -6,8 +6,8 @@
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
* Based on the original code of Services by Andy Church.
*
*
*/
@@ -20,24 +20,24 @@
static char *int_to_base64(long);
static long base64_to_int(char *);
const char* base64enc(long i)
char *base64enc(long i)
{
if (i < 0)
return ("0");
return int_to_base64(i);
if (i < 0)
return ("0");
return int_to_base64(i);
}
long base64dec(char* b64)
long base64dec(char *b64)
{
if (b64)
return base64_to_int(b64);
else
return 0;
if (b64)
return base64_to_int(b64);
else
return 0;
}
static const char Base64[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
static const char Pad64 = '=';
/* (From RFC1521 and draft-ietf-dnssec-secext-03.txt)
@@ -59,26 +59,26 @@ static const char Pad64 = '=';
characters. The character referenced by the index is placed in the
output string.
Table 1: The Base64 Alphabet
Table 1: The Base64 Alphabet
Value Encoding Value Encoding Value Encoding Value Encoding
0 A 17 R 34 i 51 z
1 B 18 S 35 j 52 0
2 C 19 T 36 k 53 1
3 D 20 U 37 l 54 2
4 E 21 V 38 m 55 3
5 F 22 W 39 n 56 4
6 G 23 X 40 o 57 5
7 H 24 Y 41 p 58 6
8 I 25 Z 42 q 59 7
9 J 26 a 43 r 60 8
10 K 27 b 44 s 61 9
11 L 28 c 45 t 62 +
12 M 29 d 46 u 63 /
13 N 30 e 47 v
14 O 31 f 48 w (pad) =
15 P 32 g 49 x
16 Q 33 h 50 y
Value Encoding Value Encoding Value Encoding Value Encoding
0 A 17 R 34 i 51 z
1 B 18 S 35 j 52 0
2 C 19 T 36 k 53 1
3 D 20 U 37 l 54 2
4 E 21 V 38 m 55 3
5 F 22 W 39 n 56 4
6 G 23 X 40 o 57 5
7 H 24 Y 41 p 58 6
8 I 25 Z 42 q 59 7
9 J 26 a 43 r 60 8
10 K 27 b 44 s 61 9
11 L 28 c 45 t 62 +
12 M 29 d 46 u 63 /
13 N 30 e 47 v
14 O 31 f 48 w (pad) =
15 P 32 g 49 x
16 Q 33 h 50 y
Special processing is performed if fewer than 24 bits are available
at the end of the data being encoded. A full encoding quantum is
@@ -88,72 +88,72 @@ static const char Pad64 = '=';
end of the data is performed using the '=' character.
Since all base64 input is an integral number of octets, only the
-------------------------------------------------
-------------------------------------------------
following cases can arise:
(1) the final quantum of encoding input is an integral
multiple of 24 bits; here, the final unit of encoded
(1) the final quantum of encoding input is an integral
multiple of 24 bits; here, the final unit of encoded
output will be an integral multiple of 4 characters
with no "=" padding,
(2) the final quantum of encoding input is exactly 8 bits;
here, the final unit of encoded output will be two
(2) the final quantum of encoding input is exactly 8 bits;
here, the final unit of encoded output will be two
characters followed by two "=" padding characters, or
(3) the final quantum of encoding input is exactly 16 bits;
here, the final unit of encoded output will be three
(3) the final quantum of encoding input is exactly 16 bits;
here, the final unit of encoded output will be three
characters followed by one "=" padding character.
*/
int b64_encode(char *src, size_t srclength, char *target, size_t targsize)
{
size_t datalength = 0;
unsigned char input[3];
unsigned char output[4];
size_t i;
size_t datalength = 0;
unsigned char input[3];
unsigned char output[4];
size_t i;
while (2 < srclength) {
input[0] = *src++;
input[1] = *src++;
input[2] = *src++;
srclength -= 3;
while (2 < srclength) {
input[0] = *src++;
input[1] = *src++;
input[2] = *src++;
srclength -= 3;
output[0] = input[0] >> 2;
output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);
output[3] = input[2] & 0x3f;
output[0] = input[0] >> 2;
output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);
output[3] = input[2] & 0x3f;
if (datalength + 4 > targsize)
return (-1);
target[datalength++] = Base64[output[0]];
target[datalength++] = Base64[output[1]];
target[datalength++] = Base64[output[2]];
target[datalength++] = Base64[output[3]];
}
if (datalength + 4 > targsize)
return (-1);
target[datalength++] = Base64[output[0]];
target[datalength++] = Base64[output[1]];
target[datalength++] = Base64[output[2]];
target[datalength++] = Base64[output[3]];
}
/* Now we worry about padding. */
if (0 != srclength) {
/* Get what's left. */
input[0] = input[1] = input[2] = '\0';
for (i = 0; i < srclength; i++)
input[i] = *src++;
/* Now we worry about padding. */
if (0 != srclength) {
/* Get what's left. */
input[0] = input[1] = input[2] = '\0';
for (i = 0; i < srclength; i++)
input[i] = *src++;
output[0] = input[0] >> 2;
output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);
output[0] = input[0] >> 2;
output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);
if (datalength + 4 > targsize)
return (-1);
target[datalength++] = Base64[output[0]];
target[datalength++] = Base64[output[1]];
if (srclength == 1)
target[datalength++] = Pad64;
else
target[datalength++] = Base64[output[2]];
target[datalength++] = Pad64;
}
if (datalength >= targsize)
return (-1);
target[datalength] = '\0'; /* Returned value doesn't count \0. */
return (datalength);
if (datalength + 4 > targsize)
return (-1);
target[datalength++] = Base64[output[0]];
target[datalength++] = Base64[output[1]];
if (srclength == 1)
target[datalength++] = Pad64;
else
target[datalength++] = Base64[output[2]];
target[datalength++] = Pad64;
}
if (datalength >= targsize)
return (-1);
target[datalength] = '\0'; /* Returned value doesn't count \0. */
return (datalength);
}
/* skips all whitespace anywhere.
@@ -162,249 +162,249 @@ int b64_encode(char *src, size_t srclength, char *target, size_t targsize)
it returns the number of data bytes stored at the target, or -1 on error.
*/
int b64_decode(const char *src, char *target, size_t targsize)
int b64_decode(char *src, char *target, size_t targsize)
{
int tarindex, state, ch;
char *pos;
int tarindex, state, ch;
char *pos;
state = 0;
tarindex = 0;
state = 0;
tarindex = 0;
while ((ch = *src++) != '\0') {
if (isspace(ch)) /* Skip whitespace anywhere. */
continue;
while ((ch = *src++) != '\0') {
if (isspace(ch)) /* Skip whitespace anywhere. */
continue;
if (ch == Pad64)
break;
if (ch == Pad64)
break;
pos = const_cast<char *>(strchr(Base64, ch));
if (pos == 0) /* A non-base64 character. */
return (-1);
pos = strchr(Base64, ch);
if (pos == 0) /* A non-base64 character. */
return (-1);
switch (state) {
case 0:
if (target) {
if (static_cast<size_t>(tarindex) >= targsize)
return (-1);
target[tarindex] = (pos - Base64) << 2;
}
state = 1;
break;
case 1:
if (target) {
if (static_cast<size_t>(tarindex) + 1 >= targsize)
return (-1);
target[tarindex] |= (pos - Base64) >> 4;
target[tarindex + 1] = ((pos - Base64) & 0x0f)
<< 4;
}
tarindex++;
state = 2;
break;
case 2:
if (target) {
if (static_cast<size_t>(tarindex) + 1 >= targsize)
return (-1);
target[tarindex] |= (pos - Base64) >> 2;
target[tarindex + 1] = ((pos - Base64) & 0x03)
<< 6;
}
tarindex++;
state = 3;
break;
case 3:
if (target) {
if (static_cast<size_t>(tarindex) >= targsize)
return (-1);
target[tarindex] |= (pos - Base64);
}
tarindex++;
state = 0;
break;
default:
abort();
}
}
switch (state) {
case 0:
if (target) {
if ((size_t) tarindex >= targsize)
return (-1);
target[tarindex] = (pos - Base64) << 2;
}
state = 1;
break;
case 1:
if (target) {
if ((size_t) tarindex + 1 >= targsize)
return (-1);
target[tarindex] |= (pos - Base64) >> 4;
target[tarindex + 1] = ((pos - Base64) & 0x0f)
<< 4;
}
tarindex++;
state = 2;
break;
case 2:
if (target) {
if ((size_t) tarindex + 1 >= targsize)
return (-1);
target[tarindex] |= (pos - Base64) >> 2;
target[tarindex + 1] = ((pos - Base64) & 0x03)
<< 6;
}
tarindex++;
state = 3;
break;
case 3:
if (target) {
if ((size_t) tarindex >= targsize)
return (-1);
target[tarindex] |= (pos - Base64);
}
tarindex++;
state = 0;
break;
default:
abort();
}
}
/*
* We are done decoding Base-64 chars. Let's see if we ended
* on a byte boundary, and/or with erroneous trailing characters.
*/
/*
* We are done decoding Base-64 chars. Let's see if we ended
* on a byte boundary, and/or with erroneous trailing characters.
*/
if (ch == Pad64) { /* We got a pad char. */
ch = *src++; /* Skip it, get next. */
switch (state) {
case 0: /* Invalid = in first position */
case 1: /* Invalid = in second position */
return (-1);
if (ch == Pad64) { /* We got a pad char. */
ch = *src++; /* Skip it, get next. */
switch (state) {
case 0: /* Invalid = in first position */
case 1: /* Invalid = in second position */
return (-1);
case 2: /* Valid, means one byte of info */
/* Skip any number of spaces. */
for (; ch != '\0'; ch = *src++)
if (!isspace(ch))
break;
/* Make sure there is another trailing = sign. */
if (ch != Pad64)
return (-1);
ch = *src++; /* Skip the = */
/* Fall through to "single trailing =" case. */
/* FALLTHROUGH */
case 2: /* Valid, means one byte of info */
/* Skip any number of spaces. */
for ((void) NULL; ch != '\0'; ch = *src++)
if (!isspace(ch))
break;
/* Make sure there is another trailing = sign. */
if (ch != Pad64)
return (-1);
ch = *src++; /* Skip the = */
/* Fall through to "single trailing =" case. */
/* FALLTHROUGH */
case 3: /* Valid, means two bytes of info */
/*
* We know this char is an =. Is there anything but
* whitespace after it?
*/
for (; ch != '\0'; ch = *src++)
if (!isspace(ch))
return (-1);
case 3: /* Valid, means two bytes of info */
/*
* We know this char is an =. Is there anything but
* whitespace after it?
*/
for ((void) NULL; ch != '\0'; ch = *src++)
if (!isspace(ch))
return (-1);
/*
* Now make sure for cases 2 and 3 that the "extra"
* bits that slopped past the last full byte were
* zeros. If we don't check them, they become a
* subliminal channel.
*/
if (target && target[tarindex] != 0)
return (-1);
}
} else {
/*
* We ended by seeing the end of the string. Make sure we
* have no partial bytes lying around.
*/
if (state != 0)
return (-1);
}
/*
* Now make sure for cases 2 and 3 that the "extra"
* bits that slopped past the last full byte were
* zeros. If we don't check them, they become a
* subliminal channel.
*/
if (target && target[tarindex] != 0)
return (-1);
}
} else {
/*
* We ended by seeing the end of the string. Make sure we
* have no partial bytes lying around.
*/
if (state != 0)
return (-1);
}
return (tarindex);
return (tarindex);
}
const char* encode_ip(unsigned char *ip)
char *encode_ip(unsigned char *ip)
{
static char buf[25];
unsigned char *cp;
struct in_addr ia; /* For IPv4 */
char *s_ip; /* Signed ip string */
static char buf[25];
unsigned char *cp;
struct in_addr ia; /* For IPv4 */
char *s_ip; /* Signed ip string */
if (!ip)
return "*";
if (!ip)
return "*";
if (strchr(reinterpret_cast<char *>(ip), ':')) {
return NULL;
} else {
s_ip = str_signed(ip);
ia.s_addr = inet_addr(s_ip);
cp = reinterpret_cast<unsigned char *>(ia.s_addr);
b64_encode(reinterpret_cast<char *>(&cp), sizeof(struct in_addr), buf, 25);
}
return buf;
if (strchr((char *) ip, ':')) {
return NULL;
} else {
s_ip = str_signed(ip);
ia.s_addr = inet_addr(s_ip);
cp = (unsigned char *) ia.s_addr;
b64_encode((char *) &cp, sizeof(struct in_addr), buf, 25);
}
return buf;
}
int decode_ip(const char *buf)
int decode_ip(char *buf)
{
int len = strlen(buf);
char targ[25];
struct in_addr ia;
int len = strlen(buf);
char targ[25];
struct in_addr ia;
b64_decode(buf, targ, 25);
ia = *reinterpret_cast<struct in_addr *>(targ);
if (len == 24) { /* IPv6 */
return 0;
} else if (len == 8) /* IPv4 */
return ia.s_addr;
else /* Error?? */
return 0;
b64_decode(buf, targ, 25);
ia = *(struct in_addr *) targ;
if (len == 24) { /* IPv6 */
return 0;
} else if (len == 8) /* IPv4 */
return ia.s_addr;
else /* Error?? */
return 0;
}
/* ':' and '#' and '&' and '+' and '@' must never be in this table. */
/* these tables must NEVER CHANGE! >) */
char int6_to_base64_map[] = {
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D',
'E', 'F',
'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T',
'U', 'V',
'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j',
'k', 'l',
'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
'{', '}'
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D',
'E', 'F',
'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T',
'U', 'V',
'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j',
'k', 'l',
'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
'{', '}'
};
char base64_to_int6_map[] = {
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1,
-1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1,
-1, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, -1, 63, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1,
-1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1,
-1, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, -1, 63, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
};
static char *int_to_base64(long val)
{
/* 32/6 == max 6 bytes for representation,
* +1 for the null, +1 for byte boundaries
*/
static char base64buf[8];
long i = 7;
/* 32/6 == max 6 bytes for representation,
* +1 for the null, +1 for byte boundaries
*/
static char base64buf[8];
long i = 7;
base64buf[i] = '\0';
base64buf[i] = '\0';
/* Temporary debugging code.. remove before 2038 ;p.
* This might happen in case of 64bit longs (opteron/ia64),
* if the value is then too large it can easily lead to
* a buffer underflow and thus to a crash. -- Syzop
*/
if (val > 2147483647L) {
abort();
}
/* Temporary debugging code.. remove before 2038 ;p.
* This might happen in case of 64bit longs (opteron/ia64),
* if the value is then too large it can easily lead to
* a buffer underflow and thus to a crash. -- Syzop
*/
if (val > 2147483647L) {
abort();
}
do {
base64buf[--i] = int6_to_base64_map[val & 63];
}
while (val >>= 6);
do {
base64buf[--i] = int6_to_base64_map[val & 63];
}
while (val >>= 6);
return base64buf + i;
return base64buf + i;
}
static long base64_to_int(char *b64)
{
int v = base64_to_int6_map[static_cast<unsigned char>(*b64++)];
int v = base64_to_int6_map[(unsigned char) *b64++];
if (!b64)
return 0;
if (!b64)
return 0;
while (*b64) {
v <<= 6;
v += base64_to_int6_map[static_cast<unsigned char>(*b64++)];
}
while (*b64) {
v <<= 6;
v += base64_to_int6_map[(unsigned char) *b64++];
}
return v;
return v;
}
long base64dects(const char *ts)
long base64dects(char *ts)
{
char *token;
long value;
char *token;
long value;
if (!ts) {
return 0;
}
token = myStrGetToken(ts, '!', 1);
if (!ts) {
return 0;
}
token = myStrGetToken(ts, '!', 1);
if (!token) {
return strtoul(ts, NULL, 10);
}
value = base64dec(token);
delete [] token;
return value;
if (!token) {
return strtoul(ts, NULL, 10);
}
value = base64dec(token);
Anope_Free(token);
return value;
}
-12
View File
@@ -1,12 +0,0 @@
# If not on Windows, generate anoperc and install it along with mydbgen
if(NOT WIN32)
configure_file(${Anope_SOURCE_DIR}/src/bin/anoperc.in ${Anope_BINARY_DIR}/src/bin/anoperc)
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/anoperc
DESTINATION bin
)
# Add anoperc to list of files for CPack to ignore
add_to_cpack_ignored_files("anoperc$")
install(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/mydbgen
DESTINATION data
)
endif(NOT WIN32)
+6 -6
View File
@@ -2,7 +2,7 @@
#
# Configuration script for Services
#
# (C) 2003-2008 Anope Team
# (C) 2003-2009 Anope Team
# Contact us at team@anope.org
#
# Please read COPYING and README for further details.
@@ -15,10 +15,10 @@
ANOPEPID="@INSTDIR@/data/services.pid"
ANOPROG="@INSTDIR@/bin/services"
LOG="@INSTDIR@/data/logs/"
ARCVERSION="1.3"
ANOPEPID="@DATDEST@/services.pid"
ANOPROG="@BINDEST@/services"
LOG="@DATDEST@/logs/"
ARCVERSION="1.2"
isAnopeRunning () {
if [ ! -f $ANOPEPID ] ; then
@@ -134,7 +134,7 @@ elif [ "$1" = "help" ] ; then
echo "folder or make use of our extensive online support at"
echo "http://www.anope.org/"
fi
else
echo "Anope Remote Control ($ARCVERSION)"
echo "Usage: $0 [start|stop|status|restart|rehash|version|help]"
-119
View File
@@ -1,119 +0,0 @@
/*
* Copyright (C) 2008-2009 Robin Burchell <w00t@inspircd.org>
* Copyright (C) 2008-2009 Anope Team <team@anope.org>
*
* Please read COPYING and README for further details.
*
*
* $Id$
*
*/
#include "services.h"
BotInfo::BotInfo(const char *nnick)
{
this->nick = sstrdup(nnick);
this->lastmsg = time(NULL);
this->uid = ts6_uid_retrieve(); // XXX is this safe? has ts6 been setup yet?
insert_bot(this); // XXX, this is ugly, but it needs to stay until hashing of bots is redone in STL.
nbots++;
this->cmdTable = NULL;
}
BotInfo::BotInfo(const char *nnick, const char *nuser, const char *nhost, const char *nreal)
{
this->nick = sstrdup(nnick);
this->user = sstrdup(nuser);
this->host = sstrdup(nhost);
this->real = sstrdup(nreal);
this->lastmsg = time(NULL);
this->uid = ts6_uid_retrieve(); // XXX is this safe? has ts6 been setup yet?
insert_bot(this); // XXX, this is ugly, but it needs to stay until hashing of bots is redone in STL.
nbots++;
this->cmdTable = NULL;
}
BotInfo::~BotInfo()
{
int i;
ChannelInfo *ci;
for (i = 0; i < 256; i++)
for (ci = chanlists[i]; ci; ci = ci->next)
if (ci->bi == this)
ci->bi = NULL;
if (this->next)
this->next->prev = this->prev;
if (this->prev)
this->prev->next = this->next;
else
botlists[tolower(*this->nick)] = this->next;
nbots--;
delete [] this->nick;
delete [] this->user;
delete [] this->host;
delete [] this->real;
}
void BotInfo::ChangeNick(const char *newnick)
{
if (this->next)
this->next->prev = this->prev;
if (this->prev)
this->prev->next = this->next;
else
botlists[tolower(*this->nick)] = this->next;
if (this->nick)
delete [] this->nick;
this->nick = sstrdup(newnick);
insert_bot(this);
}
void BotInfo::RejoinAll()
{
int i;
ChannelInfo *ci;
for (i = 0; i < 256; i++)
for (ci = chanlists[i]; ci; ci = ci->next)
if (ci->bi == this && ci->c && (ci->c->usercount >= BSMinUsers))
bot_join(ci);
}
void BotInfo::Assign(User *u, ChannelInfo *ci)
{
if (ci->bi)
{
if (u)
ci->bi->UnAssign(u, ci);
else
ci->bi->UnAssign(NULL, ci);
}
ci->bi = this;
this->chancount++;
if (ci->c && ci->c->usercount >= BSMinUsers)
bot_join(ci);
send_event(EVENT_BOT_ASSIGN, 2, ci->name, this->nick);
}
void BotInfo::UnAssign(User *u, ChannelInfo *ci)
{
send_event(EVENT_BOT_UNASSIGN, 2, ci->name, ci->bi->nick);
if (u && ci->c && ci->c->usercount >= BSMinUsers)
ircdproto->SendPart(ci->bi, ci->name, "UNASSIGN from %s", u->nick);
ci->bi->chancount--;
ci->bi = NULL;
}
+850 -745
View File
File diff suppressed because it is too large Load Diff
+1668 -1630
View File
File diff suppressed because it is too large Load Diff
+2060 -1625
View File
File diff suppressed because it is too large Load Diff
+199 -117
View File
@@ -6,9 +6,9 @@
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
* $Id$
* Based on the original code of Services by Andy Church.
*
* $Id$
*
*/
@@ -27,14 +27,31 @@
*/
Command *lookup_cmd(Command * list, char *cmd)
{
Command *c;
Command *c;
for (c = list; c->name; c++) {
if (stricmp(c->name, cmd) == 0) {
return c;
}
}
return NULL;
for (c = list; c->name; c++) {
if (stricmp(c->name, cmd) == 0) {
return c;
}
}
return NULL;
}
/*************************************************************************/
/**
* Run the routine for the given command, if it exists and the user has
* privilege to do so; if not, print an appropriate error message.
* @param services Services Client
* @param u User Struct
* @param list Command struct
* @param cmd Command
* @return void
*/
void run_cmd(char *service, User * u, Command * list, char *cmd)
{
Command *c = lookup_cmd(list, cmd);
do_run_cmd(service, u, c, cmd);
}
/*************************************************************************/
@@ -49,39 +66,62 @@ Command *lookup_cmd(Command * list, char *cmd)
* @return void
*/
void mod_run_cmd(char *service, User * u, CommandHash * cmdTable[],
const char *cmd)
const char *cmd)
{
Command *c = findCommand(cmdTable, cmd);
int retVal = 0;
Command *current;
Command *c = findCommand(cmdTable, cmd);
do_run_cmd(service, u, c, cmd);
}
if (c && c->routine) {
if ((checkDefCon(DEFCON_OPER_ONLY)
|| checkDefCon(DEFCON_SILENT_OPER_ONLY)) && !is_oper(u)) {
if (!checkDefCon(DEFCON_SILENT_OPER_ONLY)) {
notice_lang(service, u, OPER_DEFCON_DENIED);
}
} else {
if ((c->has_priv == NULL) || c->has_priv(u)) {
retVal = c->routine(u);
if (retVal == MOD_CONT) {
current = c->next;
while (current && retVal == MOD_CONT) {
retVal = current->routine(u);
current = current->next;
}
}
} else {
notice_lang(service, u, ACCESS_DENIED);
alog("Access denied for %s with service %s and command %s",
u->nick, service, cmd);
}
}
} else {
if ((!checkDefCon(DEFCON_SILENT_OPER_ONLY)) || is_oper(u)) {
notice_lang(service, u, UNKNOWN_COMMAND_HELP, cmd, service);
}
}
/*************************************************************************/
/**
* Run the given command
* @param services Services Client
* @param u User Struct
* @param c Command Struct
* @param cmd Command
* @return void
*/
void do_run_cmd(char *service, User * u, Command * c, const char *cmd)
{
int retVal = 0;
Command *current;
if (c && c->routine) {
if ((checkDefCon(DEFCON_OPER_ONLY)
|| checkDefCon(DEFCON_SILENT_OPER_ONLY)) && !is_oper(u)) {
if (!checkDefCon(DEFCON_SILENT_OPER_ONLY)) {
notice_lang(service, u, OPER_DEFCON_DENIED);
}
} else {
mod_current_module_name = c->mod_name;
mod_current_module = NULL;
if ((c->has_priv == NULL) || c->has_priv(u)) {
retVal = c->routine(u);
mod_current_module_name = NULL;
if (retVal == MOD_CONT) {
current = c->next;
while (current && retVal == MOD_CONT) {
mod_current_module_name = current->mod_name;
mod_current_module = NULL;
retVal = current->routine(u);
mod_current_module_name = NULL;
current = current->next;
}
}
} else {
notice_lang(service, u, ACCESS_DENIED);
alog("Access denied for %s with service %s and command %s",
u->nick, service, cmd);
}
mod_current_module_name = NULL;
}
} else {
if ((!checkDefCon(DEFCON_SILENT_OPER_ONLY)) || is_oper(u)) {
notice_lang(service, u, UNKNOWN_COMMAND_HELP, cmd, service);
}
}
}
/*************************************************************************/
@@ -95,24 +135,126 @@ void mod_run_cmd(char *service, User * u, CommandHash * cmdTable[],
*/
void do_help_limited(char *service, User * u, Command * c)
{
if (c->has_priv == is_services_oper)
notice_lang(service, u, HELP_LIMIT_SERV_OPER);
else if (c->has_priv == is_services_admin)
notice_lang(service, u, HELP_LIMIT_SERV_ADMIN);
else if (c->has_priv == is_services_root)
notice_lang(service, u, HELP_LIMIT_SERV_ROOT);
else if (c->has_priv == is_oper)
notice_lang(service, u, HELP_LIMIT_IRC_OPER);
else if (c->has_priv == is_host_setter)
notice_lang(service, u, HELP_LIMIT_HOST_SETTER);
else if (c->has_priv == is_host_remover)
notice_lang(service, u, HELP_LIMIT_HOST_REMOVER);
if (c->has_priv == is_services_oper)
notice_lang(service, u, HELP_LIMIT_SERV_OPER);
else if (c->has_priv == is_services_admin)
notice_lang(service, u, HELP_LIMIT_SERV_ADMIN);
else if (c->has_priv == is_services_root)
notice_lang(service, u, HELP_LIMIT_SERV_ROOT);
else if (c->has_priv == is_oper)
notice_lang(service, u, HELP_LIMIT_IRC_OPER);
else if (c->has_priv == is_host_setter)
notice_lang(service, u, HELP_LIMIT_HOST_SETTER);
else if (c->has_priv == is_host_remover)
notice_lang(service, u, HELP_LIMIT_HOST_REMOVER);
}
/*************************************************************************/
/**
* Prints the help message for a given command.
* Print a help message for the given command.
* @param services Services Client
* @param u User Struct
* @param c Command Struct
* @param cmd Command
* @return void
*/
void do_help_cmd(char *service, User * u, Command * c, const char *cmd)
{
Command *current;
int has_had_help = 0;
int cont = MOD_CONT;
const char *p1 = NULL, *p2 = NULL, *p3 = NULL, *p4 = NULL;
Module *calling_module = mod_current_module;
char *calling_module_name = mod_current_module_name;
for (current = c; (current) && (cont == MOD_CONT);
current = current->next) {
mod_current_module_name = current->mod_name;
if (mod_current_module_name)
mod_current_module = findModule(mod_current_module_name);
else
mod_current_module = NULL;
p1 = current->help_param1;
p2 = current->help_param2;
p3 = current->help_param3;
p4 = current->help_param4;
if (current->helpmsg_all >= 0) {
notice_help(service, u, current->helpmsg_all, p1, p2, p3, p4);
has_had_help = 1;
} else if (current->all_help) {
cont = current->all_help(u);
has_had_help = 1;
}
if (is_services_root(u)) {
if (current->helpmsg_root >= 0) {
notice_help(service, u, current->helpmsg_root, p1, p2, p3,
p4);
has_had_help = 1;
} else if (current->root_help) {
cont = current->root_help(u);
has_had_help = 1;
}
} else if (is_services_admin(u)) {
if (current->helpmsg_admin >= 0) {
notice_help(service, u, current->helpmsg_admin, p1, p2, p3,
p4);
has_had_help = 1;
} else if (current->admin_help) {
cont = current->admin_help(u);
has_had_help = 1;
}
} else if (is_services_oper(u)) {
if (current->helpmsg_oper >= 0) {
notice_help(service, u, current->helpmsg_oper, p1, p2, p3,
p4);
has_had_help = 1;
} else if (current->oper_help) {
cont = current->oper_help(u);
has_had_help = 1;
}
} else {
if (current->helpmsg_reg >= 0) {
notice_help(service, u, current->helpmsg_reg, p1, p2, p3,
p4);
has_had_help = 1;
} else if (current->regular_help) {
cont = current->regular_help(u);
has_had_help = 1;
}
}
}
if (has_had_help == 0) {
notice_lang(service, u, NO_HELP_AVAILABLE, cmd);
} else {
do_help_limited(service, u, c);
}
mod_current_module = calling_module;
mod_current_module_name = calling_module_name;
}
/*************************************************************************/
/**
* Find the Help Command
* @param services Services Client
* @param u User Struct
* @param c Command Struct
* @param cmd Command
* @return void
*/
void help_cmd(char *service, User * u, Command * list, char *cmd)
{
Command *c = lookup_cmd(list, cmd);
do_help_cmd(service, u, c, cmd);
}
/*************************************************************************/
/**
* Find the Help Command
* @param services Services Client
* @param u User Struct
* @param Command Hash Table
@@ -120,70 +262,10 @@ void do_help_limited(char *service, User * u, Command * c)
* @return void
*/
void mod_help_cmd(char *service, User * u, CommandHash * cmdTable[],
const char *cmd)
const char *cmd)
{
Command *c = findCommand(cmdTable, cmd);
Command *current;
int has_had_help = 0;
int cont = MOD_CONT;
const char *p1 = NULL, *p2 = NULL, *p3 = NULL, *p4 = NULL;
for (current = c; (current) && (cont == MOD_CONT);
current = current->next) {
p1 = current->help_param1;
p2 = current->help_param2;
p3 = current->help_param3;
p4 = current->help_param4;
if (current->helpmsg_all >= 0) {
notice_help(service, u, current->helpmsg_all, p1, p2, p3, p4);
has_had_help = 1;
} else if (current->all_help) {
cont = current->all_help(u);
has_had_help = 1;
}
if (is_services_root(u)) {
if (current->helpmsg_root >= 0) {
notice_help(service, u, current->helpmsg_root, p1, p2, p3,
p4);
has_had_help = 1;
} else if (current->root_help) {
cont = current->root_help(u);
has_had_help = 1;
}
} else if (is_services_admin(u)) {
if (current->helpmsg_admin >= 0) {
notice_help(service, u, current->helpmsg_admin, p1, p2, p3,
p4);
has_had_help = 1;
} else if (current->admin_help) {
cont = current->admin_help(u);
has_had_help = 1;
}
} else if (is_services_oper(u)) {
if (current->helpmsg_oper >= 0) {
notice_help(service, u, current->helpmsg_oper, p1, p2, p3,
p4);
has_had_help = 1;
} else if (current->oper_help) {
cont = current->oper_help(u);
has_had_help = 1;
}
} else {
if (current->helpmsg_reg >= 0) {
notice_help(service, u, current->helpmsg_reg, p1, p2, p3,
p4);
has_had_help = 1;
} else if (current->regular_help) {
cont = current->regular_help(u);
has_had_help = 1;
}
}
}
if (has_had_help == 0) {
notice_lang(service, u, NO_HELP_AVAILABLE, cmd);
} else {
do_help_limited(service, u, c);
}
Command *c = findCommand(cmdTable, cmd);
do_help_cmd(service, u, c, cmd);
}
/*************************************************************************/
+192 -23
View File
@@ -16,44 +16,213 @@
/*************************************************************************/
#if !HAVE_SNPRINTF
/* [v]snprintf: Like [v]sprintf, but don't write more than len bytes
* (including null terminator). Return the number of bytes
* written.
*/
#if BAD_SNPRINTF
int vsnprintf(char *buf, size_t len, const char *fmt, va_list args)
{
if (len <= 0)
return 0;
*buf = 0;
vsnprintf(buf, len, fmt, args);
buf[len - 1] = 0;
return strlen(buf);
}
#endif /* BAD_SNPRINTF */
int snprintf(char *buf, size_t len, const char *fmt, ...)
{
va_list args;
int ret = 0;
va_start(args, fmt);
ret = vsnprintf(buf, len, fmt, args);
va_end(args);
return ret;
}
#endif /* !HAVE_SNPRINTF */
/*************************************************************************/
#if !HAVE_STRICMP && !HAVE_STRCASECMP
/* stricmp, strnicmp: Case-insensitive versions of strcmp() and
* strncmp().
* strncmp().
*/
int stricmp(const char *s1, const char *s2)
{
register int c;
register int c;
while ((c = tolower(*s1)) == tolower(*s2)) {
if (c == 0)
return 0;
s1++;
s2++;
}
if (c < tolower(*s2))
return -1;
return 1;
while ((c = tolower(*s1)) == tolower(*s2)) {
if (c == 0)
return 0;
s1++;
s2++;
}
if (c < tolower(*s2))
return -1;
return 1;
}
int strnicmp(const char *s1, const char *s2, size_t len)
{
register int c;
register int c;
if (!len)
return 0;
while ((c = tolower(*s1)) == tolower(*s2) && len > 0) {
if (c == 0 || --len == 0)
return 0;
s1++;
s2++;
}
if (c < tolower(*s2))
return -1;
return 1;
if (!len)
return 0;
while ((c = tolower(*s1)) == tolower(*s2) && len > 0) {
if (c == 0 || --len == 0)
return 0;
s1++;
s2++;
}
if (c < tolower(*s2))
return -1;
return 1;
}
#endif
/*************************************************************************/
#if !HAVE_STRDUP
char *strdup(const char *s)
{
char *new = calloc(strlen(s) + 1, 1);
if (new)
strcpy(new, s);
return new;
}
#endif
/*************************************************************************/
#if !HAVE_STRSPN
size_t strspn(const char *s, const char *accept)
{
size_t i = 0;
while (*s && strchr(accept, *s))
++i, ++s;
return i;
}
#endif
/*************************************************************************/
#if !HAVE_STRERROR
# if HAVE_SYS_ERRLIST
extern char *sys_errlist[];
# endif
char *strerror(int errnum)
{
# if HAVE_SYS_ERRLIST
return sys_errlist[errnum];
# else
static char buf[20];
snprintf(buf, sizeof(buf), "Error %d", errnum);
return buf;
# endif
}
#endif
/*************************************************************************/
#if !HAVE_STRSIGNAL
/* Windows only supports 6 signals:
* SIGINT, SIGILL, SIGABRT, SIGFPE, SIGSEGV, SIGTERM
* -- codemastr
*/
char *strsignal(int signum)
{
static char buf[32];
switch (signum) {
#ifndef _WIN32
case SIGHUP:
strscpy(buf, "Hangup", sizeof(buf));
break;
#endif
case SIGINT:
strscpy(buf, "Interrupt", sizeof(buf));
break;
#ifndef _WIN32
case SIGQUIT:
strscpy(buf, "Quit", sizeof(buf));
break;
#endif
#ifdef SIGILL
case SIGILL:
strscpy(buf, "Illegal instruction", sizeof(buf));
break;
#endif
#ifdef SIGABRT
case SIGABRT:
strscpy(buf, "Abort", sizeof(buf));
break;
#endif
#if defined(SIGIOT) && (!defined(SIGABRT) || SIGIOT != SIGABRT)
case SIGIOT:
strscpy(buf, "IOT trap", sizeof(buf));
break;
#endif
#ifdef SIGBUS
case SIGBUS:
strscpy(buf, "Bus error", sizeof(buf));
break;
#endif
case SIGFPE:
strscpy(buf, "Floating point exception", sizeof(buf));
break;
#ifndef _WIN32
case SIGKILL:
strscpy(buf, "Killed", sizeof(buf));
break;
case SIGUSR1:
strscpy(buf, "User signal 1", sizeof(buf));
break;
#endif
case SIGSEGV:
strscpy(buf, "Segmentation fault", sizeof(buf));
break;
#ifndef _WIN32
case SIGUSR2:
strscpy(buf, "User signal 2", sizeof(buf));
break;
case SIGPIPE:
strscpy(buf, "Broken pipe", sizeof(buf));
break;
case SIGALRM:
strscpy(buf, "Alarm clock", sizeof(buf));
break;
#endif
case SIGTERM:
strscpy(buf, "Terminated", sizeof(buf));
break;
#ifndef _WIN32
case SIGSTOP:
strscpy(buf, "Suspended (signal)", sizeof(buf));
break;
case SIGTSTP:
strscpy(buf, "Suspended", sizeof(buf));
break;
case SIGIO:
strscpy(buf, "I/O error", sizeof(buf));
break;
#endif
default:
snprintf(buf, sizeof(buf), "Signal %d\n", signum);
break;
}
return buf;
}
#endif
/*************************************************************************/
+1218 -1580
View File
File diff suppressed because it is too large Load Diff
-100
View File
@@ -1,100 +0,0 @@
/* +------------------------------------+
* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
* InspIRCd: (C) 2002-2009 InspIRCd Development Team
* See: http://www.inspircd.org/wiki/index.php/Credits
*
* This program is free but copyrighted software; see
* the file COPYING for details.
*
* ---------------------------------------------------
*/
#include "services.h"
ConfigReader::ConfigReader() : data(&serverConfig.config_data), errorlog(new std::ostringstream(std::stringstream::in | std::stringstream::out)), privatehash(false), error(CONF_NO_ERROR)
{
}
ConfigReader::~ConfigReader()
{
if (this->errorlog)
delete this->errorlog;
if(this->privatehash)
delete this->data;
}
ConfigReader::ConfigReader(const std::string &filename) : data(new ConfigDataHash), errorlog(new std::ostringstream(std::stringstream::in | std::stringstream::out)), privatehash(true), error(CONF_NO_ERROR)
{
serverConfig.ClearStack();
}
std::string ConfigReader::ReadValue(const std::string &tag, const std::string &name, const std::string &default_value, int index, bool allow_linefeeds)
{
/* Don't need to strlcpy() tag and name anymore, ReadConf() takes const char* */
std::string result;
if (!serverConfig.ConfValue(*this->data, tag, name, default_value, index, result, allow_linefeeds)) this->error = CONF_VALUE_NOT_FOUND;
return result;
}
std::string ConfigReader::ReadValue(const std::string &tag, const std::string &name, int index, bool allow_linefeeds)
{
return ReadValue(tag, name, "", index, allow_linefeeds);
}
bool ConfigReader::ReadFlag(const std::string &tag, const std::string &name, const std::string &default_value, int index)
{
return serverConfig.ConfValueBool(*this->data, tag, name, default_value, index);
}
bool ConfigReader::ReadFlag(const std::string &tag, const std::string &name, int index)
{
return ReadFlag(tag, name, "", index);
}
int ConfigReader::ReadInteger(const std::string &tag, const std::string &name, const std::string &default_value, int index, bool need_positive)
{
int result;
if (!serverConfig.ConfValueInteger(*this->data, tag, name, default_value, index, result)) {
this->error = CONF_VALUE_NOT_FOUND;
return 0;
}
if (need_positive && result < 0) {
this->error = CONF_INT_NEGATIVE;
return 0;
}
return result;
}
int ConfigReader::ReadInteger(const std::string &tag, const std::string &name, int index, bool need_positive)
{
return ReadInteger(tag, name, "", index, need_positive);
}
long ConfigReader::GetError()
{
long olderr = this->error;
this->error = 0;
return olderr;
}
void ConfigReader::DumpErrors(bool bail)
{
serverConfig.ReportConfigError(this->errorlog->str(), bail);
}
int ConfigReader::Enumerate(const std::string &tag)
{
return serverConfig.ConfValueEnum(*this->data, tag);
}
int ConfigReader::EnumerateValues(const std::string &tag, int index)
{
return serverConfig.ConfVarEnum(*this->data, tag, index);
}
bool ConfigReader::Verify()
{
return this->readerror;
}
-41
View File
@@ -1,41 +0,0 @@
# Find all the *.c and *.cpp files within the current source directory, and sort the list
file(GLOB CORE_SRCS_C RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.c")
file(GLOB CORE_SRCS_CPP RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.cpp")
set(CORE_SRCS ${CORE_SRCS_C} ${CORE_SRCS_CPP})
if(CMAKE244_OR_BETTER)
list(SORT CORE_SRCS)
endif(CMAKE244_OR_BETTER)
# If using Windows, add the MODULE_COMPILE define
if(WIN32)
add_definitions(-DMODULE_COMPILE)
endif(WIN32)
# Set all the files to use C++ as well as set their compile flags (use the module-specific compile flags, though)
set_source_files_properties(${CORE_SRCS} PROPERTIES LANGUAGE CXX COMPILE_FLAGS "${CXXFLAGS}")
# Iterate through all the source files
foreach(SRC ${CORE_SRCS})
# Convert the source file extension to have a .so extension
string(REGEX REPLACE "\\.(c|cpp)$" ".so" SO ${SRC})
# Calculate the header file dependencies for the given source file
calculate_depends(${SRC})
# For Visual Studio only, include win32_memory.cpp to the list of sources, required to override Visual Studio's overrides of the new/delete operators
if(MSVC)
append_to_list(SRC ${Anope_SOURCE_DIR}/src/win32_memory.cpp)
set_source_files_properties(${Anope_SOURCE_DIR}/src/win32_memory.cpp LANGUAGE CXX COMPILE_FLAGS "${CXXFLAGS}")
endif(MSVC)
# Generate the module and set it's linker flags, also set it to depend on the main Anope executable to be built beforehand
add_library(${SO} MODULE ${SRC})
set_target_properties(${SO} PROPERTIES LINKER_LANGUAGE CXX PREFIX "" SUFFIX "" LINK_FLAGS "${LDFLAGS}")
add_dependencies(${SO} ${PROGRAM_NAME})
# For Windows only, have the module link to the export library of Anope as well as the wsock32 library (most of the modules probably don't need this, but this is to be on the safe side), also set it's version
if(WIN32)
target_link_libraries(${SO} ${PROGRAM_NAME} wsock32)
set_target_properties(${PROGRAM_NAME} PROPERTIES VERSION "${VERSION_DOTTED}")
endif(WIN32)
# Set the module to be installed to the module directory under the data directory
install(TARGETS ${SO}
DESTINATION data/modules
)
endforeach(SRC)
+9 -14
View File
@@ -1,15 +1,13 @@
include ./Makefile.inc
MAKEARGS = 'CFLAGS=${CFLAGS}' 'CC=${CC}' 'ANOPELIBS=${ANOPELIBS}' \
'LDFLAGS=${LDFLAGS}' 'INSTDIR=${INSTDIR}' 'INSTALL=${INSTALL}' \
'LDFLAGS=${LDFLAGS}' 'BINDEST=${BINDEST}' 'INSTALL=${INSTALL}' \
'INCLUDEDIR=${INCLUDEDIR}' 'RM=${RM}' 'CP=${CP}' \
'TOUCH=${TOUCH}' 'SHELL=${SHELL}' \
'RUNGROUP=${RUNGROUP}' \
'PROFILE=${PROFILE}' 'SHARED=${SHARED}' \
'MODULEFLAGS=${MODULEFLAGS}' 'MAKEBIN=${MAKEBIN}'
'TOUCH=${TOUCH}' 'SHELL=${SHELL}' 'DATDEST=${DATDEST}' \
'RUNGROUP=${RUNGROUP}' 'MODULE_PATH=${MODULE_PATH}' \
'PROFILE=${PROFILE}' 'SHARED=${SHARED}' 'MODULEFLAGS=${MODULEFLAGS}'
OBJECTS= $(SRCS:.c=.o)
OBJECTS+= $(SRCS:.cpp=.o)
SO_FILES=$(OBJECTS:.o=.s)
CDEFS= -rdynamic -Wall
@@ -17,19 +15,16 @@ all: modules subs
modules: $(OBJECTS) $(SO_FILES)
install:
$(CP) ./*.so $(INSTDIR)/data/modules
install:
$(CP) ./*.so $(MODULE_PATH)
distclean: spotless
.c.o:
@$(MAKEBIN) $(CC) ${CFLAGS} ${CDEFS} ${MODULEFLAGS} -I../${INCLUDEDIR} -c $<
.cpp.o:
@$(MAKEBIN) $(CC) ${CFLAGS} ${CDEFS} ${MODULEFLAGS} -I../${INCLUDEDIR} -c $<
$(CC) ${CFLAGS} ${CDEFS} ${MODULEFLAGS} -I../${INCLUDEDIR} -c $<
.o.s:
@$(MAKEBIN) $(CC) ${SHARED} ../mod_version.o $< -o $*.so ${PROFILE}
$(CC) ${SHARED} ../mod_version.o $< -o $*.so ${PROFILE}
@$(TOUCH) $*.s
subs:
@@ -46,5 +41,5 @@ clean: subs_clean
rm -f *.o *.s *.so *.c~ core
spotless: subs_clean
rm -f *.o *.s *.so *.c~ core *.so Makefile.inc
rm -f *.o *.s *.so *.c~ core Makefile.inc
+2 -2
View File
@@ -1,8 +1,8 @@
MAKEARGS = 'CFLAGS=${CFLAGS}' 'CC=${CC}' 'ANOPELIBS=${ANOPELIBS}' \
'LDFLAGS=${LDFLAGS}' 'INSTDIR=${INSTDIR}' 'INSTALL=${INSTALL}' \
'LDFLAGS=${LDFLAGS}' 'BINDEST=${BINDEST}' 'INSTALL=${INSTALL}' \
'INCLUDEDIR=${INCLUDEDIR}' 'RM=${RM}' 'CP=${CP}' \
'TOUCH=${TOUCH}' 'SHELL=${SHELL}' 'DATDEST=${DATDEST}' \
'RUNGROUP=${RUNGROUP}' \
'RUNGROUP=${RUNGROUP}' 'MODULE_PATH=${MODULE_PATH}' \
'PROFILE=${PROFILE}' 'SHARED=${SHARED}' 'MODULEFLAGS=${MODULEFLAGS}'
OBJECTS= $(SRCS:.c=.o)
+24
View File
@@ -0,0 +1,24 @@
include ../../Makefile.inc.win32
SRCS=bs_act.c bs_assign.c bs_badwords.c bs_bot.c bs_botlist.c bs_fantasy.c bs_fantasy_kick.c bs_fantasy_kickban.c bs_fantasy_owner.c bs_fantasy_seen.c bs_help.c bs_info.c bs_kick.c bs_say.c bs_set.c bs_unassign.c cs_access.c cs_akick.c cs_ban.c cs_clear.c cs_drop.c cs_forbid.c cs_getkey.c cs_getpass.c cs_help.c cs_identify.c cs_info.c cs_invite.c cs_kick.c cs_list.c cs_logout.c cs_modes.c cs_register.c cs_sendpass.c cs_set.c cs_status.c cs_suspend.c cs_topic.c cs_xop.c enc_none.c enc_md5.c enc_old.c enc_sha1.c he_help.c hs_del.c hs_delall.c hs_group.c hs_help.c hs_list.c hs_off.c hs_on.c hs_set.c hs_setall.c ms_cancel.c ms_check.c ms_del.c ms_help.c ms_info.c ms_list.c ms_read.c ms_rsend.c ms_send.c ms_sendall.c ms_set.c ms_staff.c ns_access.c ns_alist.c ns_drop.c ns_forbid.c ns_getemail.c ns_getpass.c ns_ghost.c ns_group.c ns_help.c ns_identify.c ns_info.c ns_list.c ns_logout.c ns_recover.c ns_register.c ns_release.c ns_sendpass.c ns_set.c ns_saset.c ns_status.c ns_suspend.c ns_update.c os_admin.c os_akill.c os_chankill.c os_chanlist.c os_clearmodes.c os_defcon.c os_global.c os_help.c os_ignore.c os_jupe.c os_kick.c os_logonnews.c os_mode.c os_modinfo.c os_modlist.c os_modload.c os_modunload.c os_noop.c os_oline.c os_oper.c os_opernews.c os_quit.c os_randomnews.c os_raw.c os_reload.c os_restart.c os_session.c os_set.c os_sgline.c os_shutdown.c os_sqline.c os_staff.c os_stats.c os_svsnick.c os_szline.c os_umode.c os_update.c os_userlist.c
OBJECTS= $(SRCS:.c=.dll)
CFLAGS=/LD /MD /D MODULE_COMPILE $(CFLAGS) /I"../../include"
LFLAGS=/link ../anope.lib wsock32.lib $(LIBS) $(LFLAGS) $(MYSQL_LIB_PATH) /export:AnopeInit /export:AnopeFini /VERSION:$(VERSION)
all: $(OBJECTS)
distclean: clean spotless
.c.dll:
$(CC) $(CFLAGS) $< ..\mod_version.c $(LFLAGS)
clean:
-@del *.obj
spotless: clean
-@del *.dll *.lib *.exp *.manifest
install:
-@mkdir ..\..\$(DATDEST)\modules
-@mkdir ..\..\$(DATDEST)\modules\runtime
-@copy *.dll ..\..\$(DATDEST)\modules
+51 -42
View File
@@ -6,8 +6,8 @@
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
* Based on the original code of Services by Andy Church.
*
* $Id$
*
*/
@@ -18,23 +18,34 @@
int do_act(User * u);
void myBotServHelp(User * u);
class BSAct : public Module
/**
* Create the command, and tell anope about it.
* @param argc Argument count
* @param argv Argument list
* @return MOD_CONT to allow the module, MOD_STOP to stop it
**/
int AnopeInit(int argc, char **argv)
{
public:
BSAct(const std::string &modname, const std::string &creator) : Module(modname, creator)
{
Command *c;
Command *c;
this->SetAuthor("Anope");
this->SetVersion("$Id$");
this->SetType(CORE);
c = createCommand("ACT", do_act, NULL, BOT_HELP_ACT, -1, -1, -1, -1);
this->AddCommand(BOTSERV, c, MOD_UNIQUE);
moduleAddAuthor("Anope");
moduleAddVersion("$Id$");
moduleSetType(CORE);
c = createCommand("ACT", do_act, NULL, BOT_HELP_ACT, -1, -1, -1, -1);
moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
this->SetBotHelp(myBotServHelp);
}
};
moduleSetBotHelp(myBotServHelp);
return MOD_CONT;
}
/**
* Unload the module
**/
void AnopeFini(void)
{
}
/**
* Add the help response to Anopes /bs help output.
@@ -42,7 +53,7 @@ class BSAct : public Module
**/
void myBotServHelp(User * u)
{
notice_lang(s_BotServ, u, BOT_HELP_CMD_ACT);
notice_lang(s_BotServ, u, BOT_HELP_CMD_ACT);
}
/**
@@ -52,32 +63,30 @@ void myBotServHelp(User * u)
**/
int do_act(User * u)
{
ChannelInfo *ci;
ChannelInfo *ci;
char *chan = strtok(NULL, " ");
char *text = strtok(NULL, "");
char *chan = strtok(NULL, " ");
char *text = strtok(NULL, "");
if (!chan || !text)
syntax_error(s_BotServ, u, "ACT", BOT_ACT_SYNTAX);
else if (!(ci = cs_findchan(chan)))
notice_lang(s_BotServ, u, CHAN_X_NOT_REGISTERED, chan);
else if (ci->flags & CI_VERBOTEN)
notice_lang(s_BotServ, u, CHAN_X_FORBIDDEN, chan);
else if (!ci->bi)
notice_help(s_BotServ, u, BOT_NOT_ASSIGNED);
else if (!ci->c || ci->c->usercount < BSMinUsers)
notice_lang(s_BotServ, u, BOT_NOT_ON_CHANNEL, ci->name);
else if (!check_access(u, ci, CA_SAY))
notice_lang(s_BotServ, u, ACCESS_DENIED);
else {
strnrepl(text, BUFSIZE, "\001", "");
ircdproto->SendAction(ci->bi, ci->name, "%s", text);
ci->bi->lastmsg = time(NULL);
if (LogBot && LogChannel && logchan && !debug && findchan(LogChannel))
ircdproto->SendPrivmsg(ci->bi, LogChannel, "ACT %s %s %s",
u->nick, ci->name, text);
}
return MOD_CONT;
if (!chan || !text)
syntax_error(s_BotServ, u, "ACT", BOT_ACT_SYNTAX);
else if (!(ci = cs_findchan(chan)))
notice_lang(s_BotServ, u, CHAN_X_NOT_REGISTERED, chan);
else if (ci->flags & CI_VERBOTEN)
notice_lang(s_BotServ, u, CHAN_X_FORBIDDEN, chan);
else if (!check_access(u, ci, CA_SAY))
notice_lang(s_BotServ, u, ACCESS_DENIED);
else if (!ci->bi)
notice_help(s_BotServ, u, BOT_NOT_ASSIGNED);
else if (!ci->c || ci->c->usercount < BSMinUsers)
notice_lang(s_BotServ, u, BOT_NOT_ON_CHANNEL, ci->name);
else {
strnrepl(text, BUFSIZE, "\001", "");
anope_cmd_action(ci->bi->nick, ci->name, "%s", text);
ci->bi->lastmsg = time(NULL);
if (LogBot && LogChannel && logchan && !debug && findchan(LogChannel))
anope_cmd_privmsg(ci->bi->nick, LogChannel, "ACT %s %s %s",
u->nick, ci->name, text);
}
return MOD_CONT;
}
MODULE_INIT("bs_act", BSAct)

Some files were not shown because too many files have changed in this diff Show More