1
0
mirror of https://github.com/anope/anope.git synced 2026-06-17 15:44:46 +02:00

Compare commits

..

817 Commits

Author SHA1 Message Date
Adam- 883d22d4da Bump for 1.9.2 Release
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@3007 5417fbe8-f217-4b02-8779-1006273d7864
2010-06-18 07:40:17 +00:00
cyberbotx b766b3a597 Minor edits to fix compile errors/warnings with clang and a small compile warning under Windows (gotta work on the other 450+ Windows warnings sometime).
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@3006 5417fbe8-f217-4b02-8779-1006273d7864
2010-06-16 23:50:33 +00:00
Adam- 834f4d1bf0 Cleaned up some of the cloaked host tracking on Unreal
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@3004 5417fbe8-f217-4b02-8779-1006273d7864
2010-06-15 17:04:27 +00:00
Adam- ab4533e58a Made db-convert change old disabled levels to newer ACCESS_QOP, keeps people from being locked out of controlling their own XOP channels
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@3002 5417fbe8-f217-4b02-8779-1006273d7864
2010-06-12 22:28:56 +00:00
Adam- 4ba8c2ba74 Tell users to identify when they connect on InspIRCd
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@3001 5417fbe8-f217-4b02-8779-1006273d7864
2010-06-12 22:28:52 +00:00
Adam- 2cc4cd0165 Only enable vhosts automatically if the user doesn't already have the vhost set
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2998 5417fbe8-f217-4b02-8779-1006273d7864
2010-06-04 02:17:58 +00:00
Adam- 9abdb4e2e9 Added inspircd2.0 protocol module, moved usermode +r unsetting on nick change to the protocol modules to fix inspircd1.2s weird usermode +r behavior
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2997 5417fbe8-f217-4b02-8779-1006273d7864
2010-06-03 19:01:28 +00:00
Adam- f43f6c3864 Keep track of what IRCds set -r on nick change and dont inform us to keep the modemanager/modestacker in sync
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2996 5417fbe8-f217-4b02-8779-1006273d7864
2010-06-03 05:59:59 +00:00
Adam- 6d87e0eb72 Use pongs to determine when servers are done syncing in Unreal, fixes a problem with Unreals endburst system where we have clients introduced to us from a "synced" server when they really arent
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2995 5417fbe8-f217-4b02-8779-1006273d7864
2010-06-03 05:15:44 +00:00
Adam- 1c89004245 Removed ircd->b_delay_auth, have User::CheckAuthenticationToken validate users. Fixes us telling people to identify after netmerge then silently identifying them once we process svid.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2994 5417fbe8-f217-4b02-8779-1006273d7864
2010-06-03 05:15:39 +00:00
Adam- 8cc71ee794 Fixed a crash from r2990
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2992 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-30 03:21:10 +00:00
Adam- e4189822bc Rewrote some of the user nick changing code, enable vhosts for users on nick change, and dont update last seen/last realname when users are identified to an account which doesn't own the nick they are using
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2990 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-28 21:57:15 +00:00
Adam- a5ddbb0217 Fixed some compiler warnings found on 64bit systems
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2989 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-27 01:51:14 +00:00
Adam- 3d396f245b Fixed tracking of users with the +a channel mode on unrealircd during SJOINs
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2988 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-26 19:48:12 +00:00
Adam- 0018f790ed Fixed some windows problems with db_mysql_execute
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2987 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-26 19:48:08 +00:00
Adam- 6674797c7d Fixed some windows problems with db_mysql_execute
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2986 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-26 19:48:04 +00:00
Adam- 1e2e80bf75 Changed User::AutoID to always log in the user to the core, and to set usermode +r on users that should be. Fixes everyone being identified but not usermode +r on inspircd 1.2
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2985 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-25 20:21:59 +00:00
Adam- dc3744a71c Check if a module file exists before making runtime copy of it, keeps 0 byte sized unused modules out of the runtime/ directory
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2984 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-25 20:21:54 +00:00
Adam- a36e536a4d Fixed a crash if /ns ghost is used without a password
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2983 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-25 18:23:33 +00:00
Adam- 7f4afc22fa Truncate memo table before sqlsync and actually add sglines
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2982 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-24 06:17:25 +00:00
Adam- 6e7479170e Fixed bug #1167 - Fixed rsquitting juped servers on InspIRCd1.2+
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2980 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-23 20:46:29 +00:00
Adam- 543e0d770a Fixed bug #1165, fixed soem missing tables in /os sqlsync. Also added support for saving cs_levels
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2979 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-23 20:46:23 +00:00
Adam- d5f0360175 Rewrote the nick colliding/releaseing/canceling system, fixes many many bugs on IRCds without svsnick and/or svshold
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2975 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-22 07:40:22 +00:00
Adam- fae2710ba7 Fixed saving capsmin in the database, fixes the bug also fixed by the last commit
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2974 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-21 23:05:38 +00:00
cyberbotx 8e39d5f219 Fix crash bug when there is a caps kicker in a channel but no alphabetic characters on a line.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2973 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-21 22:36:06 +00:00
Adam- 0a91d582c9 Fixed a crash when a users realname changes when they are on a registered nick but not identified, and made my last commit about case insensitive oper names really work
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2972 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-21 20:30:26 +00:00
Adam- 9b06dc5046 Made the oper:name config option case insensitive
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2971 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-21 06:46:52 +00:00
Adam- 6fb5ca2315 Fixed db-convert to properly convert mlocked mode names for the new databases
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2970 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-20 19:36:17 +00:00
Adam- 3860856dd2 Moved opertype access checking to NickAlises constructor, cleans up some code and fixes bug #1163
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2968 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-19 06:17:55 +00:00
Adam- 2b4d834f8c Fixed a potential crash in os_szline because of a bad pointer passed to an event
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2967 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-19 06:17:48 +00:00
Adam- 79c3a70ed7 Made is possible to change levels back to founder only and made founder only levels only apply to the real founder. Changed the defaults for things such as autoowner to ACCESS_QOP
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2965 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-17 18:12:40 +00:00
Adam- f9c4baf8fc Free access and badwords list when channels are deleted
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2964 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-17 18:12:26 +00:00
Adam- a0ff4cfed5 You dont see this
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2961 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-14 20:56:40 +00:00
Adam- 5993a65b87 Fixed many windows problems in the debug build
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2960 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-14 20:52:17 +00:00
Adam- 116a4b2bea Removed ns_noop_convert. The ns_noop module is for stable and almost 4 years old
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2959 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-14 16:51:28 +00:00
Adam- 29619eb206 Finished r2957
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2958 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-14 16:01:54 +00:00
DukePyrolator 78240c5790 Reversed the autoop flag to make it more logical. In 1.8, we set this flag to DISABLE autoop. Now we set this flag to ENABLE autoop. Also updated the database converter.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2957 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-14 06:16:25 +00:00
Adam- da277ad2c9 Fixed all of the bugs related to bug #1162 and fixed mlock params to be saved correctly in the mysql database
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2956 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-13 20:25:31 +00:00
DukePyrolator b88b98e627 fixed crashbugs in db_mysql_write when unsetting url, email and greet
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2955 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-13 19:30:56 +00:00
DukePyrolator 0ab5111bda fixed crashbug in db_mysql_write on updating an empty greet message
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2954 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-13 19:04:19 +00:00
Adam- 6c56c23837 Update core bot client names if the config is changed
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2953 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-13 06:27:16 +00:00
Adam- bd2fda42cf Fixed a potential crash caused from accessing a uninitialized pointer when enforcing mlock
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2951 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-12 01:53:29 +00:00
Adam- baa119f2e2 Changed the names of modes in the databases to be exactly the same way they are used internally. This will become very important in 1.9.3 later
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2949 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-10 22:05:01 +00:00
Adam- 5351fb4e4a Save & load nick requests from db_plain
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2948 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-10 19:26:18 +00:00
Adam- 2f3da52c3c Fixed tracking of InspIRCd channel mode R
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2945 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-10 06:41:16 +00:00
Adam- 80969ad89a Fixed tracking of channel mode +L on InspIRCd 1.2
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2944 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-10 06:30:17 +00:00
Adam- 7b6d1e1b52 Removed channel passwords from the CHAN_HELP_REGISTER and CHAN_HELP_DROP language strings
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2942 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-08 20:58:11 +00:00
Adam- 0a371aec7b Removed an unneeded static_cast in enc_none
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2941 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-07 20:57:29 +00:00
Adam- 011e426845 Removed the chanserv/aop/list command perm and switched it with chanserv/access/list. Fixed a bug so users on the access list can request the vop and hop list.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2940 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-07 20:16:09 +00:00
Adam- 75f39dec7a Fixed bug #1159 and made the SQL fields holding timestamps more consistant
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2939 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-06 17:08:55 +00:00
Adam- 3ebaa46c99 Revert "sql file should work fine on import now (exported via phpmyadmin, which puts constraints at the end)"
Revert "added DROP TABLE statements and english comments"
Revert "* SQL schema switched to InnoDB engine and UTF-8 encoding"

This reverts commit 196567ce68
This reverts commit 2e03670256
This reverts commit 7ffaa93865

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2938 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-06 16:45:34 +00:00
pimpmylinux 196567ce68 sql file should work fine on import now (exported via phpmyadmin, which puts constraints at the end)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2937 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-06 06:55:00 +00:00
DukePyrolator 2e03670256 added DROP TABLE statements and english comments
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2936 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-06 05:25:23 +00:00
Adam- 845cca2722 Fixed a compile error in r2933
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2934 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-05 23:39:41 +00:00
pimpmylinux 1b7749f108 SVN Id keyword to .h/.c/.cpp files
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2933 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-05 23:09:14 +00:00
pimpmylinux 7ffaa93865 * SQL schema switched to InnoDB engine and UTF-8 encoding
* Defined several foreign keys and added some missing indexes

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2932 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-05 22:55:18 +00:00
Adam- 6bd04bc936 db_mysql_read now loads the full database
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2928 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-04 18:43:13 +00:00
Adam- 8c1afc307a Fixed a crash because of a bad SQL query when changing your password
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2927 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-03 20:38:27 +00:00
Adam- d002ea1952 Moved CODING, TODO, and Changes* to docs/. Removed unused empty file install-sh.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2926 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-02 04:37:17 +00:00
Adam- 05eb3fd2d6 Added support for InspIRCd 2.0
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2925 5417fbe8-f217-4b02-8779-1006273d7864
2010-05-01 22:49:41 +00:00
Adam- 9fc99cdfbb Fixed ms_rsend reply when sending a memo to a nick
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2924 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-30 18:04:25 +00:00
Adam- 0f45f286eb Made ms_rsend work
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2923 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-30 17:09:09 +00:00
Adam- f07adb2b25 Do not join ChanServ to hold channels if the channel is syncing
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2922 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-30 00:08:36 +00:00
Adam- ab7e430170 Don't use botserv bots to hold channels open, becomes too much of a problem if people unassign/reassign bots etc
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2921 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-30 00:08:33 +00:00
Adam- 8aa7fbe0ea Properly track users who join channels using an exception
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2920 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-29 23:05:09 +00:00
Adam- 7fc9b4f943 Forward port of r2918
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2919 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-29 00:23:18 +00:00
Adam- 3d367e9bde Fixed a typo in Changes and added an entry about new ipv6 support
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2917 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-28 21:32:28 +00:00
Adam- 582212b361 Allow superadmins and ulines to join channels always
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2916 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-25 23:12:27 +00:00
Adam- 1528727cc8 Fixed a crash when shutdown when not connected
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2915 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-25 01:23:23 +00:00
Adam- 492b543c7e Fixed the /nickserv help info output to services opers and the reply from /chanserv help info to be correct
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2914 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-24 22:48:58 +00:00
Adam- 0bfe09ba5d Fixed loading negatively mlocked modes from the DB and fixed loading access creators
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2913 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-24 22:20:14 +00:00
Adam- 76534583db Fix a potential crash when removing SQLines
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2912 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-24 22:20:10 +00:00
Adam- b8674ee3fb Logout the SQLUser & any fake users after using commands
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2911 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-24 22:20:00 +00:00
Adam- 9f47e2b137 Fixed typo in CHAN_SET_PERSIST_SYNTAX lang string
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2910 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-24 20:41:00 +00:00
Adam- aff1d04bab Updated TODO
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2909 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-24 20:40:52 +00:00
Adam- 01b0ad461a Fixed crash when shutting down when db_mysql_execute is loaded and logusers is enabled
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2908 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-24 06:51:23 +00:00
Adam- 80c9c4903e Fixed dropping nicks registered through MySQL
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2907 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-24 06:51:19 +00:00
Adam- 757c7ad973 Fixed some typos in log messages, found by Lethality
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2906 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-24 06:51:14 +00:00
Adam- 531cba9251 Actually use readtimeout from the config & fixed many valgrind errors
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2905 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-22 19:40:58 +00:00
Adam- 752e87a9f0 Fixed two log message typos, patch from Lethality
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2904 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-22 00:32:18 +00:00
Adam- 508996215f Fixed cs_clear ops to not deop users twice on Unreal and made it always use svsmode_ucmode if it can
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2902 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-21 02:15:48 +00:00
Adam- f87398b532 Correctly handle recieving messages over 65.5 thousand bytes
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2901 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-20 23:33:09 +00:00
Adam- a6cc0a305e Reply with the correct idle times for the core service bots
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2898 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-17 15:48:30 +00:00
DukePyrolator bf84e48549 fixed missing SID before FJOIN in the inspircd12 protocol module
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2897 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-17 14:22:16 +00:00
Adam- 99559d1acd Fixed loading botserv bots time created & number of channels from the database, and only readd the core bots if none exist, not just if nickserv doesn't exist
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2892 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-15 02:23:41 +00:00
Adam- 12a4aa4dba Fixed crash on /ns release and made release actually work
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2891 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-13 18:37:35 +00:00
Adam- a53719d91e Remove +r from nonregistered channels
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2890 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-13 02:45:33 +00:00
Adam- 5a6ec7cf86 Fixed +q and +a channel modes on inspircd 1.2 if they have no prefixes
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2889 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-11 20:09:11 +00:00
Adam- e84db77a2c Correctly identify a user when they get autoidentified and made db_plain not crash if it gets a founderless channel
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2888 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-11 20:09:06 +00:00
Adam- 34f10d78fc Don't backup the database and not rewrite a new one (oops?)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2887 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-11 07:29:51 +00:00
Adam- 5d3491e72f Dont allow the first user in registered syncing channel to retain their access if they arent allowed to have it
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2886 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-11 07:29:46 +00:00
Adam- 1e9de0c7f1 Return MOD_STOP in various places where the user executing the command had been killed, fixes a crash if a user gets killed for too many invalid passwords
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2885 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-11 00:29:07 +00:00
Adam- 626afff37d Dont backup the database unless there is a database to backup
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2884 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-11 00:28:59 +00:00
Adam- aa677072e0 Fixed cs_modes to add commands after the modes requiring them are introduced
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2883 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-10 22:58:46 +00:00
Adam- c424dce517 Made db_plain backup its databases
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2882 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-10 22:58:42 +00:00
Adam- 91f6b2e29d Made MySQL log errors when executing queries instead of crashing
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2881 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-10 19:16:55 +00:00
dukepyrolator 7d3138a4cc changed all mysqlpp::String::empty() calls to mysqlpp::String::size() to make it compile with older versions of the mysql++ library
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2880 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-10 17:15:08 +00:00
Adam- c4f40ed3a7 Fixed tracking of InspIRCd mode +J and fixed mode manager and stacker to handle parameter modes correctly
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2879 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-09 22:50:48 +00:00
Adam- a1c49c827f Fixed a problem with binding to certian IPs
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2878 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-09 19:41:44 +00:00
Adam- 1f738f0ad4 Fixed a potential crash when a user does not pass connection checks (akill/session)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2877 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-09 18:51:05 +00:00
Adam- af45426be5 Fixed a crash when linking servers
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2876 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-09 18:11:00 +00:00
dukepyrolator 278314f8be fixed a small typo in the language files
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2875 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-09 16:10:46 +00:00
dukepyrolator 4e594d3acd fixed the database converter (streams dont like null pointers)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2874 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-09 14:27:54 +00:00
Adam- 89120afeba Fixed cs_ban, os_jupe, and os_restart
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2873 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-09 06:26:08 +00:00
Adam- 1a3a4b275f Removed the OnFind events, they are not necessary anymore and just waste CPU
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2872 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-09 06:04:52 +00:00
dukepyrolator a840ef8ae8 added a new event OnFinishSync, that allows modules to send additional data to the IRCd before we send the EOB
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2871 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-09 05:28:46 +00:00
dukepyrolator 2c79273205 changed the way how the IV is stored with the password and renamed some variables to make the code more understandable
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2870 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-09 05:22:25 +00:00
Adam- ac19ba79d1 Process the socket engine one last time before Anope disconnects to send everything through to the uplink
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2869 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-09 05:04:21 +00:00
Adam- a40c22a729 Made the mode stacker never send a mode change for something that is already (un)set, and set -r when dropping channels
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2868 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-09 05:04:17 +00:00
Adam- 911eeea867 Fixed enc_none OnDecrypt to work correctly on Windows
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2867 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-09 05:04:09 +00:00
Adam- 1ec931a93a Fix a typo in Changes.conf
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2866 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-09 05:04:04 +00:00
Adam- 93949b8b96 Fixed windows compile on new sockets
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2865 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-09 05:03:57 +00:00
Adam- 6a70b5385b Fixed ns_getpass and ns_sendpass to not load when there is no supported encryption loaded
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2864 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-09 01:09:55 +00:00
Adam- f483ab87c6 Updated Change log
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2863 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-08 21:00:28 +00:00
Adam- 973ecb7058 Rewrote sockets. This adds support for IPv6 and makes Anope capable of reconnecting if it loses connection to the uplink.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2862 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-08 20:23:00 +00:00
Adam- e1ff14e0c4 Fixed make install
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2857 5417fbe8-f217-4b02-8779-1006273d7864
2010-04-04 00:54:00 +00:00
Adam- b2380300ff Added a small example webpage that can be used to register nicknames online via SQL
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2852 5417fbe8-f217-4b02-8779-1006273d7864
2010-03-31 20:53:08 +00:00
Adam- 2404bb74c5 Fixed windows build
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2850 5417fbe8-f217-4b02-8779-1006273d7864
2010-03-31 06:21:16 +00:00
Adam- b1c34faf49 Fixed cs_xop to not add its commands until after it knows what modes as supported by the IRCd
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2849 5417fbe8-f217-4b02-8779-1006273d7864
2010-03-31 04:42:00 +00:00
Adam- b55ac06019 Added akicks into SQL
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2848 5417fbe8-f217-4b02-8779-1006273d7864
2010-03-31 04:41:56 +00:00
Adam- eaf211d59c Burned db-merger & docs, it will eventually need a complete rewrite
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2847 5417fbe8-f217-4b02-8779-1006273d7864
2010-03-31 04:41:49 +00:00
Adam- 94822c99c0 Added last used time to akick view
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2846 5417fbe8-f217-4b02-8779-1006273d7864
2010-03-31 04:41:44 +00:00
Adam- a3347b59a1 Marked mysql modules as a database module and fixed os_modlist to show database modules
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2845 5417fbe8-f217-4b02-8779-1006273d7864
2010-03-31 04:41:35 +00:00
Adam- 3c4b3f0407 Fixed --with-mysqlpp configure option on some systems
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2844 5417fbe8-f217-4b02-8779-1006273d7864
2010-03-30 19:17:50 +00:00
Adam- f4bcf833ec Finish rest of BotServ SQL stuff
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2839 5417fbe8-f217-4b02-8779-1006273d7864
2010-03-28 07:57:05 +00:00
Adam- aa90411f3a Track BotServ settings in SQL
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2838 5417fbe8-f217-4b02-8779-1006273d7864
2010-03-28 04:40:13 +00:00
Adam- 7e8e6e849b Removed some unused externs from extern.h
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2835 5417fbe8-f217-4b02-8779-1006273d7864
2010-03-24 01:17:43 +00:00
Adam- 3ffd917926 Rewrote arg parsing system, changed lots of std::string*s to std::string&, made --config arg, and made Anope print out a few lines of information when starting
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2833 5417fbe8-f217-4b02-8779-1006273d7864
2010-03-24 00:46:53 +00:00
Adam- 14fc57d24b Replaced old update/expire timers with newer timers
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2832 5417fbe8-f217-4b02-8779-1006273d7864
2010-03-21 19:57:25 +00:00
Adam- 9302af51a3 Added options:passlen
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2831 5417fbe8-f217-4b02-8779-1006273d7864
2010-03-21 19:57:22 +00:00
Adam- 287169d6e8 Made the database file name configurable
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2830 5417fbe8-f217-4b02-8779-1006273d7864
2010-03-21 19:57:14 +00:00
Adam- fc05827621 Made usermax and hostmax configurable
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2829 5417fbe8-f217-4b02-8779-1006273d7864
2010-03-21 19:57:08 +00:00
DukePyrolator 04bf65525a fixed typo in mysql query
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2828 5417fbe8-f217-4b02-8779-1006273d7864
2010-03-21 11:28:42 +00:00
DukePyrolator 872a00242e assigned botserv bots will now join permanent channels when syncing with our uplink
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2827 5417fbe8-f217-4b02-8779-1006273d7864
2010-03-21 08:43:12 +00:00
DukePyrolator d70948d81e fixed bad mysql query
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2826 5417fbe8-f217-4b02-8779-1006273d7864
2010-03-21 06:01:31 +00:00
DukePyrolator 3e77eaa218 fixed sending CHGIDENT without parameter
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2825 5417fbe8-f217-4b02-8779-1006273d7864
2010-03-20 22:27:11 +00:00
Adam- 28ccf79adf Fixed /ms list reply header to include the users nick
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2824 5417fbe8-f217-4b02-8779-1006273d7864
2010-03-20 04:59:50 +00:00
Adam- 6ebc85b900 Fix loading akills/sxlines from plaintext database
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2823 5417fbe8-f217-4b02-8779-1006273d7864
2010-03-20 04:59:43 +00:00
Adam- 51351aac2b Added in support for OperServ and MemoServ into SQL
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2822 5417fbe8-f217-4b02-8779-1006273d7864
2010-03-20 04:59:38 +00:00
Adam- ba4c7d8138 Made the exception list really work
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2820 5417fbe8-f217-4b02-8779-1006273d7864
2010-03-18 19:03:35 +00:00
Adam- 2871c4701b Fixed bug #1141, reodered some access checks in cs_kick and cs_modes to hide who is on the channel
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2817 5417fbe8-f217-4b02-8779-1006273d7864
2010-03-16 20:21:40 +00:00
Adam- f62eb16176 Removed old parts for 1.7.x from mydbgen and fixed db_mysql_write query for /nickserv set
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2814 5417fbe8-f217-4b02-8779-1006273d7864
2010-03-15 23:35:47 +00:00
Adam- b7477fc4d0 Foward port of r2809
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2812 5417fbe8-f217-4b02-8779-1006273d7864
2010-03-13 20:46:34 +00:00
Adam- faed18f6e8 Fixed loading memo messages from the flatfile databases
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2806 5417fbe8-f217-4b02-8779-1006273d7864
2010-03-09 05:26:10 +00:00
Adam- ce79b5023f Made guestnick generation really work
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2805 5417fbe8-f217-4b02-8779-1006273d7864
2010-03-09 01:25:09 +00:00
Adam- 27364ac890 Added the --with-mysqlpp option to configure to tell it where mysql++ is installed at
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2804 5417fbe8-f217-4b02-8779-1006273d7864
2010-03-08 03:08:37 +00:00
dukepyrolator dd7d2d4cf0 added a check for null pointers
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2803 5417fbe8-f217-4b02-8779-1006273d7864
2010-03-06 10:33:28 +00:00
Adam- 023c2188f8 Added help for sqlsync and fixed installing mydbgen into the wrong directory when using configure
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2802 5417fbe8-f217-4b02-8779-1006273d7864
2010-03-06 07:34:19 +00:00
Adam- ab1f8e01fa Made it so you can register empty nonregistered channels to make registering channels through SQL a bit more effective, fixed a some small bugs found on the testnet, added some missing modes into InspIRCd1.2 support, and updated TODO and Changes.lang
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2799 5417fbe8-f217-4b02-8779-1006273d7864
2010-02-28 22:12:09 +00:00
Adam- 3f80e1cad0 Added in support for live updating MySQL databases and the ability to execute commands to Anope through MySQL. Currently database support only applies to NickServ, ChanServ and BotServ but will be expanded soon.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2798 5417fbe8-f217-4b02-8779-1006273d7864
2010-02-28 17:33:31 +00:00
Adam- 393b5ab26e Marked mode +f on inspircd1.2 as minusnoarg
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2797 5417fbe8-f217-4b02-8779-1006273d7864
2010-02-28 05:39:50 +00:00
Adam- 9edede4f3a Removed OnBotPreLoad event, this is a much better way to prevent multiple of the same bots being loaded
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2796 5417fbe8-f217-4b02-8779-1006273d7864
2010-02-25 07:12:17 +00:00
Adam- 235c4ae95c Rewrote part of the Timer and CallBack code for modules to be sane
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2795 5417fbe8-f217-4b02-8779-1006273d7864
2010-02-25 06:20:00 +00:00
Adam- 54a60add71 Actually use the cmdTable pointer in bot structures, it now points to the bots command hash
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2794 5417fbe8-f217-4b02-8779-1006273d7864
2010-02-23 01:33:17 +00:00
cyberbotx a06e674305 Correctly identify CMake 2.8.x as being CMake 2.6 or better.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2793 5417fbe8-f217-4b02-8779-1006273d7864
2010-02-20 04:21:15 +00:00
Adam- 84ecd1866c Added generic support for unknown modes told to Anope at runtime by the IRCd
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2790 5417fbe8-f217-4b02-8779-1006273d7864
2010-02-12 19:51:16 +00:00
Adam- 2eb2cb7650 Changed up a small part of the mode API for preparation for dynamic mode support at runtime
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2789 5417fbe8-f217-4b02-8779-1006273d7864
2010-02-10 23:40:54 +00:00
Adam- fcc08f61bc Updated docs to reflect CAPAB change
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2788 5417fbe8-f217-4b02-8779-1006273d7864
2010-02-10 00:32:19 +00:00
Adam- 512b5bdaf3 Rewrote & fixed CAPAB support
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2786 5417fbe8-f217-4b02-8779-1006273d7864
2010-02-08 03:09:19 +00:00
DukePyrolator f4db8c5360 fixed some uninitialized pointers
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2785 5417fbe8-f217-4b02-8779-1006273d7864
2010-02-07 00:03:10 +00:00
Adam- 6b2f9e25cd Fix typo in inspircd11 that would cause people not to get status from FJOINs
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2784 5417fbe8-f217-4b02-8779-1006273d7864
2010-02-06 20:16:30 +00:00
Adam- 4099944013 Recieve the max number of modes we can set at once from the IRCd and use it
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2783 5417fbe8-f217-4b02-8779-1006273d7864
2010-02-06 19:27:32 +00:00
Adam- 87b62c433d Remove protectbotserv option from modes, just use options:botmodes instead
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2782 5417fbe8-f217-4b02-8779-1006273d7864
2010-02-06 19:27:10 +00:00
Adam- de99f89894 Parse CAPAB from the server to determin what modes we know about
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2781 5417fbe8-f217-4b02-8779-1006273d7864
2010-02-06 19:26:42 +00:00
Adam- 308070e019 We now store a list of users using a NickCore in the NickCore, this prevents having to loop every user all the time to find them
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2780 5417fbe8-f217-4b02-8779-1006273d7864
2010-02-04 23:49:27 +00:00
Adam- 3d4cf39940 Only set necessary modes on people, eg dont set +qaohv.. unnecessary
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2779 5417fbe8-f217-4b02-8779-1006273d7864
2010-02-02 03:21:03 +00:00
Adam- 122dcd082a Added options:botmodes to configure what modes BotServ bots should use in channels
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2778 5417fbe8-f217-4b02-8779-1006273d7864
2010-02-02 03:20:58 +00:00
DukePyrolator aa4b3e2563 replaced the alog() command with a new type-safe and stream-based Alog()
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2777 5417fbe8-f217-4b02-8779-1006273d7864
2010-01-31 06:15:29 +00:00
Adam- 47504c9de5 Fixed db-convert and enc_old to work when converting databases using enc_old
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2776 5417fbe8-f217-4b02-8779-1006273d7864
2010-01-24 23:15:08 +00:00
Adam- 0ed0fa4af6 Rewrote how Anope stores channel status modes on users.
This allows 3rd party modules to add and track their own status mode.
Additionally we now store a users status in both the UserContainer and ChannelContainer.
This also fixes the ModeStacker to not send any mode strings unnecessarially and shuffles some code
around so we don't have to manually remove channels from users lists everywhere.

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2775 5417fbe8-f217-4b02-8779-1006273d7864
2010-01-21 06:31:17 +00:00
DukePyrolator 15817208aa fixed a compile error on windows
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2765 5417fbe8-f217-4b02-8779-1006273d7864
2010-01-16 20:15:14 +00:00
Adam- ff13d00eb5 Removed c_userlist and u_chanlist, replaced with std::list
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2764 5417fbe8-f217-4b02-8779-1006273d7864
2010-01-16 06:57:14 +00:00
Adam- aaf1cefd1c Added channels.h and moved channel stuff from services.h to it
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2763 5417fbe8-f217-4b02-8779-1006273d7864
2010-01-16 06:56:57 +00:00
Adam- c4c1242ac7 Fixed bug #1135 - Don't kick or ban ulined clients
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2762 5417fbe8-f217-4b02-8779-1006273d7864
2010-01-15 19:30:11 +00:00
DukePyrolator f432789853 some code cleanup in enc_sha256
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2760 5417fbe8-f217-4b02-8779-1006273d7864
2010-01-15 18:07:41 +00:00
DukePyrolator 1cf1f044fb burned helpserv from README
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2759 5417fbe8-f217-4b02-8779-1006273d7864
2010-01-15 05:40:26 +00:00
Adam- 525dfe12e6 Added param arg to ChannelModeSet/Unset events, and fixed it to not ignore status and list modes
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2758 5417fbe8-f217-4b02-8779-1006273d7864
2010-01-14 21:30:38 +00:00
Adam- 0d6fa568ec Use commasepstream in do_join and do_topic, much cleaner
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2757 5417fbe8-f217-4b02-8779-1006273d7864
2010-01-14 21:30:15 +00:00
Adam- fadc61f89e Fixed crash caused by r2732 caused by adding someone to the exception list
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2756 5417fbe8-f217-4b02-8779-1006273d7864
2010-01-14 21:29:39 +00:00
Adam- 711787b54d Burned do_sjoin and rewrote it to be sane. This changes how Anope handles new channel creations drasitcally as we now truely track it all instead of hack around it by not initially tracking user joins to new channels
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2755 5417fbe8-f217-4b02-8779-1006273d7864
2010-01-14 21:29:08 +00:00
sjaz f2c44c67b5 Update copyright for CBX
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2754 5417fbe8-f217-4b02-8779-1006273d7864
2010-01-11 20:28:59 +00:00
pimpmylinux 0a61c06860 updated copyright info for 2010
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2753 5417fbe8-f217-4b02-8779-1006273d7864
2010-01-11 19:36:24 +00:00
pimpmylinux ef442c3dc8 some language fixes ported from stable
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2751 5417fbe8-f217-4b02-8779-1006273d7864
2010-01-11 19:06:21 +00:00
Adam- 420b11a235 Rewrote the os_staff command to work properly with the account system. This also fixing displaying users on opered nicks when not on their main nick
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2749 5417fbe8-f217-4b02-8779-1006273d7864
2010-01-11 18:36:04 +00:00
Adam- 5ad60b70ee Forward port of r2747
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2748 5417fbe8-f217-4b02-8779-1006273d7864
2010-01-11 14:28:48 +00:00
Adam- b73210e538 Rewrote the code that handles and sends kicks
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2746 5417fbe8-f217-4b02-8779-1006273d7864
2010-01-10 22:56:03 +00:00
DukePyrolator 01d43e7db5 changed enc_sha256 to use random salts instead of a hardcoded salt
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2745 5417fbe8-f217-4b02-8779-1006273d7864
2010-01-10 19:58:32 +00:00
DukePyrolator 20b5056315 changed the source argument of enc_decrypt to const
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2744 5417fbe8-f217-4b02-8779-1006273d7864
2010-01-10 19:56:16 +00:00
DukePyrolator d66e928529 services will now send the correct message on /cs invite <nick>
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2742 5417fbe8-f217-4b02-8779-1006273d7864
2010-01-09 19:35:01 +00:00
DukePyrolator 4ae43c7dd2 added a salted sha256 encryption module
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2741 5417fbe8-f217-4b02-8779-1006273d7864
2010-01-09 08:56:58 +00:00
DukePyrolator 5e62e8f22e changed all password fields to std::string and reworked the way how the enc modules handle the passwords
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2740 5417fbe8-f217-4b02-8779-1006273d7864
2010-01-09 08:49:00 +00:00
DukePyrolator a4b015b39d fixed a crashbug in os_ignore on db saving and cleaned up the db code in hs_request
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2739 5417fbe8-f217-4b02-8779-1006273d7864
2010-01-09 06:54:11 +00:00
Adam- 0761d4f74b Fix crash caused by trying to add an akick to a channel when certain types of exceptions are set, this also fixes entry_match to match with case insensitivity, as bans/excepts/invexs arent case sensitive
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2738 5417fbe8-f217-4b02-8779-1006273d7864
2010-01-06 22:55:21 +00:00
Adam- e34448092e Messaging service@server.name works again as it should
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2737 5417fbe8-f217-4b02-8779-1006273d7864
2010-01-06 21:30:22 +00:00
Adam- 9124a3be53 Fixed windows build and cleaned up a few small things
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2736 5417fbe8-f217-4b02-8779-1006273d7864
2010-01-06 20:09:48 +00:00
cyberbotx b462814760 Changed 'char *' fields in BotInfo to 'std::string', cleanup of bots.cpp, changed many other functions to use 'const std::string &' arguments as a chain reaction.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2733 5417fbe8-f217-4b02-8779-1006273d7864
2010-01-04 06:40:24 +00:00
Adam- 2708eea5d1 Removed NICKMAX and CHANMAX, replaced user->nick, c->name, and ci->name with std::string
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2732 5417fbe8-f217-4b02-8779-1006273d7864
2010-01-04 05:45:58 +00:00
cyberbotx f58026749b Fixed base64 functions to be const safe until I can convert them to use std::string instead, also a little cleanup while I was in there.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2729 5417fbe8-f217-4b02-8779-1006273d7864
2010-01-03 07:42:49 +00:00
Adam- ed568f4750 Fixed db-convert to really convert vhosts
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2728 5417fbe8-f217-4b02-8779-1006273d7864
2010-01-03 04:36:36 +00:00
Adam- de824a599a Fixed bug #1121 - Fixes a potential crash when a user changes hosts
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2725 5417fbe8-f217-4b02-8779-1006273d7864
2010-01-02 08:21:12 +00:00
Adam- a819cb0cc0 Rewrote the vhost code, and moved it to be part of nickalias instead of in its own list. This also fixes being able to steal other users vhosts with /hs on
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2724 5417fbe8-f217-4b02-8779-1006273d7864
2010-01-02 08:20:59 +00:00
cyberbotx 3617d79788 Convert 'const char *' and 'char *' function arguments to 'const std::string &' instead, done in actions.c along with chain reactions in other files.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2723 5417fbe8-f217-4b02-8779-1006273d7864
2010-01-02 04:55:43 +00:00
Adam- 657e1deb59 Added in new plaintext databases. Note: This currently has no automatic backup feature. Big thanks to Phil on this for mass scale testing
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2722 5417fbe8-f217-4b02-8779-1006273d7864
2009-12-31 01:25:10 +00:00
Adam- c595e6755d Fixed not being able to restart if anope was started from outside of the directory it is in
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2721 5417fbe8-f217-4b02-8779-1006273d7864
2009-12-30 23:18:16 +00:00
Adam- 4fd169b184 Added in support for permanet channel modes on non-registered channels
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2720 5417fbe8-f217-4b02-8779-1006273d7864
2009-12-30 02:07:17 +00:00
Adam- 7665af27cd Chnaged ChannelModeSet/Unset events to be able to block checks such as secureops and mlock, and made it so you can't set a mode already set or unset a mode already unset so the modestacker doesn't send modes it doesn't need to
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2719 5417fbe8-f217-4b02-8779-1006273d7864
2009-12-29 23:16:10 +00:00
sjaz df107dac1f Fix small typo in services.conf - thanks Phil.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2718 5417fbe8-f217-4b02-8779-1006273d7864
2009-12-27 19:20:26 +00:00
Adam- bfd252b517 Send only the newly formatted users string to do_sjoin when using inspircd12, not the old one and the new one, as this implies the old users are parameters for modes, which makes mode manager unhappy
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2717 5417fbe8-f217-4b02-8779-1006273d7864
2009-12-25 20:42:02 +00:00
DukePyrolator 90a500ffd6 fixed a small bug in the extensible class
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2716 5417fbe8-f217-4b02-8779-1006273d7864
2009-12-25 19:11:04 +00:00
Adam- 80cbac3769 Replaced some static_casts related to modes with dynamic_cast - its a bit safer
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2715 5417fbe8-f217-4b02-8779-1006273d7864
2009-12-23 08:41:22 +00:00
Adam- f82640af7c Fixed bug #1119 - Fixed a few help replies to respect the nickserv msg option when sending blank lines
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2714 5417fbe8-f217-4b02-8779-1006273d7864
2009-12-22 23:59:06 +00:00
cyberbotx 77f0cd0c46 Change OperType's name to be ci::string instead of std::string, should hopefully make it so it doesn't matter what case is used in the oper blocks compared to the opertype blocks.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2713 5417fbe8-f217-4b02-8779-1006273d7864
2009-12-21 02:30:14 +00:00
Adam- 7a7f1f8390 Rewrote part of extensible, it will now automatically unallocate memory for us so we don't have to manually delete it everywhere anymore
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2711 5417fbe8-f217-4b02-8779-1006273d7864
2009-12-20 18:39:52 +00:00
Adam- 861fe9e7b3 Added BotInfo* sender arg to all of the User mode functions, changed IRcdProto::SendMode for channels to accept a Channel pointer and fixed unsetting users vhosts on Unreal
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2710 5417fbe8-f217-4b02-8779-1006273d7864
2009-12-17 02:10:35 +00:00
Adam- 453963eeae Moved /chanserv unban to its own module and added support for unbanning a nickname, this readds !unban nick
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2709 5417fbe8-f217-4b02-8779-1006273d7864
2009-12-16 23:50:33 +00:00
Adam- aad1a4ca8d Hopefully this fixes detecting if Unreal sends a TS at the end of the mode string and removing it, which keeps it from being passed to mode handler
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2708 5417fbe8-f217-4b02-8779-1006273d7864
2009-12-16 23:50:19 +00:00
Adam- c6e3324b30 Made many of the functions in IRCDProto accept the relative object pointers instea of char* everywhere, and updated TODO
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2706 5417fbe8-f217-4b02-8779-1006273d7864
2009-12-16 02:25:38 +00:00
robbeh 98aa38d800 Added !K trigger to kick people and updated Changes
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2705 5417fbe8-f217-4b02-8779-1006273d7864
2009-12-15 21:31:53 +00:00
robbeh f1c975c89f Added a KB alias to ban to allow the !kb fantasy trigger
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2704 5417fbe8-f217-4b02-8779-1006273d7864
2009-12-15 21:29:48 +00:00
Adam- 3beac16030 More work on db-convert, almost done. This also moves the bot section of the db above the chan section, so we can check if channel bot names are valid
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2703 5417fbe8-f217-4b02-8779-1006273d7864
2009-12-14 23:52:59 +00:00
Adam- 511c4b73d2 Updated docs/IRCD to reflect recent changes in the ircdvar struct, and made botinfo constructors set created time not bs_bot, db loaders will change it later if needed
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2702 5417fbe8-f217-4b02-8779-1006273d7864
2009-12-14 21:58:33 +00:00
Adam- 6f5bc22584 Did some more work on db-convert
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2701 5417fbe8-f217-4b02-8779-1006273d7864
2009-12-14 03:50:27 +00:00
Adam- 744d6d4030 Set the created time for BotServ bots correctly
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2700 5417fbe8-f217-4b02-8779-1006273d7864
2009-12-14 03:50:23 +00:00
Adam- d4af97a7a7 Ripped out old databases
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2699 5417fbe8-f217-4b02-8779-1006273d7864
2009-12-14 00:56:58 +00:00
Adam- 710355fd2c Don't allow mlocking/defconing modes such as beIohv
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2698 5417fbe8-f217-4b02-8779-1006273d7864
2009-12-13 23:14:20 +00:00
Adam- 46c0d40009 Moved hostserv/set priv to commands, only check for HasCommand() when trying to execute commands and not HasPriv(), as Privs should never be necessary to execute any command
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2697 5417fbe8-f217-4b02-8779-1006273d7864
2009-12-13 19:57:22 +00:00
Adam- a7ac6a0ac7 Added in a modestacker and rewrote almost all of the remaining old mode code
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2696 5417fbe8-f217-4b02-8779-1006273d7864
2009-12-13 19:32:19 +00:00
DukePyrolator 3a956c51be do not show the NICK_INFO_FOR_MORE message when the user has no permission to do it
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2695 5417fbe8-f217-4b02-8779-1006273d7864
2009-12-11 21:17:08 +00:00
Adam- 280dcc7597 Only show the user as online in /nickserv info if they are identified for the group of that nick
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2693 5417fbe8-f217-4b02-8779-1006273d7864
2009-12-08 02:33:39 +00:00
DukePyrolator 37de1286fa added a function to convert some mlock modes
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2692 5417fbe8-f217-4b02-8779-1006273d7864
2009-12-07 22:30:43 +00:00
Adam- 4630ae454a Added options:mlock in the config so you can set what modes should be locked on new channels
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2690 5417fbe8-f217-4b02-8779-1006273d7864
2009-12-05 22:12:48 +00:00
Adam- 42b8cfe404 Got rid of some now unnecessary code in config.c and moved Config.Opers.clear() to InitOpers where it belongs
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2689 5417fbe8-f217-4b02-8779-1006273d7864
2009-12-05 21:04:15 +00:00
cyberbotx 935c1974e8 Fix crontab script to correctly find services.pid, it's not in ~/anope/bin, it's in ~/anope/data.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2687 5417fbe8-f217-4b02-8779-1006273d7864
2009-12-05 16:27:35 +00:00
Adam- f913188991 Added ci::string to run-cc.pl message filters, and fixed irc::string to display properly aswell
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2686 5417fbe8-f217-4b02-8779-1006273d7864
2009-12-05 06:11:23 +00:00
Adam- eadf52caf2 Added ns_resetpass which can be used to reset user passwords by email, very useful if you're using encryption
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2685 5417fbe8-f217-4b02-8779-1006273d7864
2009-12-05 05:44:02 +00:00
Adam- 661755a199 Fixed crash when using smartjoin and assigning a bot to an +i channel, reported by Platzii
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2684 5417fbe8-f217-4b02-8779-1006273d7864
2009-12-04 23:11:08 +00:00
DukePyrolator 17a4789c1c some code cleanup
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2682 5417fbe8-f217-4b02-8779-1006273d7864
2009-12-04 06:32:17 +00:00
Adam- 180ac9e4d2 Changed Extensible::Extend to not unnecessarially cast every pointer it recieves to char* and then to void*, but to just change it to void*. This allows storing of various things that the char* cast messed up, such as time_t etc
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2681 5417fbe8-f217-4b02-8779-1006273d7864
2009-12-03 01:17:08 +00:00
DukePyrolator d4b595fdb8 the database converter can now convert the operserv database
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2678 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-29 20:55:41 +00:00
DukePyrolator f9cd8c200c the database converter can now handle a broken bot.db from 1.9.0
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2677 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-29 09:32:32 +00:00
DukePyrolator 0557f090fb fixed some bugs in the database converter
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2676 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-29 08:31:44 +00:00
DukePyrolator 23b3382347 updated database converter
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2675 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-29 07:56:35 +00:00
Adam- a08b3ec592 Massive move of all of the Config variables out of global scope to the Config class
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2674 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-28 23:02:07 +00:00
Adam- f6b823ade8 Set all of the default channel flags on new channels. Thix fixes persistant not being set on newly registered channels
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2673 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-27 07:41:21 +00:00
Adam- 4fac8d6a91 Foward port of part of r2668
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2669 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-25 21:38:50 +00:00
DukePyrolator 4f550d29aa fixed a crash when a user connects without a vhost
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2666 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-24 06:19:32 +00:00
Adam- 68ef593292 Properly remove users on access lists that are below voice status when converting to XOP
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2664 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-24 03:05:38 +00:00
Adam- 24f7ffcf18 Remove the permanent channel mode from channels that are dropped/expired/etc
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2663 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-24 01:19:12 +00:00
Adam- c3529b6129 Marked +l and +L on InspIRCd 1.2 as minus no arg
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2662 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-24 01:18:59 +00:00
DukePyrolator c7893e471f updated french lang file. patch provided by nemosphere
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2661 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-21 20:51:01 +00:00
Adam- e514a3793d Changed the mode param handling code to be more into the general mode handling code, this cleans up and fixes some small problems with mlocking params. This also helps clarify that the ChannelInfo mode functions are for mlock only. Also, this adds the OnMLock and OnUnMLock events which can be used to control if something can be (un)mlocked
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2660 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-19 01:53:03 +00:00
Adam- 68381e69d9 Fix compile errors on some compilers that did not like our overloaded operators << on std::ostream
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2659 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-19 01:52:52 +00:00
cyberbotx aa421772e0 Make the correct folder be chmod'd on a *nix install of the tools directory (we got rid of installing the tools to a tools directory a long while back, now they go in the bin directory instead)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2658 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-18 13:02:22 +00:00
Adam- 5179a0a40f Delete the correct entries from akick and badwords list when given a numlist
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2657 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-18 02:51:46 +00:00
cyberbotx da8a1c7b60 Remove some CoreExports and add them in other places, fixed a few minor warnings under Windows build, made Windows build create a static library out of win32_memory.cpp and use that with everything instead of relying on it being compiled into everything (saves compiling time).
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2656 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-18 01:05:12 +00:00
cyberbotx e10fe1cd76 Removed some unnecessary casts, used C++-style casts over C-style casts, fixed a few warnings (one possibly fatal one).
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2655 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-17 04:04:24 +00:00
Adam- 88330c07ad Cleand up alot of the code in bs_badwords, made it much more C++-ish
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2654 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-17 03:15:31 +00:00
cyberbotx 88c0edc8f8 Fix the EXTRA_CONFIG_ARGS part of Config so it actually gets used, and doesn't get clobbered on no input.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2653 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-16 12:59:31 +00:00
Adam- d82771900e Made the 'Module compiled against current version of Anope' message debug only
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2652 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-16 02:38:46 +00:00
cyberbotx 7eadde9911 Possible fix for header dependency calculation causing CMake to freeze due to recursive including, fixed by removing my code to do that and letting CMake figure this out on it's own. Seems to work here, but might need testing still.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2651 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-15 21:14:11 +00:00
Adam- 8e8a1d96e4 Fixed potential segfault when deleting users from the access list by number, reported by Cronus
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2650 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-14 05:10:34 +00:00
Adam- 842b5609dc Updated docs dir, specifically the IRCD and EVENTS file to be up to date with 1.9s new systems
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2648 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-13 23:52:37 +00:00
Adam- 960968b8cd Made /nickserv group work properly with the new account system
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2647 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-13 02:56:47 +00:00
Adam- 9c6576f78e Fix bug introduced in r2574 that would set passwords incorrectly when using enc_none
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2646 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-12 02:52:27 +00:00
Adam- 65628dfdec Fix default OnSyntaxError subcommand to be the last param if its size is less than the minimum required for the command
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2645 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-12 00:28:09 +00:00
Adam- 848c0aaa21 Made Command::Execute's params const
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2644 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-12 00:28:05 +00:00
Adam- d16f4930f4 Made Command::OnSyntaxError accept a subcommand parameter, we now give syntax error messages for subcommands (eg, cs_set) instead of giving the general syntax error for the main command
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2643 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-11 23:43:02 +00:00
Adam- 30b7e50a43 Replaced all of the char* params in cs_set with ci::string so we dont use stricmp all over, and updated coding style
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2642 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-11 07:57:03 +00:00
Adam- 0264072b53 Made disabling chanserv levels *really* disable them so noone can use them (even founder), and have the ability to set it to 10000 for founders.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2641 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-11 07:20:44 +00:00
Adam- 0bd3141407 Made DefCon not use a ChannelInfo structure for saving its modes & params, it was ugly
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2640 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-11 06:03:40 +00:00
Adam- b9190ebc16 Moved alot of stuff to constructors and destructors, instead of having functions everywhere to create and destroy objects
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2639 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-11 06:03:25 +00:00
Adam- 86e43f1f14 Added support for permanent channels. This supports both permanent channel modes and the ability to have BotServ bots stay in the channel to keep it open.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2638 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-11 02:47:05 +00:00
Adam- 9d37cf1d5a Made the Module::ServHelp() functions part of the event system
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2637 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-08 23:43:51 +00:00
Adam- 458be36a32 Rewrote all of the old C style flag systems into a new Flag class which everything inherits from. This breaks reading and writing flags to the old databases (and probably many other things aswell) - Don't use it
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2636 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-08 20:06:21 +00:00
Adam- 38ad96c57c Fixed /chanserv help forbid to allow you to forbid unregistered channels
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2634 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-08 19:53:05 +00:00
Adam- 1c1312624d Rewrote BuildStringList to use std::list instead of char**
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2632 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-08 18:00:54 +00:00
cyberbotx 608b63d979 Make CMake ignore the CMakeFiles directory, really only applies to Win32 build since it still allows in-source builds (unlike the *nix build).
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2631 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-08 15:42:38 +00:00
Adam- 9047b0347d Made mlock_on, mlock_off, access, and akick private in ChannelInfo
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2630 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-07 21:46:58 +00:00
Adam- 029f39964b Rewrote all of the akick code to be much cleaner
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2613 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-07 18:09:09 +00:00
Adam- 2ec83162d6 Added src/regchannel.cpp and moved the code from include/regchannel.h there
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2612 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-06 02:46:29 +00:00
Adam- 3317f406d2 Added /chanserv access view, which shows the access creator and last time used
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2611 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-06 02:08:15 +00:00
Adam- 95a017db9f Dont allow sending empty mode strings in check_modes
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2610 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-05 13:35:09 +00:00
Adam- 187868def9 Removed trailing -'s on mode strings sent in check_modes
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2609 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-05 03:32:33 +00:00
Adam- 154b0ded37 Rewrote part of check_modes to keep it from sending empty mode strings
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2608 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-04 23:28:40 +00:00
Adam- 3125c632b5 Made the -nothird optopn work
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2607 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-04 00:34:57 +00:00
Adam- 921ddbd517 Added OnPreNickExpire and OnPreChanExpire events, which can keep nicks and channels from expiring
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2605 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-03 02:05:45 +00:00
Adam- 65deeaf1e6 Moved some of the news variables out of the news module so other modules etc can access them, if needed
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2604 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-03 02:05:38 +00:00
DukePyrolator a1fe864c7f check for umode +r before sending svsmode -r
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2603 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-02 06:04:27 +00:00
DukePyrolator 9a0b1efc24 added a way to load multiple encryption modules at the same and to switch between encryption methods
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2602 5417fbe8-f217-4b02-8779-1006273d7864
2009-11-02 05:22:35 +00:00
Adam- d2362719b2 Made do_nick return the user if I_OnPreUserConnect halts it if the user still exists, and removed unused defcon language string
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2600 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-30 17:13:50 +00:00
Adam- 987f371c0b Removed channel passwords and added /chanserv QOP command to add additional channel founders, aswell as access level 10000
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2599 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-30 02:38:06 +00:00
Adam- 6a9fa9f4d2 Rewrote all of the defcon code, and moved most of it to os_defcon. This fixes defcon to have the ability to use modes introduced to Anope at a later time than on startup (eg, from the IRCd), amongst other things
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2597 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-30 01:04:13 +00:00
Adam- 5fc268b750 Added I_OnPreUserConnect, I_OnUserModeAdd, and I_OnUserModeAdd events
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2596 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-30 01:03:54 +00:00
Adam- 5b62682223 Changed the "nickserv/confirm" opertype command to a permission, and added "nickserv/drop" permission used to drop other users nicks
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2595 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-29 00:44:26 +00:00
DukePyrolator 0b64cbc1d2 renaming to guestnick was not working properly
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2594 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-28 22:12:36 +00:00
Adam- fa622b4e9f Remove NickServ timers from TimerManager if we need to delete them, not just from NickServs timers - Fixes segfault reported by phantomal
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2593 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-28 15:12:47 +00:00
Adam- 52593ef71b Cleaned up some of the code in my last commit and made it a bit more consistant.. probably should have done this before but owell
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2592 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-27 13:19:01 +00:00
cyberbotx 9e48e683e7 Fix bug #1111, BS KICK should properly handle the CAPS, FLOOD, and REPEAT options now.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2591 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-27 11:52:51 +00:00
Adam- c64c2b6fd0 Rewrote part of chan_set_correct_modes and set Mode::ModeChar correctly
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2590 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-27 01:42:10 +00:00
Adam- a491eed3ff Added MinusNoArg to insp modes Ffj and unreal mode j
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2589 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-25 14:32:38 +00:00
Adam- a43424dbb9 Added internal tracking of InspIRCd1.2 channel modes BFfjMPT and user modes BcdGHIkQRSW, also added tracking of Unreal3.2s channel mode j
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2588 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-25 06:32:47 +00:00
Adam- 13f92e03be Document /ns confirm nick in /ns help confirm for services operators
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2587 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-25 04:13:07 +00:00
Adam- 6e3aa36876 Fixed passing invalid channel pointer to OnPartChannel if the last user in a channel parted, now we use NULL and just give it the channel name
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2586 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-25 04:12:54 +00:00
Adam- 7a429517af added options:enablelogchannel config file option, which turns on the logchannel on startup. yay!
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2585 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-25 04:12:47 +00:00
Adam- 0e8de37778 Rewrote part of news system and moved it all to os_news.c. Removed src/news.c
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2584 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-25 04:12:34 +00:00
Adam- 338cb38ee8 Added 4 new events for (un)setting modes on channels and users
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2583 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-25 04:12:21 +00:00
Adam- 8330009373 Actually use the I_OnRestart event
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2582 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-25 04:12:13 +00:00
Adam- 5ab705b6fe Fixed memos so identified users not on the nick's access list can send them
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2581 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-25 04:12:08 +00:00
cyberbotx a6c5207859 Move 1.9.1 TODO to Changes (as 1.9.1 was released), update Changes.conf, Changes.lang, and remove Changes.mysql (probably should've been done before 1.9,1's release, but better late than never).
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2580 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-24 03:49:49 +00:00
sjaz 2361cb8d40 Couple of typos in hs_request. Thanks Fudge.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2579 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-23 10:04:53 +00:00
sjaz d08461907c Couple more typo's from Fudge, cheers!
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2578 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-22 11:10:16 +00:00
sjaz fb997c5057 Fixed typo in example.conf. Thanks Fudge.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2577 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-22 09:12:07 +00:00
Adam- 6de7cb6eed Added SUFFIXES .c .cpp .so to makefiles to clean up some of the code
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2576 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-20 21:39:13 +00:00
Adam- 624c5ba5b6 Fixed makesfiles to work on both bsd make and gnu make
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2575 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-20 21:05:51 +00:00
cyberbotx 0b3824c86a Apply some changes based on possible "flaws" found with flawfinder.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2574 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-20 04:34:03 +00:00
cyberbotx 0d3ec454de Fix a few things that bugged me when I was working on one of my own modules.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2573 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-18 21:10:39 +00:00
jantje_85 12ac162d9e Fixed small typo in dutch translation.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2572 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-18 18:45:18 +00:00
Adam- d935d3d1b8 Call I_OnUserConnect and display news before checking if the user should be killed by sessions, sessions checking can delete the user if the IRCd doesn't send QUITs on KILL which could cause a segfault
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2570 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-17 20:24:10 +00:00
Adam- b705f7eda6 Fix crash when trying to parse a USERHOST reply for a nonexistant user on Unreal
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2569 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-17 18:33:25 +00:00
cyberbotx 00494c9020 dos2unix on files.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2568 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-17 15:45:19 +00:00
Adam- bbea1b5679 Give the proper error messages when trying to load/unload already loaded/unloaded modules, instead of just returning syntax error
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2567 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-17 01:17:19 +00:00
Adam- 72fed4d9bb Renamed OnServerConnect(Server*) event to OnNewServer, we have two OnServerConnect's which is slightly confusing...
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2566 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-17 01:17:06 +00:00
Adam- 63f55fa78b Made MOD_STOP returned from commands really halt processing (stops OnPostCommand event being called)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2565 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-17 01:17:00 +00:00
Adam- 11709eade6 Use the most recent NickServ collide/release timer for a nick instead of using the old and rejecting new ones
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2564 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-17 01:16:55 +00:00
Adam- 3806cd8440 Fixed bug #1110 - Fixed tracking of NickServ collide/release timers to only attempt to delete real ones
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2563 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-16 17:38:21 +00:00
Adam- f6510291aa Fixed inspircd12.cpp to actually work
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2562 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-14 17:39:25 +00:00
cyberbotx de917994f8 Fix CMake build generation, it was getting into an infinite loop due to the include of services.h inside of regchannel.h, will not happen now.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2561 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-13 23:58:56 +00:00
Adam- d3d64c27b1 Complete rewrite of everything associated with modes, this breaks saving and reading mlocked modes from the databases until the new databases are implemented
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2560 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-13 21:26:38 +00:00
sjaz 1fd6685132 Bump for SVN Version 1.9.2
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2559 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-13 17:06:06 +00:00
DukePyrolator 5a1bc6abb4 NICK_REG_PLEASE_WAIT and NICK_GROUP_PLASE_WAIT now show the seconds until you can register/group again
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2556 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-13 05:01:24 +00:00
cyberbotx 0d88137738 Code style cleanup, replace static_cast<std::string>() with std::string(), slight updates to config reader from InspIRCd.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2555 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-13 01:17:30 +00:00
Adam- 5bcb780c6d Changed /ns confirm to not assume the user you are confirming owns the nick (have it ask the user for the password now), added nickserv/confirm opertype command value, and changed OnNickRegister event param to be NickAlias* not User*
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2554 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-12 20:56:23 +00:00
DukePyrolator c79d189e89 fixed some bugs in ns_register.c
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2553 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-12 05:19:03 +00:00
Adam- 777c6cf073 Added OnPostDatabaseLoad event, which triggers after the cores databases have been loaded AND immediatly after a module is loaded *if* the core has already been loaded
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2552 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-11 15:31:34 +00:00
Adam- f06eed9809 Fixed restarting Anope on Windows
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2551 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-11 15:21:55 +00:00
sjaz 5bfc23a07e Removed proxy server from ulined servers in example config as more people use a client proxy scanner and this should reduce occurences of user servers being listed.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2549 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-11 12:39:07 +00:00
DukePyrolator 2896b388d7 on inspircd12, we now check for m_servprotect and give +k to our pseudo clients
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2548 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-11 04:15:32 +00:00
Adam- ba62e7be62 Reset errno before calling strtol in bs_kick, it would sometimes not allow valid kick settings to work
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2547 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-10 16:21:50 +00:00
cyberbotx 193ab9605b Disable Visual Studio warning 4100 (unreferenced formal parameter) during Windows build, otherwise we get thousands of completely harmless warnings which slow down the build process because they all have to be displayed.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2541 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-08 22:16:40 +00:00
Adam- 5d25bf4ac3 Removed OLDCHANGES from CMakes list of files to install, it doesn't exist anymore
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2540 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-07 22:42:02 +00:00
DukePyrolator dd3cce64c3 added a new event OnUserQuit, changed OnPartChannel and OnUserKicked to send the part/kick message and fixed OnUserNickChange
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2539 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-07 10:33:28 +00:00
Adam- fb5356ccbc Destroyed Command::help_param* and rewrote the help part of os_news to be much better
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2538 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-06 21:54:55 +00:00
Adam- 6ac61a1852 Fixed '/chanserv help set secure' responce
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2532 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-05 21:06:12 +00:00
Adam- 70918d2a01 Reset +r on registered channels after a netmerge when our creation time is newer than what we recieved (TS reop)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2531 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-04 21:54:35 +00:00
jantje_85 f553583f36 Fix bug #1109. Anopes now replies with proper PONGs to rfc compliant PINGs .
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2529 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-03 15:34:52 +00:00
jantje_85 b22091e8fa Fixed TIME on InspIRCd 1.2.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2528 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-03 13:47:15 +00:00
Adam- 651aacd3e9 Fixed a typo introduced in r2523 causing NickServ kill to not work
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2527 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-03 03:39:12 +00:00
jantje_85 d02f03a7a8 Forward port of bugfix #1097. CS FORBID now clears excepts & invites before banning everyone to avoid rejoin floods.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2526 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-03 00:54:51 +00:00
Adam- dc4b9afebb Properly remove old callbacks from modules internal list of callbacks list, and cleaned up some of the timers code
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2524 5417fbe8-f217-4b02-8779-1006273d7864
2009-10-02 22:19:19 +00:00
Adam- 85b409df85 Removed NS_IDENTIFIED/NS_RECOGNIZED/NS_ON_ACCESS from na->status, it doesnt belong there anymore and doesnt work. Replaced nick_recognized() with User::IsRecognized() which returns if youre recognized for the nick you are on, not necessarially the account youre logged in for.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2523 5417fbe8-f217-4b02-8779-1006273d7864
2009-09-30 21:50:32 +00:00
Adam- 383629d718 Fixed "make clean" to really clean up all the modules
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2522 5417fbe8-f217-4b02-8779-1006273d7864
2009-09-29 00:41:56 +00:00
Adam- f572827157 Removed old mod_version system for detecting module versions and replaced with the Module::GetVersion() function
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2521 5417fbe8-f217-4b02-8779-1006273d7864
2009-09-27 21:20:56 +00:00
Adam- 9d87b0f923 Fixed the remaining commands to always show all users help and to appear in the command list
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2520 5417fbe8-f217-4b02-8779-1006273d7864
2009-09-27 07:50:32 +00:00
Adam- 5695a8b595 Fixed bug #1108. nickserv status now replies correctly and has been changed to reply with a 3rd parameter which is for the account name the user is logged in as
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2519 5417fbe8-f217-4b02-8779-1006273d7864
2009-09-26 16:12:22 +00:00
Adam- 897f11e517 Clean up inspircd12.cpp from last commit
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2518 5417fbe8-f217-4b02-8779-1006273d7864
2009-09-26 16:12:08 +00:00
jantje_85 f17c36c031 We no longer use authentication tokens with InspIRCd 1.2.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2517 5417fbe8-f217-4b02-8779-1006273d7864
2009-09-26 14:49:06 +00:00
jantje_85 39960787de Fixed +r not being removed on netmerge from previously ID'd users who now using an unregged nick.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2516 5417fbe8-f217-4b02-8779-1006273d7864
2009-09-26 14:39:16 +00:00
jantje_85 43f85bf4f2 Fixed users not being validated if metadata is received, even though it s for a different nickgroup.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2515 5417fbe8-f217-4b02-8779-1006273d7864
2009-09-26 14:07:37 +00:00
jantje_85 8011cd4f0b Added missing part of #1107 patch. The last user to be introduced is now also validated.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2514 5417fbe8-f217-4b02-8779-1006273d7864
2009-09-26 12:52:08 +00:00
Adam- d8bd3afd76 Fixed bug #1107. We now have support for IRCds that send auth after the initial NICK/UID command, and automatically reidentifying users from their account name on InspIRCd1.2
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2513 5417fbe8-f217-4b02-8779-1006273d7864
2009-09-26 04:53:59 +00:00
Adam- 927d2717a9 Made User::CheckAuthenticationToken work properly when using any nick in a group
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2512 5417fbe8-f217-4b02-8779-1006273d7864
2009-09-26 04:53:48 +00:00
Adam- de7b668ad1 Removed the file name arg from MODULE_INIT
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2510 5417fbe8-f217-4b02-8779-1006273d7864
2009-09-20 00:40:14 +00:00
DukePyrolator 396cee7d0d partly fixed chanserv invite (it still sends the wrong message when inviting another user)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2509 5417fbe8-f217-4b02-8779-1006273d7864
2009-09-17 05:35:43 +00:00
Adam- fcf104f0ca Really not send unknown command messages on non-fantasy commands
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2508 5417fbe8-f217-4b02-8779-1006273d7864
2009-09-16 23:31:43 +00:00
Adam- 09b92517d0 Removed MOD_HEAD, MOD_TAIL, and MOD_UNIQUE constants
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2507 5417fbe8-f217-4b02-8779-1006273d7864
2009-09-16 23:27:34 +00:00
DukePyrolator e16a512699 don't send any error messages on unknown fantasy commands
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2506 5417fbe8-f217-4b02-8779-1006273d7864
2009-09-16 17:26:33 +00:00
Adam- 68592b0445 Removed command position from Module::AddCommand(), it is no longer used because of OnPreCommand/OnPostCommand
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2505 5417fbe8-f217-4b02-8779-1006273d7864
2009-09-15 21:00:51 +00:00
DukePyrolator 2ee049d7d8 fixed a small issue in inspircd12 support, introduced with the last commit
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2504 5417fbe8-f217-4b02-8779-1006273d7864
2009-09-14 17:48:13 +00:00
DukePyrolator b88a12f8e5 fixed inspircd12 support - now we send a TS6SID on BURST
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2503 5417fbe8-f217-4b02-8779-1006273d7864
2009-09-14 17:40:47 +00:00
Adam- f4cc123f16 Removed super admin requirement for operserv/umode operserv/oline and operserv/svsnick, and replaced with opertype command strings
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2502 5417fbe8-f217-4b02-8779-1006273d7864
2009-09-13 03:58:37 +00:00
DukePyrolator e3486a3e4b fixed a crashbug on /ns set kill. thanks to Phantomal for reporting.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2501 5417fbe8-f217-4b02-8779-1006273d7864
2009-09-12 18:39:07 +00:00
Adam- 5971c272be Made elist_match_user match against users cloaked hosts
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2500 5417fbe8-f217-4b02-8779-1006273d7864
2009-09-12 16:44:01 +00:00
cyberbotx cc64a00216 Fix problem with CMake's auto-library search when being run on a subdirectory of src/modules, spotted with help from DukePyrolator.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2499 5417fbe8-f217-4b02-8779-1006273d7864
2009-09-12 05:49:15 +00:00
Adam- 7ea66a37d5 Fixes bugs #1105 and #1106
Now properly track users host changes and keep users cloaked hosts saved in memory


git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2498 5417fbe8-f217-4b02-8779-1006273d7864
2009-09-12 03:32:47 +00:00
adam- 46030bbc7e Correctly send modes string when introducing psuedo clients on InspIRCd
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2497 5417fbe8-f217-4b02-8779-1006273d7864
2009-09-12 03:14:08 +00:00
Adam- 887c18a6bf Foward port of Vipers os_oline fix in r2495
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2496 5417fbe8-f217-4b02-8779-1006273d7864
2009-09-10 01:46:40 +00:00
Adam- 2f93b4225f Added the OnBotPreLoad event to fix introducing StatServ
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2494 5417fbe8-f217-4b02-8779-1006273d7864
2009-09-07 17:03:55 +00:00
Adam- 004d9c7b18 Fixed Makefiles to only suppress building when using run-cc.pl
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2493 5417fbe8-f217-4b02-8779-1006273d7864
2009-09-06 04:02:36 +00:00
Adam- 1f6eff371d Fixed the reply when an oper tries to view an unregistered nicks alist to be correct
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2492 5417fbe8-f217-4b02-8779-1006273d7864
2009-09-05 20:05:47 +00:00
Adam- a63502ff55 Change quit on kill value in inspircd1.2 protocol module to 0
This is actually an inspircd bug - only the uplink confirms KILLs with a QUIT, the other servers will not.


git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2490 5417fbe8-f217-4b02-8779-1006273d7864
2009-09-01 00:32:36 +00:00
jantje_85 1f2206159e Fixed segfault bug & check_modes() going insane over uninitialized variable.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2489 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-30 21:40:46 +00:00
cyberbotx 9900f83d94 Fix chanserv.c to compile after DEFCON changes.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2488 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-30 20:54:30 +00:00
Adam- 1b4aec7bda Add messages at the bottom of HELP telling you if you can/cant use the command and why, and what permission is required if there is one
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2487 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-30 20:46:07 +00:00
jantje_85 586c8a70f4 Forward port of several DEFCON fixes:
- Fixed defcon not setting modes on newly created unregged channels and failing to force remove defcon-locked modes. 
 - Fixed MLOCK locked mode removal getting priority over DEFCON locked mode setting.

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2486 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-30 20:29:57 +00:00
Adam- 0a6d617073 Fixed problem introduced in last commit
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2484 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-30 07:00:37 +00:00
Adam- 1348ef100e Properly keep track of services enforcer clients internally, they should now quit when theyre supposed to!
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2483 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-30 05:20:09 +00:00
Adam- bcffb94eaa Fixed an uninitialized variable in Timers that could make NickServCollide fail
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2482 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-30 03:09:08 +00:00
adam- 7161edab00 Replaced all references in the lang files of services admins and roots to services oper
Removed all of the "Limited to X" messages, and more unused language strings


git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2481 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-29 04:13:26 +00:00
adam- 03d3216cfe Removed OPER_HELP_OPER and OPER_HELP_ADMIN help entries, they are no longer used
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2478 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-28 22:15:23 +00:00
adam- 56a6cea0d5 Fixed idle time and signon time when whoising services clients on inspircd1.2
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2470 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-24 22:40:49 +00:00
pimpmylinux 3b7174319a fixed typo. i apologize for being an idiot, i promise i will test even oneliners next time...
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2469 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-24 19:41:37 +00:00
pimpmylinux 1242eb5dc9 oops, sorry :(
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2466 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-24 19:27:57 +00:00
pimpmylinux b0caa94985 fixed trying to delete sessions when a ulined server quits
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2465 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-24 19:22:32 +00:00
cyberbotx 4a91b12221 Really fix running Anope from another directory besides bin, and also fix running it from bin (apparently gdb makes the 0 argument in main() the full path, but outside gdb it's not the full path).
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2463 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-23 21:50:55 +00:00
cyberbotx c15707a018 Fix bug with User::SetRealname crashing when a user with a custom GECOS connects.
Fix handling of Anope's current directory, binary name, binary directory, and data directory. This also fixes using /os restart if run from outside the bin directory.
(The second fix above is a little hackish, should look into cleaning it up later.)

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2462 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-23 18:58:13 +00:00
DukePyrolator 4bf22fa2e6 added more events
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2461 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-22 04:39:22 +00:00
adam- bcf9852eec Fixed bug #1095, do not resend client introduction when using /botserv bot add and initialized chancount in BotInfo constructor
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2460 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-21 20:55:20 +00:00
cyberbotx a17d3dc27e Partial revert of r2449, my_memo_lang shouldn't have a char * parameter, const char * works just fine.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2459 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-21 19:38:10 +00:00
cyberbotx 0f3110e271 Fix build under Windows.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2458 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-20 02:49:09 +00:00
cyberbotx 6ce5c90619 Add a few items to outstanding issues in TODO, clean up a lot of warnings (not all, some require more widespread changes than this), and fix a few potential bugs.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2457 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-19 23:13:30 +00:00
DukePyrolator 6c62e39680 fixed a possible crashbug on botserv help set
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2455 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-19 19:54:10 +00:00
pimpmylinux 7916c7f393 updated italian nickserv and chanserv strings, more to come
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2454 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-19 14:12:51 +00:00
adam- 8d247130d4 Fixed a crash when using commands if HostServ is disabled
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2453 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-19 01:54:13 +00:00
adam- 89e05fb880 Changed /nickserv id to allow you to switch accounts without logging out first and /nickserv logout to log you out of your account and not check the nick
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2452 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-15 01:15:21 +00:00
adam- ece55718e7 Set -r on nick change if appropriate and make nick tracking work correctly
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2451 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-15 01:05:52 +00:00
adam- b9bf72c457 Set the correct opertypes on newly registered users
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2450 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-12 23:52:25 +00:00
DukePyrolator 577870bb45 fixed a crashbug on /hostserv activate
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2449 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-12 03:56:44 +00:00
rburchell 6b8728428b Make this really work now. Promise. serv_uplink double setting needs to go away in the future.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2447 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-09 11:19:45 +00:00
rburchell 4d52274432 Introduce clients when we first see the uplink (i.e. successfully connected), not when the uplink has finished synchronising.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2446 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-09 11:03:41 +00:00
rburchell 9464b59137 Merge do_restart_services and services_restart().
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2445 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-08 17:18:21 +00:00
rburchell d5cf78e6f7 Remove fatal_sockerror(), as nothing actually uses it.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2444 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-08 17:18:02 +00:00
rburchell eeb7c9c36d Also make use of synched state to introduce pseudoclients instead of blindly introducing them on connect.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2443 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-08 16:39:51 +00:00
rburchell 862011a3ee Actually, make use of it now. Pseudoclients are introduced automatically if synched with uplink.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2442 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-08 16:39:36 +00:00
rburchell 4e76d13428 Remove SSYNC_UNKNOWN. All IRCds can report sync state, and for those that _really_ can't, we can find out via PING/PONG exchange anyway. We will be making use of sync state more shortly.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2441 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-08 16:39:14 +00:00
rburchell 51d869db57 ENDBURST support for inspircd(11|12).
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2440 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-08 16:38:39 +00:00
DukePyrolator 64132f67c0 fixed a crashbug when adding a new botserv bot
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2439 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-08 12:45:20 +00:00
adam- 43d72713c5 Fixed some problems with sepstream when parsing one char tokens
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2436 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-08 04:06:03 +00:00
adam- 8df2076024 Clean up some of inspircds autoid code and make it not resend account name on nick change
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2435 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-06 22:04:47 +00:00
sjaz ec398f6a55 Split off troubleshooting into its own file from FAQ and linked to the wiki for updates. (Thanks again Amanda)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2433 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-06 19:00:42 +00:00
sjaz b6deabc55a Updated FAQ to point to wiki for easy ongoing maintenance.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2432 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-06 19:00:10 +00:00
sjaz dc261d9291 Missed pt.l in (Fixed wording in short description of CHANKILL from OS HELP)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2431 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-06 17:55:08 +00:00
sjaz 712b4a16be Fixed wording in short description of CHANKILL from OS HELP except in ru.l because it's scary. (Thanks Taros!)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2429 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-06 17:49:48 +00:00
sjaz c31e267403 Remove legacy windows installer scripts not used on 1.9 & obsolete epona2anope converter.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2427 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-06 17:15:55 +00:00
sjaz 0abb809226 Fix Makefile/CMakeLists.txt with the removal of mydbgen
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2426 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-06 17:09:06 +00:00
sjaz 3d2621349c Removed unused MySQL files and am.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2425 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-06 16:58:06 +00:00
sjaz 8d621a71c9 dos2unix a couple more files.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2424 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-06 16:55:33 +00:00
sjaz 761d90e1d7 unix2dos docs/README to appease Windows.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2423 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-06 16:52:57 +00:00
sjaz c72a70ffaf dos2unix'd src/wildcard.cpp - Time to check for others!
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2422 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-06 16:45:21 +00:00
sjaz 05942ff9bc dos/mac2unix'd docs/README and FAQ.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2421 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-06 16:41:17 +00:00
sjaz 20b3c6437b Truncated version.log to remove 1.7/1.8 stuff.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2420 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-06 16:37:35 +00:00
sjaz 24a5bdf0e7 Updated FAQ to point to real URL. Thanks Amanda. <3
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2419 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-06 16:33:06 +00:00
sjaz f28fa07f3b Updated docs/README removing unsupported IRCDs on 1.9
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2418 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-06 16:31:40 +00:00
sjaz 1cc976960b Updated docs/NEWS removing old 1.7/1.8 stuff for 1.9
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2417 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-06 16:29:56 +00:00
sjaz a4bbe9908d Removed docs/OLDCHANGES because it refers to 1.6/1.7 stuff not relevant to 1.9.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2416 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-06 16:27:06 +00:00
sjaz 1fc8b1dd60 Updated docs/MYSQL with 1.9 MySQL state of play.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2415 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-06 16:23:43 +00:00
sjaz 85515696e3 Removed nicktracking from example config.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2414 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-06 16:08:07 +00:00
sjaz 0b92ee8d30 Updated Changes.* to remove legacy branch/irrelevant stuff.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2413 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-06 16:07:34 +00:00
sjaz 0fef23470c Fix path to anope binary in example.chk
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2412 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-06 15:43:10 +00:00
sjaz 03f03a91ae Minor typo fixes in example.conf
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2411 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-06 15:40:06 +00:00
DukePyrolator 1c33521c69 do not set mode +d on identify on inspircd
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2410 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-06 04:49:06 +00:00
adam- 52f55ef9a0 Reset +r on change to grouped nick
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2409 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-05 22:18:39 +00:00
adam- 06c26d468c Remove unneeded escapes on characters in lang files
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2408 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-05 22:14:03 +00:00
adam- 45a35e61eb Fix for bug #1091, HELP can crash without optional services clients
enabled


git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2407 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-04 19:31:47 +00:00
adam- 9801065683 Fixed two typos in bots.cpp that could cause crashes
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2405 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-04 16:37:02 +00:00
adam- ce664a160b Fixed autoid
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2404 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-04 01:56:14 +00:00
adam- 0d7e0274a4 Fix a crash in the ratbox protocol module when Numeric is not defined in the conf
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2403 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-03 23:42:20 +00:00
adam- b8b891cc25 Fixed some memory leaks when setting vhosts on users
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2399 5417fbe8-f217-4b02-8779-1006273d7864
2009-08-01 08:16:27 +00:00
adam- bec179c197 Removed some now unneeded and unused language strings
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2396 5417fbe8-f217-4b02-8779-1006273d7864
2009-07-31 08:02:37 +00:00
adam- 10be3e9bb5 Fixed multiple problems with session tracking, read comments in users.c and sessions.c for more info
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2393 5417fbe8-f217-4b02-8779-1006273d7864
2009-07-26 22:29:37 +00:00
cyberbotx b2a57b0974 Changed params parameter of Command's Execute() from std::vector<std::string> to std::vector<ci::string>, seems to have no ill effects but may require some testing to be sure.
Also a few minor cleanups here and there.

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2392 5417fbe8-f217-4b02-8779-1006273d7864
2009-07-25 00:37:43 +00:00
cyberbotx 443654f15b Changed subcommand parameter of Command's OnHelp() from std::string to ci::string, allows sub-help (like NS SET PASSWORD) to be called without requiring the subcommand to be sent by the user in all caps.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2391 5417fbe8-f217-4b02-8779-1006273d7864
2009-07-24 01:47:47 +00:00
cyberbotx 99fe46de55 Implement case-insensitive versions of std::string, irc::string for RFC-style case-insensitivity and ci::string for ASCII-style case-insensitivity, code from InspIRCd. Not yet used, but adding it in to use with the help system initially.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2390 5417fbe8-f217-4b02-8779-1006273d7864
2009-07-24 01:11:49 +00:00
adam- 6a975740b3 Fixed multiple issues with os_info, including changing the /cs oinfo syntax to work with the new fantasy system
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2389 5417fbe8-f217-4b02-8779-1006273d7864
2009-07-21 20:54:17 +00:00
adam- f8efdbf822 Added a new event for channels being deleted
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2388 5417fbe8-f217-4b02-8779-1006273d7864
2009-07-21 20:52:29 +00:00
DukePyrolator 55d4d6084e added 9 new events
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2387 5417fbe8-f217-4b02-8779-1006273d7864
2009-07-21 03:32:49 +00:00
cyberbotx cbec05c428 Fix for potentially undefined behavior in the Windows build, make the overloaded delete and delete[] operators check if the pointer is NULL before trying to use HeapFree(), thanks to Adam for pointing this out.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2385 5417fbe8-f217-4b02-8779-1006273d7864
2009-07-19 07:24:57 +00:00
adam- 906580a463 Fixes a crash when renaming NickServ
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2384 5417fbe8-f217-4b02-8779-1006273d7864
2009-07-18 19:32:24 +00:00
adam- e0828bf69b Fix a bug when trying to set BotServ bots as private
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2383 5417fbe8-f217-4b02-8779-1006273d7864
2009-07-17 20:23:59 +00:00
adam- 49f1b9bc49 Fixed core clients to rejoin their assigned channels if killed
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2382 5417fbe8-f217-4b02-8779-1006273d7864
2009-07-16 09:12:23 +00:00
adam- 81d05eb8a7 Initialize botinfo->flags on bot creation to fix some database problems
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2381 5417fbe8-f217-4b02-8779-1006273d7864
2009-07-16 09:01:01 +00:00
adam- 17a09abb6d Fixed crashes when an unidentified users nickcore gets deleted
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2380 5417fbe8-f217-4b02-8779-1006273d7864
2009-07-16 03:51:00 +00:00
adam- 57e66618e7 Fixed ns_info to show opertype line when hidestatus is off
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2379 5417fbe8-f217-4b02-8779-1006273d7864
2009-07-15 19:53:14 +00:00
adam- 23c654519c Fixed elist_match_user to check against vhosts, patch from sergio
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2377 5417fbe8-f217-4b02-8779-1006273d7864
2009-07-12 19:53:26 +00:00
adam- e669382cab Updated Polish language file, thanks to Szymek
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2375 5417fbe8-f217-4b02-8779-1006273d7864
2009-07-11 18:54:05 +00:00
sjaz 4c244b5e06 Updated README
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2373 5417fbe8-f217-4b02-8779-1006273d7864
2009-07-11 13:15:37 +00:00
adam- 9a9d93e9f0 Added ChanServ HELP CLEAR INVITES to documentation
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2366 5417fbe8-f217-4b02-8779-1006273d7864
2009-07-10 05:33:34 +00:00
adam- 1d53afee3f Remove channel founder status from users who logout
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2363 5417fbe8-f217-4b02-8779-1006273d7864
2009-07-06 17:43:30 +00:00
adam- d75238496b Made pre-command channel sanity checks only apply to ChanServ and BotServ. Its not needed elsewhere and just causes issues
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2361 5417fbe8-f217-4b02-8779-1006273d7864
2009-07-06 07:27:16 +00:00
adam- 4d19a783bd Really fix bug #1088
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2355 5417fbe8-f217-4b02-8779-1006273d7864
2009-07-02 19:02:35 +00:00
DukePyrolator bd6a593b6c reverted last commit
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2354 5417fbe8-f217-4b02-8779-1006273d7864
2009-07-02 19:00:54 +00:00
DukePyrolator d68b3c3b6d fix for bug #1088 (missing check for null pointer). thanks to Obi_Wan for reporting
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2353 5417fbe8-f217-4b02-8779-1006273d7864
2009-07-02 16:36:26 +00:00
adam- e8c63b5f43 Fixed some spelling errors in Config
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2352 5417fbe8-f217-4b02-8779-1006273d7864
2009-07-01 19:37:22 +00:00
DukePyrolator da8ccdad19 fixed segfault on /nickserv logout <nick>
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2351 5417fbe8-f217-4b02-8779-1006273d7864
2009-07-01 17:59:42 +00:00
DukePyrolator d81068abc4 fix for bug #1087. thanks to Obi_Wan for reporting and testing.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2350 5417fbe8-f217-4b02-8779-1006273d7864
2009-07-01 17:36:48 +00:00
rburchell 5a9dd79ae8 Shuffle TODO, move a number of items from planned to 'future' stage to be a little more realistic. This scales down .1 and .2 to achievable chunks.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2349 5417fbe8-f217-4b02-8779-1006273d7864
2009-06-30 19:41:33 +00:00
rburchell 6609f829f4 Example configuration for opertypes and oper blocks, initial version written by DukePyrolator with a little refinement and addition by me.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2348 5417fbe8-f217-4b02-8779-1006273d7864
2009-06-30 19:32:54 +00:00
rburchell 8dc849d8de No real need for another constant
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2347 5417fbe8-f217-4b02-8779-1006273d7864
2009-06-30 19:32:16 +00:00
adam- 8c82d30112 Rename chanserv/access/change to chanserv/access/modify
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2346 5417fbe8-f217-4b02-8779-1006273d7864
2009-06-30 19:25:57 +00:00
cyberbotx 77ad2c101c Possible fix for issue with RequiredLibraries comment check in CMake generation.
Also include extra question in Config to ask for extra arguments to the build tool used.

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2345 5417fbe8-f217-4b02-8779-1006273d7864
2009-06-29 20:04:09 +00:00
adam- 7cf236ef51 Made globaloncycleup message and OnServerConnect use the correct server
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2344 5417fbe8-f217-4b02-8779-1006273d7864
2009-06-29 06:18:30 +00:00
DukePyrolator 670f87a22a removed include/encrypt.h from the Makefiles
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2343 5417fbe8-f217-4b02-8779-1006273d7864
2009-06-29 05:20:00 +00:00
DukePyrolator 15687a7c9e changed encryption modules to use the new module API
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2342 5417fbe8-f217-4b02-8779-1006273d7864
2009-06-29 04:47:00 +00:00
adam- 712cbb540c Add ability for fantasy to be disabled for some commands and strip the channel name from them
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2341 5417fbe8-f217-4b02-8779-1006273d7864
2009-06-28 18:49:07 +00:00
cyberbotx 108cf5e60d Possible bugfix for bug #1086, specifically the issue with the inspircd12 sending ADDKILL from the servername instead of a SID or UID and with a negative expire time.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2340 5417fbe8-f217-4b02-8779-1006273d7864
2009-06-27 18:28:26 +00:00
adam- 6b9c0fe4d9 Fixed cs_getkey to not require services oper
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2339 5417fbe8-f217-4b02-8779-1006273d7864
2009-06-27 02:11:33 +00:00
adam- 6b5786aa37 Changed module callbacks to use new Timer API
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2338 5417fbe8-f217-4b02-8779-1006273d7864
2009-06-26 20:01:26 +00:00
adam- dc8f7923f4 Adds check for using commands on non-registered channels before the
commands are called


git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2336 5417fbe8-f217-4b02-8779-1006273d7864
2009-06-23 16:56:38 +00:00
adam- 59c1a509b4 Fix for bahamut protocol module to get the users IP when new users are introduced
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2335 5417fbe8-f217-4b02-8779-1006273d7864
2009-06-23 08:22:06 +00:00
cyberbotx dc65eca3d8 Update TODO to show timers having been redone thanks to Adam.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2334 5417fbe8-f217-4b02-8779-1006273d7864
2009-06-21 19:10:36 +00:00
sjaz 01b831c4c6 Fixes broken langfiles for NS HELP REGISTER (Cheers Adam-the-Awesome!)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2333 5417fbe8-f217-4b02-8779-1006273d7864
2009-06-20 22:28:24 +00:00
sjaz 28d77b7ebe Fixes multiple issues with HELP with non-identified nicks. (Thanks Adam!)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2332 5417fbe8-f217-4b02-8779-1006273d7864
2009-06-20 22:27:44 +00:00
sjaz b81d902a2e Fixes issue with /NS INFO with non-identified users. (Thanks Adam!)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2331 5417fbe8-f217-4b02-8779-1006273d7864
2009-06-20 22:27:06 +00:00
sjaz 9eea1444fa Fixes issue with /NS CONFIRM with non-registered nicks. (Thanks Adam)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2330 5417fbe8-f217-4b02-8779-1006273d7864
2009-06-20 22:26:30 +00:00
cyberbotx 1ee6c20e1e Initialize the Bot flags value inside of BS BOT, fixes problem with BotServ bots on database load, patch by DukePyrolator.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2328 5417fbe8-f217-4b02-8779-1006273d7864
2009-06-20 04:58:58 +00:00
cyberbotx 157dfbd5c6 Fix memory leak in NS SUSPEND, patch by Adam.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2326 5417fbe8-f217-4b02-8779-1006273d7864
2009-06-15 20:25:08 +00:00
cyberbotx 2cc4ace60b Forward port of bugfix for bug #1082 from SVN r2322, 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/trunk@2323 5417fbe8-f217-4b02-8779-1006273d7864
2009-06-12 03:11:29 +00:00
cyberbotx fc78e51452 Make stristr() const-safe, replace post-increment on iterators with pre-increment, remove now unused variables, made my_memo_lang() in hs_request.c const-safe.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2320 5417fbe8-f217-4b02-8779-1006273d7864
2009-06-11 20:28:06 +00:00
rburchell 8fa6752858 Cleanup of internals of new opertype stuff by Adam. Removes OS OPER and OS ADMIN, changes OS STAFF to be more helpful in their place.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2319 5417fbe8-f217-4b02-8779-1006273d7864
2009-06-11 10:16:35 +00:00
cyberbotx a68b5efe27 Added missing timers.h and timers.cpp from Adam, removed timeout.h and timeout.c.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2318 5417fbe8-f217-4b02-8779-1006273d7864
2009-06-11 00:01:08 +00:00
rburchell 695644d0c4 New timer infrastructure, can be used inside modules. Replaces old ENFORCE/COLLIDE/inhabit timers, too. Patch by Adam.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2317 5417fbe8-f217-4b02-8779-1006273d7864
2009-06-10 22:29:59 +00:00
cyberbotx c8c89c7af0 Remove events.h, should have been deleted in earlier patch to replace events system with the new one.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2315 5417fbe8-f217-4b02-8779-1006273d7864
2009-06-09 03:15:38 +00:00
rburchell 9ff6ed2430 New events stuff, patch totally by Adam (aka Awesome).
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2313 5417fbe8-f217-4b02-8779-1006273d7864
2009-06-06 23:33:23 +00:00
sjaz 2eae738083 Patch to fix issue with /CS INFO (Thanks Adam)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2312 5417fbe8-f217-4b02-8779-1006273d7864
2009-06-05 16:06:48 +00:00
cyberbotx 6bed75b41f Fix issue with using static_cast instead of reinterpret_cast for Extensible, allows for more than just char pointers to be used for Extensible.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2311 5417fbe8-f217-4b02-8779-1006273d7864
2009-06-03 22:14:19 +00:00
cyberbotx 426f72117b Fix bug #1080, changing core pseudo-client nicks in the config should register the change when the bots are brought back online, patch from Adam.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2310 5417fbe8-f217-4b02-8779-1006273d7864
2009-06-03 20:29:33 +00:00
sjaz affc29aca5 Typo fix in ./Config
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2309 5417fbe8-f217-4b02-8779-1006273d7864
2009-06-03 15:51:46 +00:00
cyberbotx 3bd357725a Add SendSWhois() to inspircd12.cpp, patch by Adam.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2306 5417fbe8-f217-4b02-8779-1006273d7864
2009-05-31 03:01:07 +00:00
cyberbotx 08b3ef7d4e Remove now unneeded checks for identified nick, patch by Adam.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2305 5417fbe8-f217-4b02-8779-1006273d7864
2009-05-30 00:44:21 +00:00
cyberbotx deeec4fbf1 Typo fixing, spotted by DukePyrolator.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2304 5417fbe8-f217-4b02-8779-1006273d7864
2009-05-26 04:33:44 +00:00
cyberbotx 7e8a7fc598 Make sure the .svn folder is removed when checking src/modules for subdirectories, spotted by DukePyrolator.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2303 5417fbe8-f217-4b02-8779-1006273d7864
2009-05-26 04:26:35 +00:00
cyberbotx c1bc7cbafc Added ability for CMake to build a module from a subdirectory of src/modules.
Added calculate_libraries() CMake macro to condense library checking in CMakeLists.txt in src/modules.
Fixed slight problem with strip_string() macro call in root CMakeLists.txt.

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2302 5417fbe8-f217-4b02-8779-1006273d7864
2009-05-25 18:58:51 +00:00
sjaz 3fa978c958 Fix from Adam for a segfault in /NS ALIST
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2300 5417fbe8-f217-4b02-8779-1006273d7864
2009-05-16 09:35:39 +00:00
sjaz 1f48897042 Patch to allow jupe on all bar uplink and self. Thanks Adam. (Bug #1076)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2298 5417fbe8-f217-4b02-8779-1006273d7864
2009-05-08 15:10:52 +00:00
cyberbotx feab2cb854 Move where command permission checking is done, patch by Adam.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2296 5417fbe8-f217-4b02-8779-1006273d7864
2009-05-07 23:59:11 +00:00
sjaz 2d050edb4e Fix link to Link Block Generator on our site. Good find whoever it was :)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2295 5417fbe8-f217-4b02-8779-1006273d7864
2009-05-07 17:35:41 +00:00
cyberbotx dc102049b0 Adds check for opertype permissions to mod_run_cmd() in commands.c, and adds optional parameter to Command class constructor that takes the opertype permissions for the command.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2292 5417fbe8-f217-4b02-8779-1006273d7864
2009-05-05 22:26:41 +00:00
sjaz 845b15ddd9 Fix segfault in /os chankill (Adam)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2291 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-26 16:40:36 +00:00
sjaz b9d2e9c092 To document the use of /ms set notify mail and nomail. (Backported to 1.8 in r2289) (Adam)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2290 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-26 16:40:06 +00:00
sjaz 49512f902c Patch to rectify Syntax output from langfiles. (Adam)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2288 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-22 18:12:36 +00:00
cyberbotx 3a6a3330ac Fix crash if NS SET <anything> was used without a parameter, spotted and patched by Adam.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2286 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-19 22:36:08 +00:00
jantje_85 086ae2c6ce Forward Port of r2284: Don't enfoce akick/forbidden/etc.. settings on clients on ulined servers.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2285 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-17 22:48:13 +00:00
rburchell 3e9bd7583c Check Command::permission in command handler.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2283 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-16 20:29:21 +00:00
rburchell fc4f89e079 Add Command::SetPermission member to centralise access checking. Remove duplicated comments at the same time.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2282 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-16 20:28:52 +00:00
rburchell 723e3f2ce0 PERMISSION_DENIED -> ACCESS_DENIED string.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2281 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-16 20:28:21 +00:00
rburchell 89883ac325 Remove finished extra
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2280 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-16 20:26:43 +00:00
rburchell 89850c85a9 Remove unused modules_unload_all fini param
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2279 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-16 20:26:24 +00:00
cyberbotx d8e1f104a4 Show proper syntax errors on CS BAN and CS KICK, patch from Adam.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2278 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-16 02:18:07 +00:00
cyberbotx 76e83f613b Remove 2 unneeded ternary operators, the result is the same with or without them, patch from Sergio.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2275 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-13 19:07:49 +00:00
cyberbotx 22b53ec9cd Correct help for CS INFO and add syntax errors for cs_modes, patch from Adam.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2274 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-13 00:35:55 +00:00
cyberbotx dccb56a496 Copy Extensible::GetExtList() from InspIRCd, patch from DukePyrolator, plus 2 small cosmetic tweaks.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2273 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-12 05:08:59 +00:00
cyberbotx 1787a8ac27 Remove files from the modules runtime directory on startup, just in case files were left behind during a previous run. Suggested by DukePyrolator and Namegduf.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2271 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-11 06:55:40 +00:00
cyberbotx a2b1284aac Fix more problems with help, patch from Adam.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2270 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-10 02:16:07 +00:00
cyberbotx 7b6a109100 Added missing help to BS ACT, patch from Adam.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2269 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-10 01:52:09 +00:00
cyberbotx 56464bbdd8 Fix crash in mod_help_cmd when a non-existing command is looked up, spotted by Adam.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2268 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-10 00:10:27 +00:00
cyberbotx 87ecbec79d Remove all remaining uses of (My)SQL from the code.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2267 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-07 05:31:14 +00:00
cyberbotx 578da38d30 Replace Set*Help() functions with virtual *ServHelp() functions that can be overriden in a module's Module class. Patch from Adam.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2266 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-06 21:25:56 +00:00
sjaz fbb1ab9246 Patch to make changing bots not send multiple QUIT commands (Thanks Adam).
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2265 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-06 16:40:07 +00:00
sjaz cd034d6935 Patch to allow NS CONFIRM and NS RESEND to be used by non identified users. (Thanks Adam)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2264 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-06 16:37:02 +00:00
sjaz af85de47c7 [#1039] Patch to update documentation on CS RESTRICTED to reflect historical behaviour. FORWARD PORT from 1.8. (Thanks Adam for both!)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2263 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-06 16:32:40 +00:00
cyberbotx 178def8291 Remove is_services_admin() check from cs_enforce to allow build to succeed.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2261 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-04 02:38:38 +00:00
cyberbotx 9f20b2f7dd Removed is_host_setter() and is_host_remover() from code and replaced them with opertype priv "hostserv/set", removed <hostserv:hostsetters> from configuration.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2260 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-04 01:27:18 +00:00
rburchell df627065ac Marking these volatile isn't a lot of use, and it is confusing.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2259 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-04 01:15:13 +00:00
rburchell ad77b5ee2d Remove various uneeded priv checks.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2258 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-04 01:09:07 +00:00
rburchell 146ecc2fbb Remove is_services_* methods.. this forces us to actually remove uses of them.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2257 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-04 00:52:25 +00:00
rburchell 36f523249a Fix access checking in core
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2256 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-04 00:49:50 +00:00
rburchell b0b8e70442 Fix access checking on ns_*
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2255 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-04 00:49:11 +00:00
cyberbotx 2dba060c6a Patch from DukePyrolator to include an OnUserNickChange() event to replace EVENT_CHANGE_NICK, also patch from me to have the ratbox protocol module send account data on login and logout.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2254 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-03 21:16:33 +00:00
cyberbotx a7316c1770 Fix ratbox protocol to use TS6SID for sending (UN)RESV, and fix m_privmsg to correctly find the core pseudo-clients if the IRCd sends a UID instead of a nick.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2252 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-03 18:36:10 +00:00
rburchell a6f0b5e8d4 Don't generate UID twice in ratbox protocol module. This is a leftover from before the core generated UIDs.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2248 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-03 17:37:15 +00:00
cyberbotx 821c6ac90b Reintroduce sending login/logout account messages, they were added back in SVN r1944 but went poof with the command API change.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2247 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-03 06:53:40 +00:00
cyberbotx aab6dad14f Fix compile error in ru.l due to lack of tabs in an earlier commit.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2246 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-03 06:01:56 +00:00
cyberbotx 6280432bc7 Fix bug #1047, patch from Adam, fixes documentation of CS CLEAR OPS.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2244 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-03 02:50:14 +00:00
cyberbotx 6d97b7f8f9 Fix bug #1045, patch from Adam, suspended channels can no longer be administered, and control over checking forbidden and suspended channels has been moved out of the modules and into the core.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2243 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-03 02:42:06 +00:00
cyberbotx c6ef1e0390 Added service argument to OnPreCommand, added OnPostCommand event, changed the following modules to use On[Pre|Post]Command instead of hooking into existing commands: hs_request, ns_maxemail, and os_info.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2242 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-03 00:16:15 +00:00
rburchell 48ef6617ac Remove capability for commands to hook existing commands, add an OnPreCommand event instead. Tidies up a lot of stuff. Also remove a bunch of dead code.
NOTE: This will break some stuff.

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2241 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-02 22:59:27 +00:00
rburchell ef400fa6dc Remove restrictgetpass option from the conf
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2239 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-02 20:35:44 +00:00
rburchell 93baed333f Remove rootmodeonid, opermodeonid, adminmodeonid - unused, and utterly useless/bad.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2238 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-02 20:33:28 +00:00
rburchell e9e5ccc891 Remove NSRestrictGetPass, and replace it with opertype usage.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2237 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-02 20:27:47 +00:00
rburchell d37f569188 More miscellaneous bits.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2236 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-02 20:24:08 +00:00
rburchell a39137e271 Fix up a bunch of access checking to be a bit more modern and so on
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2235 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-02 20:21:43 +00:00
rburchell 25050df434 Apparantly I forgot to update some language files.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2234 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-02 20:18:22 +00:00
rburchell b79c68d829 Change some stuff to use NC::IsServicesOper instead of is_services_*.
Remove some unused language strings also.

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2233 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-01 23:32:06 +00:00
rburchell 6712748378 Boink.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2232 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-01 20:07:47 +00:00
rburchell 3cdca9e47a Replace nick_is_* checking of static userlevels with NickCore::IsServicesOper, which just confirms they have *an* opertype.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2231 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-01 19:56:40 +00:00
cyberbotx e57feb4ef6 Removed NICK_INFO_SERVICES_[OPER|ADMIN|ROOT] from the language files and added NICK_INFO_SERVICES_OPERTYPE to them. NOTE: This will break compiling until the removed language strings are replaced in ns_info.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2230 5417fbe8-f217-4b02-8779-1006273d7864
2009-04-01 19:55:01 +00:00
cyberbotx 4ef30a4de9 Fix compile error in servers.c.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2229 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-31 17:03:50 +00:00
rburchell 76755725e5 These are (now) horribly out of date. When we're ready to implement what ones we need, we can grab them back out of SVN (or more likely just do them from scratch..)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2228 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-31 14:51:27 +00:00
rburchell 8a01e21a48 Send snotice after connecting to the network. Also change OnServerConnect to take Server*, not a name.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2227 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-31 14:44:33 +00:00
rburchell ab9c1e4651 Fix ss_main's client introduction.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2226 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-31 14:43:04 +00:00
cyberbotx fdfc12f398 Detach all module hooks when a module is unloaded, patch from DukePyrolator, thanks for spotting this!
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2225 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-30 18:27:01 +00:00
rburchell ba8f609eb0 Yet *neither* send HOST_OFF here..
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2224 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-30 10:08:36 +00:00
rburchell 114b2d4989 Needed to apply this to 1.2 too, oops.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2223 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-30 10:07:50 +00:00
rburchell 2d270cd0bf Forward-port Szymek's vhost patch.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2222 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-30 10:00:58 +00:00
cyberbotx 89c2c02904 Fix bug #1073, fantasy commands in CTCP ACTIONs will now be ignored instead of processed.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2217 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-30 06:15:58 +00:00
sjaz 6245821dfe #1042 Fix for CS SUSPEND/FORBID so that it doesn't act upon opers on rejoin. Thanks Adam.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2216 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-29 21:15:15 +00:00
sjaz 0430fbf861 #1058 Patch to fix HS REQUEST memo to include ident. Thanks Adam.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2215 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-29 21:12:09 +00:00
cyberbotx 007b73e5a9 Fix bug #1036, patch from Adam, correct the kick reason used when a channel is forbidden or suspended without a reason.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2214 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-28 16:22:49 +00:00
cyberbotx 7ec6b68e84 Fix bug #1032, patch from Adam, the help for CS GETKEY has been condensed and the return result of the command is a human-readable string.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2213 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-28 15:42:14 +00:00
rburchell 7a92feb474 Regenerate UID on BOT CHANGE, don't try reuse an existing one.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2212 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-27 23:03:21 +00:00
rburchell 601c546957 Fix protocol violation error.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2211 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-27 22:53:16 +00:00
sjaz 3f57c91613 Bug #1061 - Fixed minor typo in English Langfile.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2210 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-27 20:16:56 +00:00
cyberbotx 3d4fb90353 Fix potential crash problem with use of free() instead of delete[] from earlier bugfix of bug #1054, also remove item for * help set from TODO as it's been fixed.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2209 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-27 15:56:16 +00:00
cyberbotx 5c325b5d12 Slight cleanup on TODO, move item about oper flags into 1.9.1 and move the ?'s inside the brackets for consistency.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2208 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-26 03:48:50 +00:00
cyberbotx 60b18508e0 Fix problem with CMake under Windows, spotted by therock247uk on the forums, CMake now checks for the environment variable VCINSTALLDIR (only set in the Visual Studio command prompt) and also fixes the check for #ifndef.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2207 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-25 17:36:47 +00:00
cyberbotx 8fc031fb84 Fix bug #1009, patch inspired by DukePyrolator, add a TS6 SID generator from DukePyrolator, as well as change SendServer() to take a Server struct and use the result of new_server() in the SendServer() call instead.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2206 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-25 16:12:24 +00:00
cyberbotx d8c4e705a2 Fix bug #1066, language strings for NICK_SET_HIDE_SYNTAX, NICK_SASET_HIDE_SYNTAX, NICK_HELP_SET_HIDE, and NICK_HELP_SASET_HIDE all show STATUS as a choice now.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2205 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-24 01:38:27 +00:00
cyberbotx 3495e8a575 Fix parameters of NS SET within ns_maxemail so it doesn't break ns_set's version of it.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2204 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-24 01:24:04 +00:00
cyberbotx b7a995c1f1 Allow a core Service's ident, host, and real name to be changed, but disallow changing their nicks. Fixes the BS BOT CHANGE part of bug #1070.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2203 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-23 21:59:11 +00:00
cyberbotx 807770c40a Patch from Adam, fixes logging and notices regarding recent channel access list change.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2202 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-23 21:07:30 +00:00
cyberbotx b3eeb815b6 Replace manually allocated array for NickCore's access list with an std::vector, cleans up the code and provides a more sane interface, also fixes bug #1023 in the process.
Also add missing help for NS ACCESS.

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2201 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-23 21:05:29 +00:00
cyberbotx da43e02228 Partial fix for NS REGISTER not displaying syntax error if only 1 argument is given, not completely fixed due to how OnSyntaxError is called, problem spotted by DukePyrolator, thanks!
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2200 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-23 18:30:30 +00:00
cyberbotx ca28b7c1b3 Patch from DukePyrolator, allow unregistered users to use NS GROUP.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2198 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-23 05:07:52 +00:00
cyberbotx da4ce1788f Patch from DukePyrolator, only show the message about using NS INFO ALL if the user hasn't used NS INFO ALL.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2197 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-23 05:07:43 +00:00
cyberbotx 190a3de3b9 Fix bug #1044, 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/trunk@2195 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-23 04:54:30 +00:00
cyberbotx ce09914e1d Fix part #2 of bug #1010, patched partially by Adam and cleaned up / finished by me, the help commands should work as expected now, including "help set ..." and similar help entries.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2194 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-23 04:29:25 +00:00
cyberbotx 656cc9973e Fix bug #1065, patch from DukePyrolator, force a user off a nick when it is suspended.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2192 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-23 02:51:05 +00:00
cyberbotx a9ced70eed Add opertype access checks to OS QUIT, OS RESTART, and OS SHUTDOWN, patch from Adam.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2191 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-23 00:55:22 +00:00
cyberbotx 5b988a5e17 Fix bug #1033, patch from Adam, fixes the documentation of CS BAN.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2190 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-23 00:50:32 +00:00
cyberbotx 5fe4d0f43d Fix bug #1064, 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/trunk@2188 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-23 00:40:32 +00:00
cyberbotx 96f98ebbb6 Really fix bug #1062, patch from Adam, BS ACT and BS SAY should no longer send revealing error messages to users without access.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2186 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-23 00:30:16 +00:00
cyberbotx d6522b5220 Fix bug #1062, patch from Adam, BS ASSIGN should no longer show revealing error messages to users without access.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2185 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-23 00:16:04 +00:00
cyberbotx 3ff8e96e14 Replace manual array for ChannelInfo's access list to use an std::vector instead, cleans up the code by a huge portion and fixes bug #1024 in the process.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2184 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-23 00:06:40 +00:00
cyberbotx 5d56ed0158 Fix bug #1030 for 1.9.x, patch by Adam, plus cosmetic tweaks, deleting from the channel access list now logs a message about the deleted items.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2179 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-20 02:22:12 +00:00
cyberbotx 497aa0c012 Fix bug #1043, patch from Adam, CS LIST will no longer show suspended channels to normal users.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2178 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-20 02:21:58 +00:00
cyberbotx a7189482f5 Show access denied if you do not have access to CS SUSPEND, patch from Adam.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2177 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-20 02:21:32 +00:00
cyberbotx 26e09b3b7f Partial fix for bug #1038, patch from Adam, NS OINFO and CS OINFO now properly set a new oinfo line.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2176 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-20 02:21:02 +00:00
cyberbotx e78066213a Fix bug #1041, patch by Adam (with coding style tweaks by me), CS LOGOUT should work as expected now.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2174 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-17 02:56:05 +00:00
cyberbotx 610dbf5c92 Fix bug #1054 for 1.9.x, patch from Adam, Anope no longer shows the entire message that was ignored, now it only shows the command that was used.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2173 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-17 02:55:53 +00:00
cyberbotx 0892ef1361 Fix bug #1040, patch from Adam, CS INVITE not displays messages for successful invites and failed invite due to being in the channel already.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2172 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-17 02:55:46 +00:00
cyberbotx adca908bce Remove variable shadowing in os_oline, patch from Phenoix.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2171 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-16 15:37:02 +00:00
cyberbotx d93c79358e Remove variable shadowing in ms_rsend, patch from Phenoix.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2170 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-15 23:05:44 +00:00
cyberbotx 7d0b69b94b Correct a set of potential security holes in varags usage in ns_sendpass, patch from Phenoix.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2169 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-15 23:05:34 +00:00
cyberbotx 8cc5b194d4 Correct a set of potential security holes in varags usage in ns_register, patch from Phenoix.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2168 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-15 23:05:23 +00:00
cyberbotx 89e63ed395 Remove variable shadowing in ms_send, patch from Phenoix.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2167 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-15 23:05:10 +00:00
cyberbotx c01cd051c3 Patch from Phenoix to correct a set of potential security holes in varargs usage.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2165 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-15 00:39:59 +00:00
cyberbotx b6c2d8b52e Fix but #1050, MS STAFF's syntax shows correctly, required adding a language string as well, currently they are all English until they can be properly translated.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2164 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-15 00:12:59 +00:00
cyberbotx 68ff62f6e3 Fix bug #1056, patch from Adam, BotServ kickers should now ban for like it should.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2163 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-14 23:23:52 +00:00
sjaz 4f4b42562a Fixed typo on operserv which was stopping opersonly working. Good find Adam. (You do pick up the weirdest of things ....)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2162 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-14 19:06:23 +00:00
sjaz 0a2b6b9573 Amended error message from "server numeric" to "server id" as per discussion on
forum to avoid confusion. (We might want to think about this in the long term but 
for now, this will help reduce confusion).


git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2161 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-14 18:24:48 +00:00
sjaz 6ac077e2cb Updated langfiles for /CS HELP INVITE to show that you can only invite yourself. ALL done in English until we can establish a means of maintaining the langfiles reliably and properly.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2160 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-14 18:20:21 +00:00
sjaz d2fd84d41f Fix for bs badwords deletion. Good find Adam.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2159 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-14 17:50:39 +00:00
cyberbotx ea5245f416 Fix bug #1055, keetopic != keeptopic.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2158 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-14 12:55:00 +00:00
cyberbotx 40005c5029 Fix bug #1035, patch by Adam, now bans set through CS ENFORCE can be removed through CS UNBAN or CS CLEAR BANS.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2157 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-14 01:17:55 +00:00
cyberbotx 8974008304 Really corrected CMake version checking.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2156 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-11 23:05:21 +00:00
cyberbotx 29b9577bd2 Fix the CMake generation to work with older versions of CMake 2.4.x, cleaning up some of the macros and also correcting the code to detect what version of CMake is in use.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2155 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-11 20:10:00 +00:00
cyberbotx 174bb94648 Fix bug #1020, +f and +L parameters are read from and written to the database regardless of what the IRCd says it can handle, as the databases are loaded prior to Anope connecting to the IRCd and the InspIRCd protocol modules default to saying +f is a mode they don't support until after Anope connects to InspIRCd.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2150 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-09 03:21:33 +00:00
cyberbotx 3b634c3770 Fix /cs set mlock to not use strtok, which wasn't working due to the change in the command API to not use strtok at all, indirectly found because of bug #1020 (which was for 1.9.0 where /cs set mlock functions properly).
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2149 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-09 03:14:27 +00:00
cyberbotx 4184b7df44 Fix bug #1025, the message for "no such entry" should show whatever was number passed in to the command, not -1 every time.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2148 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-09 02:41:13 +00:00
cyberbotx 4ddc1cebd1 Fix bug #1028, the *_getpass and *_sendpass modules will now refuse to load if the given encryption module is unable to do decryption.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2147 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-09 02:35:59 +00:00
cyberbotx 54762245b8 Fix bug #1027, properly send a Globop on CS DROP, patch provided by Adam.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2146 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-08 03:10:21 +00:00
cyberbotx 63e8a8f6c2 Fix slight warning that comes up with gcc 3.4.x but not 4.2.x, this should be done anyways.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2144 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-07 03:06:05 +00:00
cyberbotx 16bd616604 Fix bug #1026, Anope shouldn't crash on /ns set greet now, was just a small but fatal typo.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2143 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-06 23:26:20 +00:00
cyberbotx 9a97a0b3cf Fix bug #1022, the problem was inspircd12 specific and the pseudo-clients will now respawn.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2142 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-03 15:30:36 +00:00
cyberbotx 7a1217e97c Fix typo in inspircd11 module preventing it from connecting even if m_hidechans is loaded on InspIRCd.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2141 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-03 15:13:51 +00:00
cyberbotx efcd7636dc Force locale to C so messages from gcc don't get translated, thanks to DukePyrolator for spotting this.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2140 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-02 21:05:05 +00:00
cyberbotx c6f4b95131 Added a strip_string function to Anope.cmake, cleaned up other parts of Anope.cmake, added better find function for #include lines, added functionality for CMake to auto-detect includes in non-standard locations.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2139 5417fbe8-f217-4b02-8779-1006273d7864
2009-03-02 01:33:47 +00:00
rburchell 6794273f7d Oper restrictions on memoserv commands.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2138 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-28 17:32:44 +00:00
rburchell e8ce6e0b10 Missed converting this to opertypes.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2137 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-28 17:31:16 +00:00
rburchell a07fd592cb Remove CSRestrictGetPass, it is unneeded with the introduction of opertypes. [Adam]
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2136 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-28 00:50:04 +00:00
rburchell bd7f4f8c49 Patch from Adam, reducing duplication in cs_modes. Untested.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2135 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-28 00:49:37 +00:00
rburchell 090107db5f Add access checking to cs_* modules. Also change number of arguments for cs_modes commands.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2134 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-28 00:48:36 +00:00
pimpmylinux f2fb7ef53f fix inspircd sending broken UID message when introducing its clients
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2133 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-25 15:26:57 +00:00
cyberbotx 36de15de5e Fix SendAkill() in inspircd* modules, they were sending the wrong timestamp (instead of sending the current time, they were sending the time of the akill's creation).
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2131 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-23 03:18:38 +00:00
cyberbotx ab6ee16aa2 Updated inspircd11 module to look for m_hidechans.so module and updated inspircd12 module to also look for that module as well as error if m_globops.so isn't loaded.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2130 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-23 02:49:54 +00:00
cyberbotx 48560524a3 Fix slight CMake issue where it wasn't including win32_memory.cpp with protocol modules.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2129 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-23 02:21:07 +00:00
cyberbotx a5206c33b9 Fix slight linking error in Visual Studio, spotted by Brandan.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2128 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-23 02:01:46 +00:00
cyberbotx 419b4c8002 Fix odd crash bug in the inspircd* modules by replacing use of myStrGetToken with spacesepstraem, also fix a problem on Windows with not having FD_ZERO in the sgets() function before FD_SET is called, both spotted thanks to Brandan.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2126 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-23 00:58:46 +00:00
cyberbotx 9123489c32 Added Anope.cmake, moving all my CMake macros into it.
Fixed CMake error when CMake older than 2.4.8 is used, there is no 'touch' command in cmake -E, spotted by Adam.
Fixed Config to auto-detect CMake and revert to configure if CMake isn't found.
Fixed install.js on Windows to show errors in running CMake and detect if there were errors.

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2125 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-22 22:25:15 +00:00
rburchell fa0d664063 Forward port of patch by DukePyrolator fixing memory leak on +beI modes.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2124 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-22 17:20:30 +00:00
rburchell c3f28223f8 Also allow RECOVER/RELEASE, reported by Adam and Raff7.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2123 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-21 22:19:40 +00:00
rburchell 8d05e8510f Allow NS GHOST from an unregistered sender, reported by Raff7.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2122 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-21 22:16:44 +00:00
cyberbotx 1707cf3dd3 Fix cs_access not displaying syntax errors and having a signed vs unsigned bug, spotted by Adam.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2121 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-21 01:25:37 +00:00
rburchell bb666ab902 Fix missing variable.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2120 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-19 21:59:56 +00:00
rburchell 7723437a81 Fix a few warnings. Also move split_usermask into cs_akick, as this is the only place it is used.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2119 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-19 21:59:31 +00:00
cyberbotx 805253de36 Preliminary support for a module source file (within src/modules) to include a comment saying it requires certain external libraries and having CMake search for the library automatically.
Note: This sorta works for both *nix and Windows, probably *nix more-so than Windows, but this needs some cleaning up. It does work as is, though.

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2118 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-19 04:03:13 +00:00
rburchell 40680e2535 Fix ns_update, thanks DP. Fix two compile errors.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2117 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-19 00:23:50 +00:00
rburchell c917ca5a34 Remove (and neuter) old event system. Not used by anything in core.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2116 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-19 00:23:14 +00:00
rburchell 23f5e9de79 Move last of events that are in the core distro over to newevents.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2115 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-19 00:22:46 +00:00
rburchell 6c1d764c4f Fix problems with registration being denied, thanks Adam.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2114 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-18 23:54:17 +00:00
rburchell 2b0914ae36 Add OnUserConnect event, mark OnSaveDatabase deprecated pending db redesign.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2113 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-18 23:48:46 +00:00
rburchell d20e4eb6ee Seems Changes entry didn't get committed.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2112 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-18 23:34:56 +00:00
rburchell e11b5b5ace Patch from DP, converting all match calls and removing old match method.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2111 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-18 23:34:32 +00:00
rburchell 12cc633457 Add nickalias to build. Also stop sstrdup on args that seem to be NULL, it's getting ripped out anyway.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2109 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-18 23:01:43 +00:00
rburchell bcb857f118 Move EVENT_DB_SAVING to newevent.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2108 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-18 23:00:41 +00:00
rburchell 187c45059a Move assign and unassign to new events, allow for halting too should modules desire that.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2107 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-18 22:59:16 +00:00
cyberbotx 3fe5aa037a Fix numerous errors in Win32 building under Visual Studio due to the many changes to trunk. Trunk now builds under Windows like it should.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2106 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-17 02:02:20 +00:00
rburchell 7af9e42d21 Hook events correctly in constructor.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2105 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-17 00:31:42 +00:00
rburchell abd083b1e3 Oops.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2104 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-16 23:49:38 +00:00
rburchell d07de70fc3 Move EVENT_RELOAD to OnReload.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2103 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-16 23:48:03 +00:00
rburchell c1c9e17d79 Move OnUserKicked to a module event.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2102 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-16 23:47:28 +00:00
rburchell ce3a04f0a8 Modevents, ported from insp. Typesafe (unlike the current ones), no double hashing overhead (faster), no useless memory allocations (copies of the args)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2101 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-16 22:59:59 +00:00
rburchell f756f2b394 Fix compile warning.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2100 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-16 22:59:36 +00:00
cyberbotx 7ea34be0b8 Fix output of reason in os_chankill when AddAkiller is used, spotted by DukePyrolator, thanks!
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2099 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-16 22:08:45 +00:00
cyberbotx 6bd851a4d0 Replaced time_t with long in the ValueItem class, this was preventing building under FreeBSD. Works under FreeBSD and Linux now.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2098 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-16 20:35:56 +00:00
rburchell 8d90a23689 bleep.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2097 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-16 19:11:42 +00:00
rburchell ea45d96968 If you use finduser(), and then use the result, it helps if you actually finduser() to a pointer to save the result, doh. Thanks to DP!
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2096 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-16 18:58:44 +00:00
rburchell 771eb5cf1f Fix wrong service listed in "to identify"
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2095 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-16 16:18:24 +00:00
rburchell e1f80a1833 Prevent potential overflows of time values.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2094 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-16 15:08:42 +00:00
rburchell 0374d53d28 Add 'w' and 'y' support to dotime(), also prevent a possible overflow - thanks to DP.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2093 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-16 15:05:46 +00:00
rburchell 578755d627 Fix segfault on shutdown, thanks Ankit
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2092 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-16 12:57:19 +00:00
rburchell 89ab54f0d7 Another segfault found by DP :P
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2091 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-16 12:56:58 +00:00
rburchell 80de50711e Make DumpCore actually do something again.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2090 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-16 12:41:33 +00:00
rburchell 43bad5d4ae Default options::dumpcore to yes.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2089 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-16 12:32:27 +00:00
rburchell 0d86da4f5d Add Adam's pre-team contributions to Changes
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2088 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-16 12:24:54 +00:00
rburchell caeebbfa6f Add contributions by DP to Changes.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2087 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-16 12:24:39 +00:00
rburchell 549e9446d8 Allow NS STATUS from unregistered users, thanks DP!
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2086 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-16 12:24:17 +00:00
rburchell 14c2617e41 Move botserv/administration "metacommand" to a priv. What was I smoking when I wrote this?
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2085 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-16 12:12:48 +00:00
rburchell 6112d479f9 Wild pointers do not a happy Anope make. Thanks DP :)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2084 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-16 12:12:26 +00:00
rburchell 04fe8e623c Allow NS REGISTER to unregistered nicks, silly oversight. Thanks DP! :)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2083 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-16 11:54:03 +00:00
rburchell c8422a6029 Fix call order, thanks to DP
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2082 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-16 11:33:39 +00:00
rburchell 010c774bc2 Revert "Patch from DukePyrolator to replace all calls to match_wild() and match_wild_nocase() to use Anope::Match() instead. Also changes line-endings on wildcard.cpp to Unix-style, as well as fixes a small compile warning in language.c."
This reverts commit fcab9857f55567f10eaecbd6b26ee96f0f549d65.

This isn't a simple sed operation, the order of arguments changed, so this would break everything using it.

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2081 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-16 09:17:24 +00:00
cyberbotx 22e8e87a00 Patch from DukePyrolator to replace all calls to match_wild() and match_wild_nocase() to use Anope::Match() instead. Also changes line-endings on wildcard.cpp to Unix-style, as well as fixes a small compile warning in language.c.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2080 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-16 06:19:37 +00:00
cyberbotx 15a2e1d4e4 The language strings of HelpServ had escaped me! But I hunted them down and now they are no more.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2079 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-15 23:57:25 +00:00
cyberbotx c5a376cbc8 Removed notice_user() and replaced all calls with Used::SendMessage.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2078 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-15 23:09:41 +00:00
rburchell 629422ed86 Remove nicktracking option, not used now.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2077 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-15 22:33:17 +00:00
rburchell d1611b640b Remove User::na, use User::nc everywhere. Will probably break everything, but opens the door to decoupling NC from NA, and means commands can now be run without bothering about changinc nick :)
More tweaking for na/nc usage.

It compiles, but it's still a work in progress.

Again, this compiles, but I *bet* there's no chance in hell it'll work. :)

Slightly better.

Set User::nc correctly.

Fix crash with unregistered nicks in core and ns_access.

Fix glist to work when you're not on that particular nick.

Fix ns_set to not crash and burn horribly.

Fix ns_set and ns_logout to not do bad things.

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2076 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-15 22:29:18 +00:00
cyberbotx 0e5b71923b Update TODO that HelpServ has been destroyed (although without the note of me getting +1000 points)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2075 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-15 17:58:37 +00:00
cyberbotx ba47bf2f6f HelpServ has been destroyed, +1000 points. Also fixed the argument order in the deprecated match_wild() function.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2074 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-15 17:47:52 +00:00
rburchell 330d9ee9e7 Add nickcore
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2073 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-15 17:40:56 +00:00
rburchell d84701deec Switch to using u->nc, courtesy of Rob, this means admin privs won't mysteriously vanish on changing nick.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2072 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-15 15:25:14 +00:00
rburchell 38711cded6 Merge master into svsopers.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2071 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-15 15:24:51 +00:00
rburchell 550e371f10 Set required command string for botserv modules.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2070 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-15 15:24:35 +00:00
rburchell c8aae1c6ee Implement opertype methods for priv/command access.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2069 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-15 15:24:12 +00:00
rburchell 92170818ff Fix CFLAG_ALLOW_UNREGISTERED.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2068 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-15 15:23:57 +00:00
rburchell 0c985ee709 Check nick_identified() instead of u->na, as this may incorrectly treat people as identified.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2067 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-15 15:23:41 +00:00
rburchell f74036dc58 Set CFLAG_ALLOW_UNREGISTERED on commands which should be usable for unidentified users.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2066 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-15 15:23:26 +00:00
rburchell d121c4bd37 Add CFLAG_ALLOW_UNREGISTERED, commands without this flag will now not run for unregistered users.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2065 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-15 15:23:03 +00:00
rburchell 02452a0375 Split Command implementation from definition.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2064 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-15 15:22:40 +00:00
rburchell 8324379346 Can now correctly tie users to opertypes.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2063 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-15 15:22:20 +00:00
rburchell 855847f428 Shuffle shit around.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2062 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-15 15:21:55 +00:00
rburchell f07229a9ee Blah, blah..
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2061 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-15 15:21:35 +00:00
rburchell f92bf30f15 Fix compile error.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2060 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-15 15:21:06 +00:00
rburchell b10305ef3b Convert to use new, (drastically) faster matching algorithm, from InspIRCd. This adds Anope::Match(), and marks match_wild() and match_wild_nocase() deprecated.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2059 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-15 15:20:47 +00:00
rburchell e1828057c3 Add include/svsoper.h, add skeleton methods/doc.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2058 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-15 15:20:23 +00:00
rburchell bce21304f7 Add svsopers.cpp to build.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2057 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-15 15:19:57 +00:00
rburchell 2e75a5c4a4 Fix makefile, it's a cpp not a c.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2056 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-15 15:19:39 +00:00
robbeh 09dedba379 First stab at adding User::nc as requested!
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2055 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-15 14:54:56 +00:00
cyberbotx 602b468efd Remove os_restart from the TODO, it was verified to work it just didn't like gdb.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2054 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-15 02:11:19 +00:00
cyberbotx 84d789c72b Replaced notice_lang with notice_help in all OnHelp() functions in modules. Also fixed a few smaller issues regarding the help in the modules.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2053 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-15 01:59:21 +00:00
cyberbotx 6d835a6e49 Edit IRCDVar of inspircd12 so certain modules don't load on that IRCd, and small cosmetic fixes on a few other protocol modules.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2052 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-15 01:16:26 +00:00
cyberbotx 2c9f2eb991 Audited all src/modules/* and deleted bs_fantasy_unban (it was obsoleted).
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2051 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-15 01:00:20 +00:00
cyberbotx 0717d63c75 Audited all remaining os_* modules, excluding os_restart (it causes a SIGTRAP that needs to be narrowed down).
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2050 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-14 23:54:34 +00:00
cyberbotx bf020d8dfd Removed references to RAW in config and lang files. Kirby from Dreamland ate them, he was hungry. Probably wasn't good for his appetite, though.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2049 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-14 23:04:19 +00:00
rburchell 77174a7b4d protocol: split implementation from interface for cleaner code.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2048 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-14 22:41:40 +00:00
cyberbotx 214f6712fe Removed os_raw, it was never supported by the Anope team, and now it no longer exists. It is no more. (It might've been eaten by a Grue, I think.)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2047 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-14 22:38:08 +00:00
pimpmylinux 71870e6667 applied patch from Adam to fix some potential screwups
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2046 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-14 16:12:35 +00:00
cyberbotx 0e991f0e72 Audited os_session with help from Adam.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2045 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-14 03:45:26 +00:00
cyberbotx 99967932a4 Audited os_global and os_modinfo, thanks to Adam for spotting and fixing these.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2044 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-14 03:18:38 +00:00
cyberbotx b167c89ca6 Audited os_akill, os_set, os_sgline, os_sqline, os_staff, and os_szline.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2043 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-14 03:08:25 +00:00
cyberbotx 4b291b12f8 Fix error when install directory in instal.js contains spaces, spotted by Rexona.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2042 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-13 17:47:08 +00:00
rburchell 1344bc5728 Move 1.9.0 TODO to Changes, as it's, er, done.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2041 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-13 17:44:53 +00:00
rburchell 4587546330 Pass the right array to do_umode(), fixes mode tracking on Unreal. Thanks to DukePyrolator (yet again :P)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2040 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-13 17:25:11 +00:00
rburchell 4e5c094033 Fix bs_set help, thanks to DukePyrolator! :)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2039 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-13 17:12:17 +00:00
rburchell 7633d9e248 Fix segfault, noted by DukePyrolator. Thanks!
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2038 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-13 16:48:23 +00:00
rburchell a7855fd0ba Fix slist symbol mismatch.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2037 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-13 15:40:10 +00:00
rburchell 8d0aa3b589 Audit ns_*.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2036 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-13 15:39:55 +00:00
rburchell e616889a78 Fix part one of #1010, reported by DukePyrolator. (Language settings are not respected in message sending.) Thanks!
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2035 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-13 15:39:33 +00:00
rburchell 4310c712c3 Fix memo sending causing crashes due to unresolvable symbol at runtime, mark ms_* as audited.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2034 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-13 14:23:13 +00:00
sjaz 45b4074e0d Two very small typo's in example.conf.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2033 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-13 06:27:11 +00:00
cyberbotx 2b0646a148 More fixes to bs_bot from Adam, plus an extra fix within DoAdd not covered in Adam's patch.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2032 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-13 04:07:07 +00:00
cyberbotx b9a80f28f7 Audited os_modload, os_modunload, os_shutdown, os_stats, and os_svsnick.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2031 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-13 03:44:51 +00:00
cyberbotx c78784ac28 Audited os_reload, os_umode, os_update, os_userlist, and ss_main.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2030 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-13 03:18:44 +00:00
rburchell 61cf1f325f insp12: don't try sstrdup() a NULL argument if sid is not set.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2029 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-12 22:34:34 +00:00
rburchell b75fadf73d 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/trunk@2028 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-12 22:34:17 +00:00
rburchell b0535c7760 inspircd11: Pass chants in JOIN message to not blow away timestamps.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2027 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-12 22:34:00 +00:00
rburchell c9120ca031 hs_* audited.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2026 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-12 22:33:40 +00:00
rburchell 0e0ee67b81 enc_* don't require audit, as they do not implement commands.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2025 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-12 22:33:06 +00:00
cyberbotx baaed4b764 Fix bs_bot to use the correct parameters, patch from Adam.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2022 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-12 03:53:12 +00:00
rburchell 2e5b573192 Auditing of remaining cs_ modules.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2021 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-12 00:14:59 +00:00
rburchell 58b0279f7f Audit cs_kick, cs_list, cs_logout, cs_modes.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2020 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-12 00:00:50 +00:00
rburchell a512f7cdd7 cs_help, cs_identify, cs_info, cs_invite audited.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2019 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-11 23:59:58 +00:00
rburchell 30b3d92d94 Audit cs_forbid, cs_getkey, cs_getpass.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2018 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-11 23:59:38 +00:00
rburchell 4836d9548d Audit cs_ban, cs_clear, cs_drop.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2017 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-11 23:59:18 +00:00
rburchell 394d3b9325 Audit cs_access and cs_akick.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2016 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-11 23:58:57 +00:00
robbeh 9ed99ed5f4 I feel like a xanadu dev commiting only the TODO file!
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2015 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-11 20:44:49 +00:00
rburchell cdec4027a8 Finish audit of BotServ commands.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2014 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-11 13:59:56 +00:00
rburchell badcd21abb Make max params work correctly, and fix bs_act to request params correctly. Audited as working ok.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2013 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-11 11:17:10 +00:00
rburchell 136ea16ed8 Fix naming discrepancy meaning some commands were not issuing syntax errors.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2012 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-11 10:46:14 +00:00
rburchell 3cc5bf39f5 Add full list of modules that require review as a result of command changes.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2011 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-11 01:01:06 +00:00
rburchell b0e41b4811 Fix *_help, so they work and, uh, don't crash.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2010 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-11 00:57:47 +00:00
rburchell 56633e894d NS HELP requires 0 params minimum.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2009 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-11 00:42:05 +00:00
rburchell 0701b7df9f Fix NS REGISTER not being registered as a command handler properly.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2008 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-11 00:39:46 +00:00
cyberbotx 94916b32cb Fix example.conf to use os_news instead of os_logonnews, os_randomnews, and os_opernews.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2007 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-11 00:31:17 +00:00
rburchell b0edff488a Fix crash loading bs_set on 1.9.1.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2006 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-11 00:28:07 +00:00
rburchell 0a5ae7e6d8 Fix 1.9.0 -> 1.9.1 incompatibility on a patch.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2005 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-11 00:23:25 +00:00
rburchell f4cdea8348 Revert oper protection patch from SciFi, it breaks things. This reverts commit fee057ae11daea45295744f0e9e13f1d0ce0f2b4.
Conflicts:

	TODO

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2004 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-11 00:20:17 +00:00
rburchell 429da2b886 Fix for bug #1004, based from second half of patch from Adam.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2003 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-11 00:12:51 +00:00
rburchell 87ce2aa25d Partial patch by Adam, commenting fix for #1006 for future reference.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2002 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-11 00:12:20 +00:00
cyberbotx 87c8744724 Fixed compile errors within src/modules/*.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2001 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-11 00:07:53 +00:00
cyberbotx 6f9f2617e7 Fixed compile error in ss_main.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2000 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-10 23:53:25 +00:00
cyberbotx 8c2430d02d Fixed compiler error in os_userlist.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1999 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-10 23:51:37 +00:00
cyberbotx e2f6064f10 Fixed compile errors in os_szline.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1998 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-10 23:49:24 +00:00
cyberbotx 87065c514a Fixed compile errors in os_svsnick.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1997 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-10 23:39:48 +00:00
cyberbotx 0c17078092 Fixed compile errors in os_stats.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1996 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-10 23:37:31 +00:00
cyberbotx f9e7760a23 Fixed compile errors in os_shutdown and os_sqline.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1995 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-10 23:27:00 +00:00
cyberbotx 53e79c2155 Fixed compile errors in os_sgline.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1994 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-10 23:17:46 +00:00
cyberbotx fe78ca1399 Fix compile errors in os_set.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1993 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-10 22:56:06 +00:00
cyberbotx e1bdc807a8 Fixed compile errors in os_session.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1992 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-10 22:46:49 +00:00
rburchell 88186bfd2c Fix mistake noted by CyberBotX.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1991 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-10 21:48:47 +00:00
rburchell 2e08b60cf7 Fixes.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1990 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-10 21:46:57 +00:00
rburchell 7d58ed17c7 Fix os_news and os_noop.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1989 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-10 21:37:52 +00:00
rburchell 79f09ed157 Various fixes.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1988 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-10 21:16:20 +00:00
rburchell b1ee732713 Few fixes.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1987 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-10 21:16:00 +00:00
rburchell ef9f97fa05 Help() -> OnHelp(), return true.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1986 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-10 21:15:39 +00:00
rburchell 7a4b0418bc Fix ns_set.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1985 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-10 21:15:24 +00:00
robbeh 3d8245a5a6 fixed typo in ns_saset.c dealt with constness for change_core_display and added ASTYLE to contain astyle options
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1984 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-10 20:47:53 +00:00
rburchell d01df85cd1 More fixes.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1983 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-10 19:34:31 +00:00
rburchell 1ed7d17b5d Various compile fixes.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1982 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-10 19:34:03 +00:00
rburchell b48c18b011 Fixes..
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1981 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-10 17:01:21 +00:00
cyberbotx b496e60eb0 Fix compile errors in hs_* modules, as well as add some const-safeness to HostServ functions.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1980 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-10 16:56:24 +00:00
cyberbotx 2bf017a0e1 Fixed compile errors in cs_xop.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1979 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-10 16:38:28 +00:00
rburchell 5fa7167181 Fix a few (easy) compile errors.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1978 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-10 16:19:14 +00:00
rburchell fe39b96db7 Fix modules to use the right type (CommandReturn, not CommandResult)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1977 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-10 16:17:16 +00:00
rburchell e225e7e628 Change cs_set to use new commands API (ugh, this sucked.)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1976 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-10 16:07:26 +00:00
rburchell b15c46d795 Move getstring() and getstring2() from macros to functions. This fixes a bunch of warnings, and means they are actually *readable*, as well as type-safe and const.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1975 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-10 13:54:09 +00:00
rburchell e7a1572317 Clean up a few warnings.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1974 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-10 13:30:24 +00:00
rburchell 1fd0249076 NS_VERBOTEN -> NS_FORBIDDEN, CS_VERBOTEN -> CS_FORBIDDEN, etc.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1973 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-10 12:26:09 +00:00
cyberbotx e7a6661baa Do not pack the build directory into the tarballs from now on, also fix subtle error in install.js for Windows when the last characters of the script's path is a backslash.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1972 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-10 12:00:47 +00:00
rburchell 018f1a50b2 Bump version to 1.9.1-explodes-on-impact.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1971 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-10 10:07:17 +00:00
rburchell 4d89b91ed3 Change ns_set to use subcommand for help display.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1970 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-10 10:04:34 +00:00
robbeh 24dbf4e00c Use a virtual destructor for Commands as it has virtual functions
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1969 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-10 09:17:34 +00:00
rburchell 28a0108e0b Fix a few quick compile errors.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1968 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-10 09:07:32 +00:00
rburchell 87dc82f3e9 Convert cs_modes to new commands API.`
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1967 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-10 00:00:17 +00:00
cyberbotx 0a06ce6490 Changed cs_register to use new command API.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1966 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-09 23:19:09 +00:00
cyberbotx d931ce8096 Changed cs_sendpass to use new command API.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1965 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-09 23:13:36 +00:00
cyberbotx fc0deb2181 Changed cs_status to use new command API.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1964 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-09 23:01:59 +00:00
cyberbotx de6a85bdf5 Changed cs_suspend to use new command API.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1963 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-09 22:53:42 +00:00
cyberbotx 0ab4571106 Changed cs_topic to use new command API.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1962 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-09 22:45:18 +00:00
cyberbotx 8c815bedeb Changed cs_xop to use new command API.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1961 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-09 22:34:55 +00:00
robbeh d684f3c556 Moved myChanHelp so it'll compile ;)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1960 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-09 22:17:43 +00:00
robbeh 3fe6a25236 Moved cs_list.c to use the new command API
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1959 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-09 22:09:22 +00:00
rburchell 8c5a7e7aea Convert cs_logout to new commands API.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1958 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-09 22:04:14 +00:00
rburchell e7228b6289 Remove gone do_backtrace() prototype and call from memory.c
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1957 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-09 21:35:04 +00:00
rburchell 72b86bcf72 Remove some references to the (removed) waiting variable.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1956 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-09 21:33:51 +00:00
rburchell eec4e00b16 Fix typo.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1955 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-09 21:33:07 +00:00
cyberbotx ff6477e6dd Changed os_sgline to use new command API.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1954 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-09 21:06:36 +00:00
rburchell d7d01bdc5c Squashed commit: merge next (1.9.1) back to trunk.
SVN users, NOTE: THIS WILL NOT BUILD, NOR SHOULD YOU RUN IT YET.

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1953 5417fbe8-f217-4b02-8779-1006273d7864
2009-02-09 21:01:05 +00:00
331 changed files with 49984 additions and 78792 deletions
+501
View File
@@ -0,0 +1,501 @@
###############################################################################
# strip_string(<input string> <output string>)
#
# A macro to handle stripping the leading and trailing spaces from a string,
# uses string(STRIP) if using CMake 2.6.x or better, otherwise uses
# string(REGEX REPLACE).
###############################################################################
macro(strip_string INPUT_STRING OUTPUT_STRING)
if(CMAKE26_OR_BETTER)
# For CMake 2.6.x or better, we can just use the STRIP sub-command of string()
string(STRIP ${INPUT_STRING} ${OUTPUT_STRING})
else(CMAKE26_OR_BETTER)
# For CMake 2.4.x, we will have to use the REGEX REPLACE sub-command of string() instead
# First check if the input string is empty or not
if (${INPUT_STRING} STREQUAL "")
set(${OUTPUT_STRING} "")
else(${INPUT_STRING} STREQUAL "")
# Determine if the string is entirely empty or not
string(REGEX MATCH "^[ \t]*$" EMPTY_STRING "${INPUT_STRING}")
if(EMPTY_STRING)
set(${OUTPUT_STRING} "")
else(EMPTY_STRING)
# We detect if there is any leading whitespace and remove any if there is
string(SUBSTRING "${INPUT_STRING}" 0 1 FIRST_CHAR)
if(FIRST_CHAR STREQUAL " " OR FIRST_CHAR STREQUAL "\t")
string(REGEX REPLACE "^[ \t]+" "" TEMP_STRING "${INPUT_STRING}")
else(FIRST_CHAR STREQUAL " " OR FIRST_CHAR STREQUAL "\t")
set(TEMP_STRING "${INPUT_STRING}")
endif(FIRST_CHAR STREQUAL " " OR FIRST_CHAR STREQUAL "\t")
# Next we detect if there is any trailing whitespace and remove any if there is
string(LENGTH "${TEMP_STRING}" STRING_LEN)
math(EXPR STRING_LEN "${STRING_LEN} - 1")
string(SUBSTRING "${TEMP_STRING}" ${STRING_LEN} 1 LAST_CHAR)
if(LAST_CHAR STREQUAL " " OR LAST_CHAR STREQUAL "\t")
string(REGEX REPLACE "[ \t]+$" "" ${OUTPUT_STRING} "${TEMP_STRING}")
else(LAST_CHAR STREQUAL " " OR LAST_CHAR STREQUAL "\t")
set(${OUTPUT_STRING} "${TEMP_STRING}")
endif(LAST_CHAR STREQUAL " " OR LAST_CHAR STREQUAL "\t")
endif(EMPTY_STRING)
endif(${INPUT_STRING} STREQUAL "")
endif(CMAKE26_OR_BETTER)
endmacro(strip_string)
###############################################################################
# append_to_list(<list> <args>...)
#
# A macro to handle appending to lists, uses list(APPEND) if using CMake 2.4.2
# or better, otherwise uses set() instead.
###############################################################################
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)
###############################################################################
# find_in_list(<list> <value> <output variable>)
#
# A macro to handle searching within a list, will store the result in the
# given <output variable>, uses list(FIND) if using CMake 2.6.x or better
# (or CMake 2.4.8 or better), otherwise it iterates through the list to find
# the item.
###############################################################################
macro(find_in_list LIST ITEM_TO_FIND FOUND)
if(CMAKE248_OR_BETTER)
# For CMake 2.4.8 or better, we can use the FIND sub-command of list()
list(FIND ${LIST} ${ITEM_TO_FIND} ITEM_FOUND)
else(CMAKE248_OR_BETTER)
# 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 the position to -1 indicating nothing found, we also use a temporary position
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})
# Increase the position value by 1
math(EXPR POS "${POS} + 1")
endforeach(ITEM)
endif(CMAKE248_OR_BETTER)
# Set the given FOUND variable to the result
set(${FOUND} ${ITEM_FOUND})
endmacro(find_in_list)
###############################################################################
# remove_list_duplicates(<list>)
#
# A macro to handle removing duplicates from a list, uses
# list(REMOVE_DUPLICATES) if using CMake 2.6.x or better, otherwise it uses
# a slower method of creating a temporary list and only adding to it when
# a duplicate item hasn't been found.
###############################################################################
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)
###############################################################################
# remove_item_from_list(<list> <value>)
#
# A macro to handle removing a value from a list, uses list(REMOVE_ITEM) in
# both cases, but can remove the value itself using CMake 2.4.2 or better,
# while older versions use a slower method of iterating the list to find the
# index of the value to remove.
###############################################################################
macro(remove_item_from_list LIST VALUE)
if(CMAKE242_OR_BETTER)
# For CMake 2.4.2 or better, this can be done automatically
list(REMOVE_ITEM ${LIST} ${VALUE})
else(CMAKE242_OR_BETTER)
# For CMake 2.4.x before 2.4.2, we have to do this ourselves, firstly we set the index and a variable to indicate if the item was found
set(INDEX 0)
set(FOUND FALSE)
# Iterate through the old list
foreach(ITEM ${${LIST}})
# If the item hasn't been found yet, but the current item is the same, remove it
if(NOT FOUND)
if(ITEM STREQUAL ${VALUE})
set(FOUND TRUE)
list(REMOVE_ITEM ${LIST} ${INDEX})
endif(ITEM STREQUAL ${VALUE})
endif(NOT FOUND)
# Increase the index value by 1
math(EXPR INDEX "${INDEX} + 1")
endforeach(ITEM)
endif(CMAKE242_OR_BETTER)
endmacro(remove_item_from_list)
###############################################################################
# sort_list(<list>)
#
# A macro to handle sorting a list, uses list(SORT) if using CMake 2.4.4 or
# better, otherwise it uses a slower method of creating a temporary list and
# adding elements in alphabetical order.
###############################################################################
macro(sort_list LIST)
if(CMAKE244_OR_BETTER)
# For CMake 2.4.4 or better, this can be done automatically
list(SORT ${LIST})
else(CMAKE244_OR_BETTER)
# For CMake 2.4.x before 2.4.4, we have to do this ourselves, firstly we'll create a teporary list
set(NEW_LIST)
# Iterate through the old list
foreach(ITEM ${${LIST}})
# Temporary index position for the new list, as well as temporary value to store if the item was ever found
set(INDEX 0)
set(FOUND FALSE)
# Iterate through the new list
foreach(NEW_ITEM ${NEW_LIST})
# Compare the items, only if nothing was found before
if(NOT FOUND)
if(NEW_ITEM STRGREATER "${ITEM}")
set(FOUND TRUE)
list(INSERT NEW_LIST ${INDEX} ${ITEM})
endif(NEW_ITEM STRGREATER "${ITEM}")
endif(NOT FOUND)
# Increase the index value by 1
math(EXPR INDEX "${INDEX} + 1")
endforeach(NEW_ITEM)
# If the item was never found, just append it to the end
if(NOT FOUND)
append_to_list(NEW_LIST ${ITEM})
endif(NOT FOUND)
endforeach(ITEM)
# Replace the old list with the new list
set(${LIST} ${NEW_LIST})
endif(CMAKE244_OR_BETTER)
endmacro(sort_list)
###############################################################################
# read_from_file(<filename> <regex> <output variable>)
#
# A macro to handle reading specific lines from a file, uses file(STRINGS) if
# using CMake 2.6.x or better, otherwise we read in the entire file and
# perform a string(REGEX MATCH) on each line of the file instead. This
# macro can also be used to read in all the lines of a file if REGEX is set
# to "".
###############################################################################
macro(read_from_file FILE REGEX STRINGS)
if(CMAKE26_OR_BETTER)
# For CMake 2.6.x or better, we can just use the STRINGS sub-command to get the lines that match the given regular expression (if one is given, otherwise get all lines)
if(REGEX STREQUAL "")
file(STRINGS ${FILE} RESULT)
else(REGEX STREQUAL "")
file(STRINGS ${FILE} RESULT REGEX ${REGEX})
endif(REGEX STREQUAL "")
else(CMAKE26_OR_BETTER)
# For CMake 2.4.x, we need to do this manually, firstly we read the file in
execute_process(COMMAND ${CMAKE_COMMAND} -DFILE:STRING=${FILE} -P ${Anope_SOURCE_DIR}/ReadFile.cmake ERROR_VARIABLE ALL_STRINGS)
# Next we replace all newlines with semicolons
string(REGEX REPLACE "\n" ";" ALL_STRINGS ${ALL_STRINGS})
if(REGEX STREQUAL "")
# For no regular expression, just set the result to all the lines
set(RESULT ${ALL_STRINGS})
else(REGEX STREQUAL "")
# 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(REGEX STREQUAL "")
endif(CMAKE26_OR_BETTER)
# Set the given STRINGS variable to the result
set(${STRINGS} ${RESULT})
endmacro(read_from_file)
###############################################################################
# extract_include_filename(<line> <output variable> [<optional output variable of quote type>])
#
# This macro will take a #include line and extract the filename.
###############################################################################
macro(extract_include_filename INCLUDE FILENAME)
# Strip the leading and trailing spaces from the include line
strip_string(${INCLUDE} INCLUDE_STRIPPED)
# Make sure to only do the following if there is a string
if(INCLUDE_STRIPPED STREQUAL "")
set(FILE "")
else(INCLUDE_STRIPPED STREQUAL "")
# Extract the filename including the quotes or angle brackets
string(REGEX REPLACE "^.*([\"<].*[\">]).*$" "\\1" FILE "${INCLUDE_STRIPPED}")
# If an optional 3rd argument is given, we'll store if the quote style was quoted or angle bracketed
if(${ARGC} GREATER 2)
string(SUBSTRING ${FILE} 0 1 QUOTE)
if(QUOTE STREQUAL "<")
set(${ARGV2} "angle brackets")
else(QUOTE STREQUAL "<")
set(${ARGV2} "quotes")
endif(QUOTE STREQUAL "<")
endif(${ARGC} GREATER 2)
# Now remove the quotes or angle brackets
string(REGEX REPLACE "^[\"<](.*)[\">]$" "\\1" FILE "${FILE}")
endif(INCLUDE_STRIPPED STREQUAL "")
# Set the filename to the the given variable
set(${FILENAME} "${FILE}")
endmacro(extract_include_filename)
###############################################################################
# find_includes(<source filename> <output variable>)
#
# This macro will search through a file for #include lines, regardless of
# whitespace, but only returns the lines that are valid for the current
# platform CMake is running on.
###############################################################################
macro(find_includes SRC INCLUDES)
# Read all lines from the file that start with #, regardless of whitespace before the #
read_from_file(${SRC} "^[ \t]*#.*$" LINES)
# Set that any #include lines found are valid, and create temporary variables for the last found #ifdef/#ifndef
set(VALID_LINE TRUE)
set(LAST_DEF)
set(LAST_CHECK)
# Create an empty include list
set(INCLUDES_LIST)
# Iterate through all the # lines
foreach(LINE ${LINES})
# Search for #ifdef, #ifndef, #else, #endif, and #include
string(REGEX MATCH "^[ \t]*#[ \t]*ifdef[ \t]*.*$" FOUND_IFDEF ${LINE})
string(REGEX MATCH "^[ \t]*#[ \t]*ifndef[ \t]*.*$" FOUND_IFNDEF ${LINE})
string(REGEX MATCH "^[ \t]*#[ \t]*else.*$" FOUND_ELSE ${LINE})
string(REGEX MATCH "^[ \t]*#[ \t]*endif.*$" FOUND_ENDIF ${LINE})
string(REGEX MATCH "^[ \t]*#[ \t]*include[ \t]*[\"<].*[\">][\ t]*.*$" FOUND_INCLUDE ${LINE})
# If we found a #ifdef on the line, extract the data after the #ifdef and set if the lines after it are valid based on the variables in CMake
if(FOUND_IFDEF)
# Extract the define
string(REGEX REPLACE "^[ \t]*#[ \t]*ifdef[ \t]*(.*)$" "\\1" DEFINE ${LINE})
# Replace _WIN32 with WIN32, so we can check if the WIN32 variable of CMake is set instead of _WIN32
if(DEFINE STREQUAL "_WIN32")
set(DEFINE WIN32)
endif(DEFINE STREQUAL "_WIN32")
# Set the last define to this one, and set the last check to true, so when #else is encountered, we can do an opposing check
set(LAST_DEF ${DEFINE})
set(LAST_CHECK TRUE)
# If the define is true (it either exists or is a non-false result), the lines following will be checked, otherwise they will be skipped
if(${DEFINE})
set(VALID_LINE TRUE)
else(${DEFINE})
set(VALID_LINE FALSE)
endif(${DEFINE})
else(FOUND_IFDEF)
# If we found a #ifndef on the line, the same thing as #ifdef is done, except with the checks in the opposite direction
if(FOUND_IFNDEF)
# Extract the define
string(REGEX REPLACE "^[ \t]*#[ \t]*ifndef[ \t]*(.*)$" "\\1" DEFINE ${LINE})
# Replace _WIN32 with WIN32, so we can check if the WIN32 variable of CMake is set instead of _WIN32
if(DEFINE STREQUAL "_WIN32")
set(DEFINE WIN32)
endif(DEFINE STREQUAL "_WIN32")
# Set the last define to this one, and set the last check to false, so when #else is encountered, we can do an opposing check
set(LAST_DEF ${DEFINE})
set(LAST_CHECK FALSE)
# If the define is not true (it either doesn't exists or is a false result), the lines following will be checked, otherwise they will be skipped
if(${DEFINE})
set(VALID_LINE FALSE)
else(${DEFINE})
set(VALUE_LINE TRUE)
endif(${DEFINE})
else(FOUND_IFNDEF)
# If we found a #else on the line, we check the last define in the opposite direction
if(FOUND_ELSE)
# When LAST_CHECK is true, we were inside a #ifdef, now act as if we are entering a #ifndef section by doing an opposing check
if(LAST_CHECK)
if(${LAST_DEF})
set(VALID_LINE FALSE)
else(${LAST_DEF})
set(VALID_LINE TRUE)
endif(${LAST_DEF})
# When LAST_CHECK is false, we were inside a #ifndef, now act as if we are entering a #ifdef section by doing an opposing check
else(LAST_CHECK)
if(${LAST_DEF})
set(VALID_LINE TRUE)
else(${LAST_DEF})
set(VALID_LINE FALSE)
endif(${LAST_DEF})
endif(LAST_CHECK)
else(FOUND_ELSE)
# If we found a #endif on the line, we'll assume everything following the line is valid until we meet another one of the above lines
if(FOUND_ENDIF)
set(VALID_LINE TRUE)
else(FOUND_ENDIF)
# If we found a #include on the line, add the entire line to the list of includes unless the line isn't valid
if(FOUND_INCLUDE)
if(VALID_LINE)
append_to_list(INCLUDES_LIST "${LINE}")
endif(VALID_LINE)
endif(FOUND_INCLUDE)
endif(FOUND_ENDIF)
endif(FOUND_ELSE)
endif(FOUND_IFNDEF)
endif(FOUND_IFDEF)
endforeach(LINE)
set(${INCLUDES} ${INCLUDES_LIST})
endmacro(find_includes)
###############################################################################
# calculate_depends(<source filename> [<optional output variable for includes>])
#
# This macro is used in most of the src (sub)directories to calculate the
# header file dependencies for the given source file.
###############################################################################
macro(calculate_depends SRC)
# Temporarily set that we didn't get a 2nd argument before we actually check if we did get one or not
set(CHECK_ANGLE_INCLUDES FALSE)
# Check for a second argument
if(${ARGC} GREATER 1)
set(CHECK_ANGLE_INCLUDES TRUE)
endif(${ARGC} GREATER 1)
# Find all the lines in the given source file that have any form of #include on them, regardless of whitespace, but only if they are valid for the platform we are on
find_includes(${SRC} 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 QUOTE_TYPE)
if(QUOTE_TYPE STREQUAL "angle brackets")
# The following checks will only be done if there was a request for angle includes to be checked
if(CHECK_ANGLE_INCLUDES)
# Find the path of the include file
if(DEFAULT_INCLUDE_DIRS OR WSDK_PATH OR DEFINED $ENV{VCINSTALLDIR})
find_path(FOUND_${FILENAME}_INCLUDE NAMES ${FILENAME} PATHS ${DEFAULT_INCLUDE_DIRS} ${WSDK_PATH}/include $ENV{VCINSTALLDIR}/include)
else(DEFAULT_INCLUDE_DIRS OR WSDK_PATH OR DEFINED $ENV{VCINSTALLDIR})
find_path(FOUND_${FILENAME}_INCLUDE NAMES ${FILENAME})
endif(DEFAULT_INCLUDE_DIRS OR WSDK_PATH OR DEFINED $ENV{VCINSTALLDIR})
# If the include file was found, add it's path to the list of include paths, but only if it doesn't already exist and isn't in the defaults for the compiler
if(FOUND_${FILENAME}_INCLUDE)
find_in_list(DEFAULT_INCLUDE_DIRS "${FOUND_${FILENAME}_INCLUDE}" FOUND_IN_DEFAULTS)
if(FOUND_IN_DEFAULTS EQUAL -1)
find_in_list(${ARGV1} "${FOUND_${FILENAME}_INCLUDE}" FOUND_IN_INCLUDES)
if(FOUND_IN_INCLUDES EQUAL -1)
append_to_list(${ARGV1} "${FOUND_${FILENAME}_INCLUDE}")
endif(FOUND_IN_INCLUDES EQUAL -1)
endif(FOUND_IN_DEFAULTS EQUAL -1)
else(FOUND_${FILENAME}_INCLUDE)
message(FATAL_ERROR "${SRC} needs header file ${FILENAME} but we were unable to locate that header file! Check that the header file is within the search path of your OS.")
endif(FOUND_${FILENAME}_INCLUDE)
endif(CHECK_ANGLE_INCLUDES)
endif(QUOTE_TYPE STREQUAL "angle brackets")
endforeach(INCLUDE)
endmacro(calculate_depends)
###############################################################################
# calculate_libraries(<source filename> <output variable for linker flags> <output variable for extra depends>)
#
# This macro is used in most of the src (sub)directories to calculate the
# library dependencies for the given source file.
###############################################################################
macro(calculate_libraries SRC SRC_LDFLAGS EXTRA_DEPENDS)
# Set up a temporary LDFLAGS for this file
set(THIS_LDFLAGS "${LDFLAGS}")
# Reset extra dependencies
set(EXTRA_DEPENDENCIES)
# Reset library paths
set(LIBRARY_PATHS)
# Reset libraries
set(LIBRARIES)
# Check to see if there are any lines matching: /* RequiredLibraries: [something] */
read_from_file(${SRC} "/\\\\*[ \t]*RequiredLibraries:[ \t]*.*[ \t]*\\\\*/" REQUIRED_LIBRARIES)
# Iterate through those lines
foreach(REQUIRED_LIBRARY ${REQUIRED_LIBRARIES})
# Strip off the /* RequiredLibraries: and */ from the line
string(REGEX REPLACE "/\\*[ \t]*RequiredLibraries:[ \t]*([^ \t]*)[ \t]*\\*/" "\\1" REQUIRED_LIBRARY ${REQUIRED_LIBRARY})
# Replace all commas with semicolons
string(REGEX REPLACE "," ";" REQUIRED_LIBRARY ${REQUIRED_LIBRARY})
# Iterate through the libraries given
foreach(LIBRARY ${REQUIRED_LIBRARY})
# Locate the library to see if it exists
if(DEFAULT_LIBRARY_DIRS OR WSDK_PATH OR DEFINED $ENV{VCINSTALLDIR})
find_library(FOUND_${LIBRARY}_LIBRARY NAMES ${LIBRARY} PATHS ${DEFAULT_LIBRARY_DIRS} ${WSDK_PATH}/lib $ENV{VCINSTALLDIR}/lib)
else(DEFAULT_LIBRARY_DIRS OR WSDK_PATH OR DEFINED $ENV{VCINSTALLDIR})
find_library(FOUND_${LIBRARY}_LIBRARY NAMES ${LIBRARY})
endif(DEFAULT_LIBRARY_DIRS OR WSDK_PATH OR DEFINED $ENV{VCINSTALLDIR})
# If the library was found, we will add it to the linker flags
if(FOUND_${LIBRARY}_LIBRARY)
# Get the path only of the library, to add it to linker flags
get_filename_component(LIBRARY_PATH ${FOUND_${LIBRARY}_LIBRARY} PATH)
if(MSVC)
# For Visual Studio, instead of editing the linker flags, we'll add the library to a separate list of extra dependencies
append_to_list(EXTRA_DEPENDENCIES "${FOUND_${LIBRARY}_LIBRARY}")
else(MSVC)
# For all others, add the library paths and libraries
append_to_list(LIBRARY_PATHS "${LIBRARY_PATH}")
append_to_list(LIBRARIES "${LIBRARY}")
endif(MSVC)
else(FOUND_${LIBRARY}_LIBRARY)
# In the case of the library not being found, we fatally error so CMake stops trying to generate
message(FATAL_ERROR "${SRC} needs library ${LIBRARY} but we were unable to locate that library! Check that the library is within the search path of your OS.")
endif(FOUND_${LIBRARY}_LIBRARY)
endforeach(LIBRARY)
endforeach(REQUIRED_LIBRARY)
# Remove duplicates from the library paths
if(LIBRARY_PATHS)
remove_list_duplicates(LIBRARY_PATHS)
endif(LIBRARY_PATHS)
# Remove diplicates from the libraries
if(LIBRARIES)
remove_list_duplicates(LIBRARIES)
endif(LIBRARIES)
# Iterate through library paths and add them to the linker flags
foreach(LIBRARY_PATH ${LIBRARY_PATHS})
find_in_list(DEFAULT_LIBRARY_DIRS "${LIBRARY_PATH}" FOUND_IN_DEFAULTS)
if(FOUND_IN_DEFAULTS EQUAL -1)
set(THIS_LDFLAGS "${THIS_LDFLAGS} -L${LIBRARY_PATH}")
endif(FOUND_IN_DEFAULTS EQUAL -1)
endforeach(LIBRARY_PATH)
# Iterate through libraries and add them to the linker flags
foreach(LIBRARY ${LIBRARIES})
set(THIS_LDFLAGS "${THIS_LDFLAGS} -l${LIBRARY}")
endforeach(LIBRARY)
set(${SRC_LDFLAGS} "${THIS_LDFLAGS}")
set(${EXTRA_DEPENDS} "${EXTRA_DEPENDENCIES}")
endmacro(calculate_libraries)
###############################################################################
# add_to_cpack_ignored_files(<item> [TRUE])
#
# A macro to update the environment variable CPACK_IGNORED_FILES which
# contains a list of files for CPack to ignore. If the optional 2nd argument
# of TRUE is given, periods will be converted to \\. for CPack.
###############################################################################
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)
+175 -287
View File
@@ -9,31 +9,173 @@ if(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR} AND NOT WIN3
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)
# Set the project as C++ primarily, but have C enabled for the checks required later
project(Anope CXX)
enable_language(C)
# Detect the version of CMake for the later conditional checks
execute_process(COMMAND ${CMAKE_COMMAND} --version OUTPUT_VARIABLE VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
string(REGEX REPLACE "cmake version 2\\.(.*)" "\\1" ONLY_VERSION "${VERSION}")
string(REGEX MATCH "-patch .*$" HAS_PATCH "${ONLY_VERSION}")
if(HAS_PATCH)
string(REGEX REPLACE "(.*)-patch .*" "\\1" MINOR_VERSION "${ONLY_VERSION}")
string(REGEX REPLACE ".*-patch (.*)" "\\1" PATCH_VERSION "${ONLY_VERSION}")
else(HAS_PATCH)
string(REGEX MATCH "\\." HAS_DOT "${ONLY_VERSION}")
if(HAS_DOT)
string(REGEX REPLACE "(.*)\\..*" "\\1" MINOR_VERSION "${ONLY_VERSION}")
string(REGEX REPLACE ".*\\.(.*)" "\\1" PATCH_VERSION "${ONLY_VERSION}")
else(HAS_DOT)
string(REGEX REPLACE "(.*)-beta" "\\1" MINOR_VERSION "${ONLY_VERSION}")
if(MINOR_VERSION STREQUAL "4-1\n")
set(PATCH_VERSION 1)
else(MINOR_VERSION STREQUAL "4-1\n")
set(PATCH_VERSION 0)
endif(MINOR_VERSION STREQUAL "4-1\n")
set(MINOR_VERSION 4)
endif(HAS_DOT)
endif(HAS_PATCH)
# 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)
if(MINOR_VERSION GREATER 5)
set(CMAKE26_OR_BETTER TRUE)
set(CMAKE248_OR_BETTER TRUE)
set(CMAKE244_OR_BETTER TRUE)
set(CMAKE242_OR_BETTER TRUE)
else(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
else(MINOR_VERSION GREATER 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)
# Also detect if we are using CMake 2.4.8 or better, the FIND sub-command of list() is non-existant in earlier versions
if(PATCH_VERSION GREATER 7)
set(CMAKE248_OR_BETTER TRUE)
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)
else(PATCH_VERSION GREATER 7)
set(CMAKE248_OR_BETTER FALSE)
# Also detect if we are using CMake 2.4.4 or better, the CheckCXXCompilerFlag module and SORT sub-command of list() are non-existant in earlier versions
if(PATCH_VERSION GREATER 3)
set(CMAKE244_OR_BETTER TRUE)
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)
else(PATCH_VERSION GREATER 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(PATCH_VERSION GREATER 1)
set(CMAKE242_OR_BETTER TRUE)
else(PATCH_VERSION GREATER 1)
set(CMAKE242_OR_BETTER FALSE)
endif(PATCH_VERSION GREATER 1)
endif(PATCH_VERSION GREATER 3)
endif(PATCH_VERSION GREATER 7)
endif(MINOR_VERSION GREATER 5)
# Override the module include path to include our directory, for our Anope.cmake, as well as we are using our own version of the NSIS template
set(CMAKE_MODULE_PATH ${Anope_SOURCE_DIR})
include(Anope)
# Force the locale to C for later uses of things like gcc so the messages come up in English, not the user's default language
set(ENV{LC_ALL} C)
# Start with empty defaults for library and include directories, to be used by GNU compilers only
set(DEFAULT_LIBRARY_DIRS)
set(DEFAULT_INCLUDE_DIRS)
# If we are using a GNU compiler (have to use CXX because it seems to fail on C), we will be able to determine it's default paths for libraries and includes
if(CMAKE_COMPILER_IS_GNUCXX)
# First look for the compiler's default library directories
execute_process(COMMAND ${CMAKE_C_COMPILER} -print-search-dirs OUTPUT_VARIABLE LINES OUTPUT_STRIP_TRAILING_WHITESPACE)
# Find only the part after "libraries: "
string(REGEX REPLACE ".*\nlibraries: (.*)$" "\\1" LINE "${LINES}")
# Replace the colons in the list with semicolons (only when not on MinGW, which uses semicolons already), and if on MinGW, just copy the line
if(NOT MINGW)
string(REGEX REPLACE ":" ";" LIBRARIES ${LINE})
else(NOT MINGW)
set(LIBRARIES "${LINE}")
endif(NOT MINGW)
# Iterate through the libraries
foreach(LIBRARY ${LIBRARIES})
# Check if the first character is an equal sign, and skip that library directory as it is (I believe) the primary default and shows up later in the list anyways
string(SUBSTRING ${LIBRARY} 0 1 FIRST_CHAR)
if(NOT FIRST_CHAR STREQUAL "=")
# If the directory had no = in front of it, make sure it's absolute and add it to the list of default library directories
get_filename_component(LIBRARY ${LIBRARY} ABSOLUTE)
append_to_list(DEFAULT_LIBRARY_DIRS ${LIBRARY})
endif(NOT FIRST_CHAR STREQUAL "=")
endforeach(LIBRARY)
# Remove duplicate entries from the list
if(DEFAULT_LIBRARY_DIRS)
remove_list_duplicates(DEFAULT_LIBRARY_DIRS)
endif(DEFAULT_LIBRARY_DIRS)
# Next, we look for the compiler's default include directories
# Run the command to find the default include directories
execute_process(COMMAND ${CMAKE_C_COMPILER} -v -x c++ -E ${CMAKE_CURRENT_SOURCE_DIR}/empty.c ERROR_VARIABLE LINES OUTPUT_QUIET ERROR_STRIP_TRAILING_WHITESPACE)
# Convert the new lines to semicolons
string(REGEX REPLACE "\n" ";" LINES ${LINES})
# Temporary variable saying if we are in the search list or not
set(IN_SEARCH_LIST FALSE)
# Iterate through the lines
foreach(LINE ${LINES})
# If the line has the following on it, the next lines will contain directory names
if(LINE STREQUAL "#include <...> search starts here:")
set(IN_SEARCH TRUE)
else(LINE STREQUAL "#include <...> search starts here:")
# If the line has the following on it, we hit the end of the list
if(LINE STREQUAL "End of search list.")
set(IN_SEARCH FALSE)
else(LINE STREQUAL "End of search list.")
# If we are within the block between the above two lines...
if(IN_SEARCH)
# Get everything but the first character of the line
string(LENGTH ${LINE} LINE_LENGTH)
math(EXPR LINE_LENGTH "${LINE_LENGTH} - 1")
string(SUBSTRING ${LINE} 1 ${LINE_LENGTH} INCLUDE)
# Convert the path to an absolute one, just in case it wasn't
get_filename_component(INCLUDE ${INCLUDE} ABSOLUTE)
# Add that directory to the list of default include directories
append_to_list(DEFAULT_INCLUDE_DIRS ${INCLUDE})
endif(IN_SEARCH)
endif(LINE STREQUAL "End of search list.")
endif(LINE STREQUAL "#include <...> search starts here:")
endforeach(LINE)
# Remove duplicate entries from the list
if(DEFAULT_INCLUDE_DIRS)
remove_list_duplicates(DEFAULT_INCLUDE_DIRS)
endif(DEFAULT_INCLUDE_DIRS)
endif(CMAKE_COMPILER_IS_GNUCXX)
# If we are using Visual Studio, locate the path of the Windows Server 2008 SDK or Windows Server 2003 Platform SDK, depending on which is installed
if(MSVC)
# If the path comes up as "/registry" from any of these, the path wasn't found, otherwise, we'll set WSDK_PATH to the corresponding path
# Look for the 2008 SDK under HKLM first
get_filename_component(WSDK2008_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows;CurrentInstallFolder]" ABSOLUTE CACHE)
if(WSDK2008_PATH STREQUAL "/registry")
# If not found, look for the 2003 SDK under HKLM
get_filename_component(WSDK2003_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\MicrosoftSDK\\InstalledSDKs\\D2FF9F89-8AA2-4373-8A31-C838BF4DBBE1;Install Dir]" ABSOLUTE CACHE)
if(WSDK2003_PATH STREQUAL "/registry")
# If not found, look for the 2008 SDK under HKCU
get_filename_component(WSDK2008_PATH "[HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows;CurrentInstallFolder]" ABSOLUTE CACHE)
if(WSDK2008_PATH STREQUAL "/registry")
# If not found, look for the 2003 SDK under HKCU
get_filename_component(WSDK2003_PATH "[HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\MicrosoftSDK\\InstalledSDKs\\D2FF9F89-8AA2-4373-8A31-C838BF4DBBE1;Install Dir]" ABSOLUTE CACHE)
if(WSDK2003_PATH STREQUAL "/regsitry")
# The SDK was never found, set the path to nothing
set(WSDK_PATH "")
else(WSDK2003_PATH STREQUAL "/regsitry")
set(WSDK_PATH "${WSDK2003_PATH}")
endif(WSDK2003_PATH STREQUAL "/regsitry")
else(WSDK2008_PATH STREQUAL "/registry")
set(WSDK_PATH "${WSDK2008_PATH}")
endif(WSDK2008_PATH STREQUAL "/registry")
else(WSDK2003_PATH STREQUAL "/registry")
set(WSDK_PATH "${WSDK2003_PATH}")
endif(WSDK2003_PATH STREQUAL "/registry")
else(WSDK2008_PATH STREQUAL "/registry")
set(WSDK_PATH "${WSDK2008_PATH}")
endif(WSDK2008_PATH STREQUAL "/registry")
endif(MSVC)
# 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()
# to Debug
# Only do this if not using Visual Studio
if(NOT MSVC)
if(CMAKE_BUILD_TYPE)
@@ -43,10 +185,6 @@ if(NOT MSVC)
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)
@@ -83,7 +221,7 @@ if(MSVC)
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")
set(CXXFLAGS "${CXXFLAGS} /W4 /wd4100 /wd4251 /wd4706 /wd4800 /wd4996 /EHs")
add_definitions(-DMSVCPP -D_CRT_SECURE_NO_WARNINGS)
# Otherwise, we're not using Visual Studio
else(MSVC)
@@ -143,6 +281,11 @@ if(NOT MSVC)
if(HAVE_SOCKET_LIB)
set(LDFLAGS "${LDFLAGS} -lsocket")
endif(HAVE_SOCKET_LIB)
# Check if inet_addr is within the nsl library (if the library exists), and add it to the linker flags if needed
check_library_exists(nsl inet_addr "" HAVE_NSL_LIB)
if(HAVE_NSL_LIB)
set(LDFLAGS "${LDFLAGS} -lnsl")
endif(HAVE_NSL_LIB)
endif(NOT WIN32)
endif(NOT MSVC)
@@ -181,98 +324,14 @@ 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)
# Strip the leading and trailing spaces from the compile flags
if(CXXFLAGS)
strip_string(${CXXFLAGS} CXXFLAGS)
endif(CXXFLAGS)
# Strip the leading and trailing spaces from the linker flags
if(LDFLAGS)
strip_string(${LDFLAGS} LDFLAGS)
endif(LDFLAGS)
# Search for the following programs
find_program(GREP grep)
@@ -325,178 +384,8 @@ if(WIN32)
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_to_cpack_ignored_files(".git\;config.cache\;.svn\;CMakeFiles\;sysconf.h$\;Makefile.inc$\;config.log\;config.status\;build\;autom4te.cache" 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
@@ -538,15 +427,13 @@ 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
install(FILES ${Anope_SOURCE_DIR}/docs/Changes ${Anope_SOURCE_DIR}/docs/Changes.conf ${Anope_SOURCE_DIR}/docs/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")
@@ -569,17 +456,18 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
"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"
"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_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_GENERATOR "TGZ")
set(CPACK_SOURCE_IGNORE_FILES "$ENV{CPACK_IGNORED_FILES}")
set(CPACK_MONOLITHIC_INSTALL TRUE)
include(CPack)
-12
View File
@@ -1,12 +0,0 @@
Anope Version 1.9.0
--------------------
09/27 F Modified compile to use g++
10/01 F Improve protocol modules support (classes, virtual methods, etc)
10/11 F Move core services to use BotInfo
10/12 F Move BotInfo and related methods into a class
11/01 F Move modules into a class
11/15 F Fixed ns resending of passcode issue
11/15 F Modules now delete themselves
Provided by mooncup <mooncup@anonnet.org> - 2009
02/04 F Automatically reapply vhost on hs off for unreal32. [ #00]
-782
View File
@@ -1,782 +0,0 @@
Anope Version 1.8.0
-------------------
** ADDED CONFIGURATION DIRECTIVES **
** MODIFIED CONFIGURATION DIRECTIVES **
** DELETED CONFIGURATION DIRECTIVES **
Anope Version 1.7.24
--------------------
** ADDED CONFIGURATION DIRECTIVES **
** MODIFIED CONFIGURATION DIRECTIVES **
** DELETED CONFIGURATION DIRECTIVES **
Anope Version 1.7.23b
--------------------
** ADDED CONFIGURATION DIRECTIVES **
** MODIFIED CONFIGURATION DIRECTIVES **
** DELETED CONFIGURATION DIRECTIVES **
Anope Version 1.7.23
--------------------
** ADDED CONFIGURATION DIRECTIVES **
# OSIgnoreDBName [OPTIONAL]
# Module: os_ignore_db
#
# Use the given filename as database for services ignores.
# If not given, the default of "os_ignore.db" will be used.
#
#OSIgnoreDBName "os_ignore.db"
** MODIFIED CONFIGURATION DIRECTIVES **
** DELETED CONFIGURATION DIRECTIVES **
Anope Version 1.7.22
--------------------
** ADDED CONFIGURATION DIRECTIVES **
** MODIFIED CONFIGURATION DIRECTIVES **
# BotCoreModules <list> [RECOMMENDED]
# These modules will be loaded as part of BotServ's core.
# It is not recommended you change these settings unless you are
# sure you understand exactly what it is you are doing.
BotCoreModules "bs_help bs_botlist bs_assign bs_set bs_kick bs_badwords bs_act bs_info bs_say bs_unassign bs_bot bs_fantasy bs_fantasy_kick bs_fantasy_kickban bs_fantasy_owner bs_fantasy_seen"
** DELETED CONFIGURATION DIRECTIVES **
Anope Version 1.7.21
--------------------
** ADDED CONFIGURATION DIRECTIVES **
** MODIFIED CONFIGURATION DIRECTIVES **
** DELETED CONFIGURATION DIRECTIVES **
Anope Version 1.7.20
--------------------
** ADDED CONFIGURATION DIRECTIVES **
** MODIFIED CONFIGURATION DIRECTIVES **
** DELETED CONFIGURATION DIRECTIVES **
Anope Version 1.7.19
--------------------
** ADDED CONFIGURATION DIRECTIVES **
** MODIFIED CONFIGURATION DIRECTIVES **
** DELETED CONFIGURATION DIRECTIVES **
Anope Version 1.7.18
--------------------
** ADDED CONFIGURATION DIRECTIVES **
###########################################################################
#
# Encryption settings
#
###########################################################################
# EncModule <module_name> [REQUIRED]
# The encryption module to use when dealing with passwords.
# This determines how the passwords are stored in the databases,
# and does not add any security as far as transmitting passwords over
# the network goes.
# enc_none provides no password encryption, storing the password in
# plain text, this is the most versiatle as passwords can easily be
# recovered.
#
# NOTE: users of anope's previous (broken) md5 implementation should
# select the enc_old option, or things may break.
#
# NOTE2: Some of these encryption methods are one-way (md5, sha1, old)
# meaning that you can NOT retrive the passwords in plain text once
# encrypted.
#
# Plain Text - enc_none
# Previous (broken) MD5 - enc_old
# MD5 - enc_md5
# SHA1 - enc_sha1
#
EncModule "enc_none"
** MODIFIED CONFIGURATION DIRECTIVES **
** DELETED CONFIGURATION DIRECTIVES **
Anope Version 1.7.17
--------------------
** ADDED CONFIGURATION DIRECTIVES **
** MODIFIED CONFIGURATION DIRECTIVES **
** DELETED CONFIGURATION DIRECTIVES **
Anope Version 1.7.16
--------------------
** ADDED CONFIGURATION DIRECTIVES **
** MODIFIED CONFIGURATION DIRECTIVES **
** DELETED CONFIGURATION DIRECTIVES **
Anope Version 1.7.15
--------------------
** ADDED CONFIGURATION DIRECTIVES **
# UseStrictPrivMsg [OPTIONAL]
# Using this directive will force services to only respond to privmsgs
# addressed to Nick@ServerName - e.g. NickServ@localhost.net.
# This should be used on conjunction with ircd aliases.
#
#UseStrictPrivMsg
# NSResendDelay <time> [RECOMMENDED]
# Sets the minimum length of time between consecutive uses of the
# RESEND command. If not given, this restriction is disabled (note
# that this allows "resend flooding" or "mail bombing").
NSResendDelay 90s
NSDefAutoop
** MODIFIED CONFIGURATION DIRECTIVES **
ModuleDelayedAutoload "cs_appendtopic cs_enforce ns_maxemail os_info hs_request"
# LimitSessions [OPTIONAL]
# Enables session limiting. Session limiting prevents users from
# connecting more than a certain number of times from the same host at the
# same time - thus preventing most types of cloning. Once a host reaches
# it's session limit, all clients attempting to connect from that host
# will be killed. Exceptions to the default session limit, which are based
# on host names, can be defined via the exception list. It should be noted
# that session limiting, along with a large exception list, can degrade
# services' performance. See the source and comments in sessions.c and the
# online help for more information about session limiting.
#
# NOTE: This option is not available when STREAMLINED is defined in
# the Makefile.
LimitSessions
** DELETED CONFIGURATION DIRECTIVES **
# NSAutoOPDBName [OPTIONAL]
# Module: ns_noop
#
# Use the given filename as database for the autoop list. If not given,
# the default of "autoop.db" will be used.
#
#NSAutoOPDBName "autoop.db"
# KillClonesAkillExpire <time> [REQUIRED]
# Sets the expiry time for autokills added for hosts that have been
# killed using the KILLCLONES command.
KillClonesAkillExpire 30m
# CheckClones <minusers> <maxdelay> <warningdelay> [DEPRECATED]
# Causes Services to try and detect "clones" connecting to the network.
# A WALLOPS (or GOPER, if supported on the IRC server) will be sent if
# Services thinks it has found clones.
#
# This feature has been superseded by Session Limiting.
#
# <minusers> sets the minimum number of users which must successively
# connect to the network before Services will send a clone warning.
#
# <maxdelay> sets the maximum time that can elapse between successive
# users before Services decides they are not clones.
#
# <warningdelay> sets the minimum time between clone warnings for
# clones from the same host.
#
# NOTE: This option is not available when STREAMLINED is defined in
# the Makefile.
# CheckClones 5 10s 30s
# KillClones [DISCOURAGED] [DEPRECATED]
# Causes Services to kill users which trigger the clone warnings. (If
# CheckClones is disabled, this will have no effect.)
#
# This feature has been superceded by Session Limiting.
#
# BEWARE! The clone checking code is easily fooled; it can be
# triggered falsely under many conditions, for example:
#
# - Multiple users connecting from a shell machine.
#
# - A single user repeatedly connecting and disconnecting.
#
# Be very sure you know what you're doing before you even think about
# enabling this option, and remember that Services comes with no
# warranty.
#
# If that wasn't enough discouragement:
#
# ***** DO NOT ENABLE THIS OPTION! *****
#
# NOTE: This option is not available when STREAMLINED is defined in
# the Makefile.
#KillClones
Anope Version 1.7.13
--------------------
** ADDED CONFIGURATION DIRECTIVES **
** MODIFIED CONFIGURATION DIRECTIVES **
** DELETED CONFIGURATION DIRECTIVES **
Anope Version 1.7.12
--------------------
** ADDED CONFIGURATION DIRECTIVES **
# BSFantasyCharacter [REQUIRED]
# This option allows you to change the default prefix for fantasy
# commands in channels. This character will have to be prepended to all
# fantasy commands. If you choose "!" (the default), fantasy commands
# will, for example, be "!kick", "!op", etc.
BSFantasyCharacter "!"
** MODIFIED CONFIGURATION DIRECTIVES **
** DELETED CONFIGURATION DIRECTIVES **
Anope Version 1.7.11
--------------------
** ADDED CONFIGURATION DIRECTIVES **
# NickLen [REQUIRED]
# Set this to the maximum allowed nick length on your network. Anope does
# not support values larger than 31, so setting them makes no sense. Be
# sure to set this correctly, as setting this wrong can result in services
# being disconnected from the network.
NickLen 31
** MODIFIED CONFIGURATION DIRECTIVES **
# UserKey1|2|3 <value> [RECOMMENDED]
#
# These keys are required to initiate the random number generator. These
# numbers MUST be random as you want your passcodes to be random. Don't
# give these keys to anyone! Keep them private!
#
# *** NOTE ***
# If you don't enable these, or keep their default values, any talented
# programmer would be able to easily "guess" random strings used to mask
# information. Be safe, and come up with three different 7 digit numbers
#UserKey1 9866235
#UserKey2 8362013
#UserKey3 2362899
** DELETED CONFIGURATION DIRECTIVES **
Anope Version 1.7.10
--------------------
** ADDED CONFIGURATION DIRECTIVES **
** MODIFIED CONFIGURATION DIRECTIVES **
** DELETED CONFIGURATION DIRECTIVES **
Anope Version 1.7.9
-------------------
** ADDED 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"
# DreamForge 4.6.7 - "dreamforge"
# Hybrid IRCd 7.0 [experimental] - "hybrid"
# InspIRCd 1.0 Beta 5 - "inspircd"
# InspIRCd module is provided by Brain <brain@inspircd.org>
# Plexus 2.0 [or later] - "plexus"
# PTLink 6.15.0 [experimental] - "ptlink"
# RageIRCd 2.0.0 [beta-6 of later] - "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"
# HostCoreModules <list> [RECOMMENDED]
# These modules will be loaded as part of HostServ's core.
# It is not recommended you change these settings unless you are
# sure you understand exactly what it is you are doing.
HostCoreModules "hs_help hs_on hs_off hs_group hs_list hs_set hs_setall hs_del hs_delall"
# MemoCoreModules <list> [RECOMMENDED]
# These modules will be loaded as part of MemoServ's core.
# It is not recommended you change these settings unless you are
# sure you understand exactly what it is you are doing.
MemoCoreModules "ms_send ms_cancel ms_list ms_read ms_del ms_set ms_info ms_rsend ms_check ms_staff ms_sendall ms_help"
# HelpCoreModules <list> [RECOMMENDED]
# These modules will be loaded as part of HelpServ's core.
# It is not recommended you change these settings unless you are
# sure you understand exactly what it is you are doing.
HelpCoreModules "he_help"
# BotCoreModules <list> [RECOMMENDED]
# These modules will be loaded as part of BotServ's core.
# It is not recommended you change these settings unless you are
# sure you understand exactly what it is you are doing.
BotCoreModules "bs_help bs_botlist bs_assign bs_set bs_kick bs_badwords bs_act bs_info bs_say bs_unassign bs_bot bs_fantasy bs_fantasy_kick bs_fantasy_kickban bs_fantasy_owner bs_fantasy_seen bs_fantasy_unban"
# OperCoreModules <list> [RECOMMENDED]
# These modules will be loaded as part of OperServ's core.
# It is not recommended you change these settings unless you are
# sure you understand exactly what it is you are doing.
OperCoreModules "os_help os_global os_stats os_oper os_admin os_staff os_mode os_kick os_clearmodes os_killclones os_akill os_sgline os_sqline os_szline os_chanlist os_userlist os_logonnews os_randomnews os_opernews os_session os_noop os_jupe os_ignore os_set os_reload os_update os_restart os_quit os_shutdown os_defcon os_chankill os_svsnick os_oline os_umode os_modload os_modunload os_modlist os_modinfo"
# NickCoreModules <list> [RECOMMENDED]
# These modules will be loaded as part of NickServ's core.
# It is not recommended you change these settings unless you are
# sure you understand exactly what it is you are doing.
NickCoreModules "ns_help ns_register ns_group ns_identify ns_access ns_set ns_drop ns_recover ns_release ns_sendpass ns_ghost ns_alist ns_info ns_list ns_logout ns_status ns_update ns_getpass ns_getemail ns_forbid ns_suspend"
# ChanCoreModules <list> [RECOMMENDED]
# These modules will be loaded as part of ChanServ's core.
# It is not recommended you change these settings unless you are
# sure you understand exactly what it is you are doing.
ChanCoreModules "cs_help cs_register cs_identify cs_set cs_xop cs_access cs_akick cs_drop cs_sendpass cs_ban cs_clear cs_modes cs_getkey cs_invite cs_kick cs_list cs_logout cs_topic cs_info cs_getpass cs_forbid cs_suspend cs_status"
# OSOpersOnly [RECOMMENDED]
# If this is defined, only IRC Operators will be permitted to use
# OperServ, regardless of module based command access restrictions.
OSOpersOnly
# NSEmailMax [OPTIONAL]
# Module: ns_maxemail
#
# Limit the amount of registrations with the same email address to the
# amount given here. If set to 0 or left commented, there will be no limit
# enforced when registering new accounts or using /msg NickServ SET EMAIL.
#
#NSEmailMax 1
# NSAutoOPDBName [OPTIONAL]
# Module: ns_noop
#
# Use the given filename as database for the autoop list. If not given,
# the default of "autoop.db" will be used.
#
#NSAutoOPDBName "autoop.db"
# OSInfoDBName [OPTIONAL]
# Module: os_info
#
# Use the given filename as database for the oper information lines.
# If not given, the default of "os_info.db" will be used.
#
#OSInfoDBName "os_info.db"
** MODIFIED CONFIGURATION DIRECTIVES **
# UserKey1|2|3 <value> [REQUIRED]
#
# These keys are required to initiate the random number generator. These
# numbers MUST be random as you want your passcodes to be random. Don't
# give these keys to no anyone! Keep them private!
# For those pple who don't understand what to do here: Just pick three
# _different_ _random_ numbers with about 6 or 7 digits and put them here.
# If the keys don't work, they might be too long or you forgot to remove
# the # in front of them. Example:
# UserKey1 9866235
# UserKey1 <your_first_random_number_here>
# UserKey2 <your_second_random_number_here>
# UserKey3 <you_third_random_number_here>
# Numeric [OPTIONAL]
# Many ircd identify themselves with a Numeric ID when using this option
# consult your ircds documentation before using this.
#Numeric "3AX"
#Numeric "4"
# ModuleDelayedAutoload [OPTIONAL]
#
# When compiled with module support, this contains a space separated list
# of modules to automaticaly load when services are ready for new clients.
# e.g. new pesudo clients such as CatServ :-) *meow*
# By default a number of modules that we found worth adding by default are
# loaded. Feel free to change this if you want to add more, or remove some
# from the list.
#
ModuleDelayedAutoload "cs_appendtopic cs_enforce ns_maxemail ns_noop os_info"
** DELETED CONFIGURATION DIRECTIVES **
###########################################################################
#
# Proxy detection
#
###########################################################################
# Note: if ProxyDetect is not set, all parameters after it in this section
# are optional.
# ProxyDetect [OPTIONAL]
#
# Enables insecure proxy detection. Services will automatically
# scan each incoming user and akill those that use insecure proxy.
#
# Anope currently supports detection of Wingate (port 23), SOCKS4/5
# (port 1080), and HTTP proxy (ports 3128 and 8080). It uses the
# protocol of each proxy type to connect to an IRC server, it does
# not only check if the port is open (so your users may still have
# an open telnet server on their port 23 for example).
#
# WARNING: You should get the authorization of the administrator of
# the computer which runs the proxy detector before enabling it; not
# all administrators will accept it. Also note that in certain
# countries, port scanning is prohibited.
#
# This feature requires threading support to be compiled into Anope.
#ProxyDetect
# ProxyThreads <number> [REQUIRED]
#
# Sets the number of threads Services will launch when starting. Each
# thread will have the responsibility to scan queued hostname for
# proxies.
#
# This value must be set depending of the number of users you have
# on your network. The more threads are used, the more simultaneous
# checks can be done. Remember however, that threads are
# resource-consuming.
#
# WARNING: On Linux, each thread takes a background process, and there
# is an additional process used for thread management; this is a problem
# if you are limited in the number of background process you can use
# (on a paid shell for example).
ProxyThreads 5
# ProxyMessage... <message> [RECOMMENDED]
#
# Sets the notices that will be sent out to users before Services
# scan them for proxy. You may not use all of them, but just as much as
# necessary.
ProxyMessage1 "I will now detect if you're using an insecure proxy."
ProxyMessage2 "If you see a connection on port 23, 1080, 3128 or 8080 from"
ProxyMessage3 "my.box.net, please disregard it, as it is the detector in action."
ProxyMessage4 "See http://proxy.myirc.net/ for information about our proxy policy."
#ProxyMessage5 "Enter"
#ProxyMessage6 "whatever"
#ProxyMessage7 "you want"
#ProxyMessage8 "here."
# ProxyCheck... [OPTIONAL]
#
# Determines what types of proxy Anope will try to find (respectively
# Wingate on port 23, SOCKS4 on port 1080, SOCKS5 on port 1080, HTTP
# proxy on port 3128, HTTP proxy on port 8080 and HTTP proxy on port
# 80).
ProxyCheckWingate
ProxyCheckSocks4
ProxyCheckSocks5
ProxyCheckHTTP1
ProxyCheckHTTP2
ProxyCheckHTTP3
# ProxyTimeout <time> [REQUIRED]
# Sets the maximum length of time we allow a connect/read operation to
# take. If you set this value too high, your threads may hang on a single
# check for a very long time. The best is to try different values
# and see which one is the more efficient for your network.
ProxyTimeout 15s
# ProxyTestServer <ip> <port> [REQUIRED]
#
# Sets the *IP* and port of the IRC server to use as a target when
# testing users for proxy.
ProxyTestServer "1.2.3.4" 6667
# ProxyExpire <time> [RECOMMENDED]
#
# Sets the length of time before a proxy host cache entry expires, if
# not used. If this is not set the default time is 2 days.
ProxyExpire 30d
# ProxyCacheExpire <time> [REQUIRED]
#
# Sets the length of time before a normal host cache entry expires, if
# not used. This cannot be set to 0d.
#
# Every non-proxy hosts will be stored in cache (to avoid too many scans
# to the same host), so you should set this enough low to not fill your
# memory, especially on large networks.
ProxyCacheExpire 1d
# ProxyAkillReason <reason> [REQUIRED]
#
# Sets the reason that will be used to AKILL an user from the network
# if a proxy is detected.
ProxyAkillReason "You're using an insecure proxy. See http://proxy.myirc.net/config.html for information about how to config your proxy in a safe manner."
# WallProxy [OPTIONAL]
#
# Sends a WALLOPS/GLOBOPS when an user using an insecure proxy is being
# AKILLed.
WallProxy
# ProxyMax <number> [REQUIRED]
#
# Sets the maximum proxy cache entries that can be displayed in a single
# call to OperServ CACHE.
ProxyMax 50
Anope Version 1.7.8
-------------------
** ADDED CONFIGURATION DIRECTIVES **
# UseTS6 [OPTIONAL]
#
# Modern hybrid ircd like Ratbox 2.0.x support a protocol called TS6.
# However this protocol is optional thus our default support is for without
# TS6, if you want to take advantage of TS6, enable this option.
#UseTS6
** MODIFIED CONFIGURATION DIRECTIVES **
** DELETED CONFIGURATION DIRECTIVES **
Anope Version 1.7.7
-------------------
** ADDED CONFIGURATION DIRECTIVES **
# NSAddAccessOnReg [OPTIONAL]
#
# When enabled, services will add the usermask of registering users to the
# access list of their newly created account. If you disable this, users
# will always have to identify to nickserv before being recognized, unless
# they manually add an address to the access list of their account.
NSAddAccessOnReg
# UlineServers [OPTIONAL]
#
# A list of ulined servers on your network, these servers are assumed they
# can set channel modes and we will not attempt to take them from them
# WARNING: do not put your user servers in this option
UlineServers "stats.your.network, proxy.your.network"
# KillOnSGline [OPTIONAL]
#
# When enabled, this option makes the services send an (SVS)KILL command
# immediately after SGLINE ADD. This eliminates the need of killing the
# users after the SGLINE has been added.
# KillOnSGline
# KillOnSQline [OPTIONAL]
#
# When enabled, this option makes the services send an (SVS)KILL command
# immediately after SQLINE ADD. This eliminates the need of killing the
# users after the SQLINE has been added.
# KillOnSQline
** MODIFIED CONFIGURATION DIRECTIVES **
** DELETED CONFIGURATION DIRECTIVES **
# NetworkDomain <name> [OPTIONAL]
#
# If your network has a common domain name, specify it there (for
# example, all IRCZONE servers have a name ending in ".irczone.cl",
# so "irczone.cl" would be set there.
#
# You can specify more than one Network Domain by separating each one by
# a space: NetworkDomain "localnet.net localnet.com"
#
# Note that this directive is no longer used by the GLOBAL command, since
# it uses a dynamic list of connected servers regardless of their
# domains. However, some modules may still use this value, so you might
# want to keep it just in case.
NetworkDomain "localnet.com"
# ListOpersOnly [DEPRECATED]
# When enabled, limits use of the ChanServ and NickServ LIST commands
# to IRC operators.
#
# This directive has been superseded by the NSListOpersOnly and
# CSListOpersOnly directives.
#ListOpersOnly
Anope Version 1.7.6
-------------------
** ADDED CONFIGURATION DIRECTIVES **
# UserKey1|2|3 <value> [REQUIRED]
#
# These keys are required to initiate the random number generator. These
# numbers MUST be random as you want your passcodes to be random. Don't
# give these keys to no anyone! Keep them private!
#UserKey1 9866235
#UserKey2 5216332
#UserKey3 9651291
# RestrictOperNick [OPTIONAL]
# Forbids the registration of nicks that contain nick with services
# access. So if Tester is a Services Oper, for example, You can't
# register NewTester or Tester123 unless you are an IRC operator.
#RestrictOperNicks
# UseTokens [OPTIONAL]
# Allows irc networks to use TOKEN commands instead of the
# standard commands. This saves bandwidth but can break older
# modules that are not set to trap for TOKEN - if you are using
# older modules do NOT use this option
#UseTokens
# UseSVS2MODE [OPTIONAL]
# On Unreal IRCD use SVS2MODE instead of SVSMODE, doing this will
# show services changing user modes.
#UseSVS2MODE
# NewsCount [OPTIONAL]
# The number of LOGON/OPER News item to display when a user logs
# on. The default value is 3
#NewsCount 3
# Numeric [OPTIONAL]
# Many ircd identify themselves with a Numeric when using this option
# consult your ircds documentation before using this
#Numeric 0
# 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
** MODIFIED CONFIGURATION DIRECTIVES **
** DELETED CONFIGURATION DIRECTIVES **
Anope Version 1.7.5
-------------------
** ADDED CONFIGURATION DIRECTIVES **
# UseSVSHOLD [OPTIONAL]
# Allows Bahamut-networks to use SVSHOLD instead of the services
# enforcer. This option has been introduced in Bahamut 1.4.35 and
# places a temporary Q:Line instead of introducing a new nick,
# which is better for both CPU and bandwidth. If you enable this
# option on a pre-1.4.35 Bahamut, it is most likely to break.
#UseSVSHOLD
** MODIFIED CONFIGURATION DIRECTIVES **
# NetworkDomain <name> [OPTIONAL]
#
# If your network has a common domain name, specify it there (for
# example, all IRCZONE servers have a name ending in ".irczone.cl",
# so "irczone.cl" would be set there.
#
# You can specify more than one Network Domain by separating each one by
# a space: NetworkDomain "localnet.net localnet.com"
#
# Note that this directive is no longer used by the GLOBAL command, since
# it uses a dynamic list of connected servers regardless of their
# domains. However, some modules may still use this value, so you might
# want to keep it just in case.
NetworkDomain "localnet.com"
** DELETED CONFIGURATION DIRECTIVES **
Anope Version 1.7.4
-------------------
** ADDED CONFIGURATION DIRECTIVES **
# NSNickTracking [OPTIONAL]
#
# When enabled, services will track your last nick identified when issuing
# nick changes.
#NSNickTracking
** MODIFIED CONFIGURATION DIRECTIVES **
** DELETED CONFIGURATION DIRECTIVES **
Anope Version 1.7.3
-------------------
** ADDED CONFIGURATION DIRECTIVES **
# BSCaseSensitive [OPTIONAL]
# This option will make botserv use cAsE sEnSiTiVe checking for badwords
# BSCaseSensitive
# MSMemoReceipt [OPTIONAL]
# Allow the use of memo receipts for the following groups:
# 1 - Opers Only
# 2 - Everybody
#
#MSMemoReceipt 1
Anope Version 1.7.2
--------------------
No Changes.
Anope Version 1.7.1
--------------------
** ADDED CONFIGURATION DIRECTIVES **
# UseRDB [OPTIONAL]
#
# Enable this if you want anope to load its data from a remote database.
# (e.g. MySQL)
#
#UseRDB
# NickRegDelay <seconds> [OPTIONAL]
# Prevents users from regging their nick if they are not
# connected for at least X seconds.
#NickRegDelay 30
** MODIFIED CONFIGURATION DIRECTIVES **
** DELETED CONFIGURATION DIRECTIVES **
-558
View File
@@ -1,558 +0,0 @@
Anope Version 1.8.0
-------------------
*** New Strings:
*** Mod Strings:
*** Del Strings:
Anope Version 1.7.24
--------------------
*** New Strings:
OPER_STATS_HOSTSERV_MEM
*** Mod Strings:
NICK_HELP_SASET_AUTOOP
*** Del Strings:
Anope Version 1.7.23b
--------------------
*** New Strings:
*** Mod Strings:
*** Del Strings:
Anope Version 1.7.23
--------------------
*** New Strings:
PASSWORD_TOO_LONG
CHAN_LOGOUT_FOUNDER_FAILED
*** Mod Strings:
OPER_HELP_OPER
NICK_HELP_SASET_PASSWORD
OPER_IGNORE_SYNTAX
OPER_HELP_IGNORE
CHAN_LOGOUT_ALL_SUCCEEDED
OPER_HELP_MODLIST
*** Del Strings:
PASSWORD_TRUNCATED
Anope Version 1.7.22
--------------------
*** New Strings:
NICK_SASET_LANGUAGE_SYNTAX
NICK_SASET_LANGUAGE_UNKNOWN
NICK_SASET_LANGUAGE_CHANGED
NICK_HELP_SASET_LANGUAGE
NICK_HELP_RESEND
*** Mod Strings:
NICK_HELP_SASET
NICK_RECOVERED
NICK_LIST_SERVADMIN_SYNTAX
NICK_SERVADMIN_HELP_LIST
CHAN_GETKEY_KEY
NICK_SERVADMIN_HELP_LIST
CHAN_SERVADMIN_HELP_LIST
OPER_HELP_GLOBAL
OPER_HELP_UMODE
OPER_HELP_OLINE
OPER_HELP_KICK
OPER_HELP_SVSNICK
OPER_HELP_SET_LOGCHAN
OPER_HELP_SET_SUPERADMIN
CHAN_HELP_AKICK
NICK_HELP_RECOVER
NICK_HELP_RELEASE
NEWS_HELP_LOGON
NEWS_HELP_OPER
OPER_HELP_IGNORE
OPER_IGNORE_TIME_DONE
OPER_IGNORE_PERM_DONE
OPER_IGNORE_DEL_DONE
*** Del Strings:
NICK_SET_UNKNOWN_OPTION_OR_BAD_NICK
OPER_HELP_KILLCLONES
Anope Version 1.7.21
--------------------
*** New Strings:
*** Mod Strings:
*** Del Strings:
Anope Version 1.7.20
--------------------
*** New Strings:
NICK_HELP_CONFIRM
CHAN_XOP_NOT_AVAILABLE
HELP_LIMIT_SERV_OPER
HELP_LIMIT_SERV_ADMIN
HELP_LIMIT_SERV_ROOT
HELP_LIMIT_IRC_OPER
HELP_LIMIT_HOST_SETTER
HELP_LIMIT_HOST_REMOVER
*** Mod Strings:
OPER_HELP_SET
In all of the following strings only the trailing 'Limited to ...' line has been removed:
OPER_HELP_EXCEPTION
OPER_HELP_SESSION
NICK_HELP_SASET
NICK_HELP_SASET_DISPLAY
NICK_HELP_SASET_PASSWORD
NICK_HELP_SASET_URL
NICK_HELP_SASET_EMAIL
NICK_HELP_SASET_ICQ
NICK_HELP_SASET_GREET
NICK_HELP_SASET_KILL
NICK_HELP_SASET_SECURE
NICK_HELP_SASET_PRIVATE
NICK_HELP_SASET_HIDE
NICK_HELP_SASET_MSG
NICK_HELP_SASET_NOEXPIRE
NICK_HELP_SASET_AUTOOP
NICK_SERVADMIN_HELP_GETPASS
NICK_SERVADMIN_HELP_GETEMAIL
NICK_SERVADMIN_HELP_FORBID
NICK_SERVADMIN_HELP_SUSPEND
NICK_SERVADMIN_HELP_UNSUSPEND
CHAN_SERVADMIN_HELP_SET_NOEXPIRE
CHAN_SERVADMIN_HELP_GETPASS
CHAN_SERVADMiN_HELP_FORBID
CHAN_SERVADMIN_HELP_SUSPEND
CHAN_SERVADMIN_HELP_UNSUSPEND
CHAN_SERVADMIN_HELP_STATUS
OPER_HELP_MODE
OPER_HELP_CLEARMODES
OPER_HELP_KICK
OPER_HELP_SVSNICK
OPER_HELP_AKILL
OPER_HELP_SGLINE
OPER_HELP_SQLINE
OPER_HELP_SZLINE
OPER_HELP_SET
OPER_HELP_NOOP
OPER_HELP_JUPE
OPER_HELP_RAW
OPER_HELP_UPDATE
OPER_HELP_RELOAD
OPER_HELP_QUIT
OPER_HELP_SHUTDOWN
OPER_HELP_RESTART
OPER_HELP_KILLCLONES
OPER_HELP_CHANLIST
OPER_HELP_USERLIST
OPER_HELP_MODLOAD
OPER_HELP_MODUNLOAD
OPER_HELP_MODINFO
OPER_HELP_MODLIST
BOT_SERVADMIN_HELP_SET_NOBOT
BOT_SERVADMIN_HELP_SET_PRIVATE
HOST_HELP_SET
HOST_HELP_DELALL
HOST_HELP_SETALL
HOST_HELP_DEL
HOST_HELP_LIST
*** Del Strings:
Anope Version 1.7.19
--------------------
*** New Strings:
*** Mod Strings:
CHAN_HELP_LIST
BOT_SET_SYNTAX
BOT_HELP_SET
*** Del Strings:
Anope Version 1.7.18
--------------------
*** New Strings:
*** Mod Strings:
*** Del Strings:
Anope Version 1.7.17
--------------------
*** New Strings:
*** Mod Strings:
*** Del Strings:
Anope Version 1.7.16
--------------------
*** New Strings:
*** Mod Strings:
*** Del Strings:
Anope Version 1.7.15
--------------------
*** New Strings:
INVALID_TARGET
NICK_SET_AUTOOP_SYNTAX
NICK_SET_AUTOOP_ON
NICK_SET_AUTOOP_OFF
BOT_LONG_IDENT
*** Mod Strings:
NICK_HELP_SET
*** Del Strings:
Anope Version 1.7.14
--------------------
*** New Strings:
CHAN_X_INVALID
*** Mod Strings:
*** Del Strings:
Anope Version 1.7.13
--------------------
*** New Strings:
*** Mod Strings:
*** Del Strings:
Anope Version 1.7.12
--------------------
*** New Strings:
OPER_STATS_UPLINK_SERVER
OPER_STATS_UPLINK_CAPAB
OPER_STATS_UPLINK_SERVER_COUNT
*** Mod Strings:
OPER_HELP_STATS
*** Del Strings:
Anope Version 1.7.11
---------------------
*** New Strings:
NICK_SASET_SYNTAX
NICK_SASET_DISABLED
NICK_SASET_UNKNOWN_OPTION
NICK_SASET_BAD_NICK
NICK_SASET_OPTION_DISABLED
NICK_SASET_DISPLAY_INVALID
NICK_SASET_DISPLAY_CHANGED
NICK_SASET_PASSWORD_FAILED
NICK_SASET_PASSWORD_CHANGED
NICK_SASET_PASSWORD_CHANGED_TO
NICK_SASET_LANGUAGE_SYNTAX
NICK_SASET_LANGUAGE_UNKNOWN
NICK_SASET_LANGUAGE_CHANGED
NICK_SASET_URL_CHANGED
NICK_SASET_URL_UNSET
NICK_SASET_EMAIL_CHANGED
NICK_SASET_EMAIL_UNSET
NICK_SASET_EMAIL_UNSET_IMPOSSIBLE
NICK_SASET_ICQ_CHANGED
NICK_SASET_ICQ_UNSET
NICK_SASET_ICQ_INVALID
NICK_SASET_GREET_CHANGED
NICK_SASET_GREET_UNSET
NICK_SASET_KILL_SYNTAX
NICK_SASET_KILL_IMMED_SYNTAX
NICK_SASET_KILL_ON
NICK_SASET_KILL_QUICK
NICK_SASET_KILL_IMMED
NICK_SASET_KILL_IMMED_DISABLED
NICK_SASET_KILL_OFF
NICK_SASET_SECURE_SYNTAX
NICK_SASET_SECURE_ON
NICK_SASET_SECURE_OFF
NICK_SASET_PRIVATE_SYNTAX
NICK_SASET_PRIVATE_ON
NICK_SASET_PRIVATE_OFF
NICK_SASET_HIDE_SYNTAX
NICK_SASET_HIDE_EMAIL_ON
NICK_SASET_HIDE_EMAIL_OFF
NICK_SASET_HIDE_MASK_ON
NICK_SASET_HIDE_MASK_OFF
NICK_SASET_HIDE_QUIT_ON
NICK_SASET_HIDE_QUIT_OFF
NICK_SASET_HIDE_STATUS_ON
NICK_SASET_HIDE_STATUS_OFF
NICK_SASET_MSG_SYNTAX
NICK_SASET_MSG_ON
NICK_SASET_MSG_OFF
NICK_SASET_NOEXPIRE_SYNTAX
NICK_SASET_NOEXPIRE_ON
NICK_SASET_NOEXPIRE_OFF
NICK_HELP_SASET
NICK_HELP_SASET_DISPLAY
NICK_HELP_SASET_PASSWORD
NICK_HELP_SASET_LANGUAGE
NICK_HELP_SASET_URL
NICK_HELP_SASET_EMAIL
NICK_HELP_SASET_ICQ
NICK_HELP_SASET_GREET
NICK_HELP_SASET_KILL
NICK_HELP_SASET_SECURE
NICK_HELP_SASET_PRIVATE
NICK_HELP_SASET_HIDE
NICK_HELP_SASET_MSG
NICK_HELP_SASET_NOEXPIRE
NICK_HELP_CMD_SASET
*** Mod Strings:
OPER_HELP_MODLIST
*** Del Strings:
NICK_SERVADMIN_HELP_SET
NICK_SERVADMIN_HELP_SET_NOEXPIRE
NICK_SET_NOEXPIRE_SYNTAX
NICK_SET_NOEXPIRE_ON
NICK_SET_NOEXPIRE_OFF
NICK_SASET_LANGUAGE_SYNTAX
NICK_SASET_LANGUAGE_UNKNOWN
NICK_SASET_LANGUAGE_CHANGED
NICK_HELP_SASET_LANGUAGE
Anope Version 1.7.10
--------------------
*** New Strings:
*** Mod Strings:
*** Del Strings:
Anope Version 1.7.9
-------------------
*** New Strings:
CHAN_HELP_IRCD_HALFOP
CHAN_HELP_IRCD_PROTECT
CHAN_GETKEY_SYNTAX
CHAN_GETKEY_NOKEY
CHAN_GETKEY_KEY
OPER_SET_SQL_ERROR_DISABLED
NICK_X_SUSPENDED
NICK_INFO_SUSPENDED
NICK_SUSPEND_SYNTAX
NICK_SUSPEND_SUCCEEDED
NICK_SUSPEND_FAILED
NICK_UNSUSPEND_SYNTAX
NICK_UNSUSPEND_SUCCEEDED
NICK_UNSUSPEND_FAILED
NICK_SERVADMIN_HELP_SUSPEND
NICK_SERVADMIN_HELP_UNSUSPEND
*** Mod Strings:
OPER_HELP_SET
NICK_HELP
CHAN_AOP_CLEAR
CHAN_HOP_CLEAR
CHAN_SOP_CLEAR
CHAN_VOP_CLEAR
CHAN_ACCESS_CLEAR
CHAN_AKICK_CLEAR
CHAN_SET_KEEPTOPIC_ON
CHAN_SET_KEEPTOPIC_OFF
CHAN_SET_TOPICLOCK_ON
CHAN_SET_TOPICLOCK_OFF
CHAN_SET_PEACE_ON
CHAN_SET_PEACE_OFF
CHAN_SET_PRIVATE_ON
CHAN_SET_PRIVATE_OFF
CHAN_SET_SECUREOPS_ON
CHAN_SET_SECUREOPS_OFF
CHAN_SET_SECUREFOUNDER_ON
CHAN_SET_SECUREFOUNDER_OFF
CHAN_SET_RESTRICTED_ON
CHAN_SET_RESTRICTED_OFF
CHAN_SET_SECURE_ON
CHAN_SET_SECURE_OFF
CHAN_SET_SIGNKICK_ON
CHAN_SET_SIGNKICK_LEVEL
CHAN_SET_SIGNKICK_OFF
CHAN_SET_OPNOTICE_ON
CHAN_SET_OPNOTICE_OFF
CHAN_SET_XOP_ON
CHAN_SET_XOP_OFF
*** Del Strings:
CHAN_HELP_ULTIMATE
OPER_STATS_PROXY_MEM
OPER_CACHE_SYNTAX
OPER_CACHE_DISABLED
OPER_CACHE_NOT_FOUND
OPER_CACHE_REMOVED
OPER_CACHE_HEADER
OPER_CACHE_LIST
OPER_CACHE_FOOTER
OPER_CACHE_QUEUED
OPER_CACHE_PROGRESS
OPER_CACHE_NORMAL
OPER_CACHE_WINGATE
OPER_CACHE_SOCKS4
OPER_CACHE_SOCKS5
OPER_CACHE_HTTP
OPER_HELP_CACHE
Anope Version 1.7.8
-------------------
*** New Strings:
OPER_HELP_SET_IGNORE
OPER_HELP_ADMIN_CMD_EXTRA
OPER_HELP_ADMIN_CMD_OLINE
OPER_HELP_ADMIN_CMD_UMODE
OPER_HELP_ADMIN_CMD_SVSNICK
OPER_HELP_OPER_CMD_EXTRA
OPER_HELP_OPER_CMD_SGLINE
OPER_HELP_OPER_CMD_SQLINE
OPER_HELP_OPER_CMD_SZLINE
*** Mod Strings:
HOST_OFF_UNREAL
OPER_HELP_OPER_CMD
OPER_HELP_ADMIN_CMD
*** Del Strings:
Anope Version 1.7.7
-------------------
*** New Strings:
MEMO_NO_RSEND_SELF
NICK_REGISTERED_NO_MASK
OPER_ADMIN_MOVED
OPER_OPER_MOVED
OPER_HELP_SET_SQL
OPER_SET_SQL_ON
OPER_SET_SQL_OFF
OPER_SET_SQL_ERROR
OPER_SET_SQL_ERROR_INIT
OPER_EXCEPTION_EXISTS
OPER_EXCEPTION_CHANGED
OPER_SET_LIST_OPTION_ON
OPER_SET_LIST_OPTION_OFF
OPER_HELP_SET_LIST
OPER_SUPER_ADMIN_NOT_ENABLED
*** Mod Strings:
BOT_SERVADMIN_HELP_BOT
NICK_HELP_STATUS
*** Del Strings:
Anope Version 1.7.6
-------------------
*** New Strings:
CHAN_REGISTER_NONE_CHANNEL
CHAN_SYMBOL_REQUIRED
OPER_SVSNICK_UNSUPPORTED
OPER_SQLINE_UNSUPPORTED
OPER_SVSO_UNSUPPORTED
OPER_UMODE_UNSUPPORTED
CHAN_CLEARED_INVITES
NICK_INFO_VHOST2
NICK_STATUS_0
NICK_STATUS_1
NICK_STATUS_2
NICK_STATUS_3
CHAN_STATUS_SYNTAX
CHAN_STATUS_NOT_REGGED
CHAN_STATUS_FORBIDDEN
CHAN_STATUS_NOTONLINE
CHAN_STATUS_INFO
NICK_INFO_EXPIRE
NICK_GLIST_REPLY
NICK_GLIST_REPLY_ADMIN
CHAN_INFO_EXPIRE
NICK_ACCESS_LIST_EMPTY
NICK_ACCESS_LIST_X_EMPTY
*** Mod Strings:
*** Del Strings:
Anope Version 1.7.5
-------------------
*** New Strings:
*** Mod Strings:
MEMO_HELP
CHAN_LEVEL_NOJOIN
*** Del Strings:
Anope Version 1.7.4
-------------------
*** New Strings:
CHAN_CLEARED_HOPS
OPER_MODULE_LIST_HEADER
OPER_MODULE_LIST_FOOTER
NICK_X_IS_SERVICES
*** Mod Strings:
CHAN_HELP_CLEAR
*** Del Strings:
Anope Version 1.7.3
-------------------
*** New Strings:
MEMO_RSEND_PLEASE_WAIT
MEMO_RSEND_DISABLED
MEMO_RSEND_SYNTAX
MEMO_RSEND_NICK_MEMO_TEXT
MEMO_RSEND_CHAN_MEMO_TEXT
MEMO_RSEND_USER_NOTIFICATION
MEMO_HELP_RSEND
MEMO_CHECK_SYNTAX
MEMO_CHECK_NOT_READ
MEMO_CHECK_READ
MEMO_CHECK_NO_MEMO
MEMO_HELP_CHECK
*** Mod Strings:
MEMO_HELP
NICK_LIST_SERVADMIN_SYNTAX
NICK_SERVADMIN_HELP_LIST
Anope Version 1.7.2
--------------------
No Changes.
Anope Version 1.7.1
--------------------
*** New Strings:
MEMO_SET_NOTIFY_MAIL
MEMO_SET_NOTIFY_NOMAIL
MEMO_SET_NOTIFY_INVALIDMAIL
MEMO_MAIL_SUBJECT
MEMO_MAIL_TEXT1
MEMO_MAIL_TEXT2
MEMO_MAIL_TEXT3
NICK_INFO_SERVICES_ROOT
NICK_SET_HIDE_STATUS_ON
NICK_SET_HIDE_STATUS_OFF
NICK_REG_DELAY
*** Mod Strings:
MEMO_SET_NOTIFY_SYNTAX
NICK_HELP_SET_HIDE
*** Del Strings:
-129
View File
@@ -1,129 +0,0 @@
Anope Version 1.8.0
-------------------
- NONE
Anope Version 1.7.24
--------------------
- NONE
Anope Version 1.7.23b
--------------------
- NONE
Anope Version 1.7.23
--------------------
- NONE
Anope Version 1.7.22
--------------------
- NONE
Anope Version 1.7.21
--------------------
- NONE
Anope Version 1.7.20
--------------------
ALTER TABLE `anope_ns_request` DROP INDEX `nick_index` ;
ALTER TABLE `anope_ns_core` DROP INDEX `display_index` ;
ALTER TABLE `anope_ns_access` ADD UNIQUE (`display`) ;
ALTER TABLE `anope_ms_info` ADD UNIQUE (`nm_id` , `serv`) ;
ALTER TABLE `anope_ns_alias` DROP INDEX `nick_index` ;
ALTER TABLE `anope_cs_info` DROP INDEX `name_index` ;
ALTER TABLE `anope_cs_access` ADD UNIQUE (`channel` , `display`) ;
ALTER TABLE `anope_cs_levels` ADD UNIQUE (`channel` , `position`) ;
ALTER TABLE `anope_cs_akicks` CHANGE `dmask` `dmask` VARCHAR( 255 ) NOT NULL ;
ALTER TABLE `anope_cs_akicks` ADD UNIQUE (`channel` , `dmask`) ;
ALTER TABLE `anope_cs_badwords` CHANGE `word` `word` VARCHAR( 255 ) NOT NULL ;
ALTER TABLE `anope_cs_badwords` ADD UNIQUE (`channel` , `word`) ;
ALTER TABLE `anope_cs_ttb` ADD UNIQUE (`channel` , `ttb_id`) ;
ALTER TABLE `anope_os_akills` CHANGE `user` `user` VARCHAR( 255 ) NOT NULL , CHANGE `host` `host` VARCHAR( 255 ) NOT NULL ;
ALTER TABLE `anope_os_akills` ADD UNIQUE (`user` , `host`) ;
ALTER TABLE `anope_os_sglines` CHANGE `mask` `mask` VARCHAR( 255 ) NOT NULL ;
ALTER TABLE `anope_os_sglines` ADD UNIQUE (`mask`) ;
ALTER TABLE `anope_os_sqlines` CHANGE `mask` `mask` VARCHAR( 255 ) NOT NULL ;
ALTER TABLE `anope_os_sqlines` ADD UNIQUE (`mask`) ;
ALTER TABLE `anope_os_szlines` CHANGE `mask` `mask` VARCHAR( 255 ) NOT NULL ;
ALTER TABLE `anope_os_szlines` ADD UNIQUE (`mask`) ;
ALTER TABLE `anope_os_news` ADD UNIQUE (`type` , `num` , `time`) ;
ALTER TABLE `anope_os_exceptions` CHANGE `mask` `mask` VARCHAR( 255 ) NOT NULL ;
ALTER TABLE `anope_os_exceptions` ADD UNIQUE (`mask`) ;
ALTER TABLE `anope_hs_core` DROP INDEX `nick_index` ;
ALTER TABLE `anope_bs_core` DROP INDEX `nick_index` ;
ALTER TABLE `anope_ms_info` CHANGE `receiver` `receiver` VARCHAR( 255 ) NOT NULL ;
ALTER TABLE `anope_ms_info` ADD INDEX ( `receiver` , `serv` ) ;
Anope Version 1.7.19
--------------------
- NONE
Anope Version 1.7.18
--------------------
- DROP TABLE IF EXISTS `anope_os_status`
- ALTER TABLE `anope_bs_core` ADD `active` TINYINT( 1 ) DEFAULT '1' NOT NULL
- ALTER TABLE `anope_cs_access` ADD `active` TINYINT( 1 ) DEFAULT '1' NOT NULL
- ALTER TABLE `anope_cs_akicks` ADD `active` TINYINT( 1 ) DEFAULT '1' NOT NULL
- ALTER TABLE `anope_cs_badwords` ADD `active` TINYINT( 1 ) DEFAULT '1' NOT NULL
- ALTER TABLE `anope_cs_levels` ADD `active` TINYINT( 1 ) DEFAULT '1' NOT NULL
- ALTER TABLE `anope_cs_ttb` ADD `active` TINYINT( 1 ) DEFAULT '1' NOT NULL
- ALTER TABLE `anope_hs_core` ADD `active` TINYINT( 1 ) DEFAULT '1' NOT NULL
- ALTER TABLE `anope_ms_info` ADD `active` TINYINT( 1 ) DEFAULT '1' NOT NULL
- ALTER TABLE `anope_ns_access` ADD `active` TINYINT( 1 ) DEFAULT '1' NOT NULL
- ALTER TABLE `anope_ns_request` CHANGE `active` `active` TINYINT( 1 ) DEFAULT '1' NOT NULL
- ALTER TABLE `anope_os_akills` ADD `active` TINYINT( 1 ) DEFAULT '1' NOT NULL
- ALTER TABLE `anope_os_exceptions` ADD `active` TINYINT( 1 ) DEFAULT '1' NOT NULL
- ALTER TABLE `anope_os_news` ADD `active` TINYINT( 1 ) DEFAULT '1' NOT NULL
- ALTER TABLE `anope_os_sglines` ADD `active` TINYINT( 1 ) DEFAULT '1' NOT NULL
- ALTER TABLE `anope_os_sqlines` ADD `active` TINYINT( 1 ) DEFAULT '1' NOT NULL
- ALTER TABLE `anope_os_szlines` ADD `active` TINYINT( 1 ) DEFAULT '1' NOT NULL
Anope Version 1.7.17
--------------------
- 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',
PRIMARY KEY (ct_id)
) TYPE=MyISAM
- ALTER TABLE anope_cs_info DROP ttb
Anope Version 1.7.16
--------------------
- NONE
Anope Version 1.7.15
--------------------
- NONE
Anope Version 1.7.14
--------------------
- NONE
Anope Version 1.7.13
--------------------
- NONE
Anope Version 1.7.12
--------------------
- NONE
Anope Version 1.7.11
--------------------
- NONE
Anope Version 1.7.10
--------------------
- NONE
Anope Version 1.7.9
-------------------
- DROP TABLE IF EXISTS anope_os_cache
Anope Version 1.7.8
-------------------
- NONE
Anope Version 1.7.7
-------------------
- ALTER TABLE anope_ns_alias CHANGE status status int(11) unsigned NOT NULL default '0'
+30 -7
View File
@@ -2,7 +2,7 @@
#
# Configuration script for Services.
#
# Anope (c) 2003-2008 Anope team
# Anope (c) 2003-2010 Anope team
# Contact us at team@anope.org
#
# This program is free but copyrighted software; see the file COPYING for
@@ -113,9 +113,9 @@ Run_Build_System () {
REAL_SOURCE_DIR="$SOURCE_DIR"
fi
echo "cmake $GEN_TYPE $WITH_INST $WITH_RUN $WITH_PERM $BUILD_TYPE $RUN_CC_PL $REAL_SOURCE_DIR"
echo "cmake $GEN_TYPE $WITH_INST $WITH_RUN $WITH_PERM $BUILD_TYPE $RUN_CC_PL $EXTRA_CONFIG_ARGS $REAL_SOURCE_DIR"
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 $EXTRA_CONFIG_ARGS $REAL_SOURCE_DIR
echo ""
if [ "$SOURCE_DIR" = "." ] ; then
@@ -125,9 +125,9 @@ Run_Build_System () {
echo "Now run make to build Anope."
fi
else
echo "./configure $WITH_INST $WITH_RUN $WITH_PERM $BUILD_TYPE $RUN_CC_PL"
echo "./configure $WITH_INST $WITH_RUN $WITH_PERM $BUILD_TYPE $EXTRA_CONFIG_ARGS $RUN_CC_PL"
./configure $WITH_INST $WITH_RUN $WITH_PERM $BUILD_TYPE $RUN_CC_PL
./configure $WITH_INST $WITH_RUN $WITH_PERM $BUILD_TYPE $EXTRA_CONFIG_ARGS $RUN_CC_PL
fi
}
@@ -154,9 +154,15 @@ RUNGROUP=
UMASK=
DEBUG="yes"
USE_RUN_CC_PL="no"
EXTRA_CONFIG_ARGS=
CAN_QUICK="no"
SOURCE_DIR=`dirname $0`
which cmake > /dev/null
if [ $? -ne 0 ] ; then
BUILD_SYSTEM="configure"
fi
###########################################################################
# Check out the options
###########################################################################
@@ -248,6 +254,11 @@ done
BUILD_SYSTEM=$INPUT
echo ""
if [ "$SOURCE_DIR" != "." -a "$BUILD_SYSTEM" = "configure" ] ; then
echo "You can not use configure unless you are in the same folder as Config!"
exit 0
fi
ok=0
echo "In what directory do you want the binaries to be installed?"
while [ $ok -eq 0 ] ; do
@@ -278,7 +289,6 @@ done
INSTDIR=$INPUT
echo ""
####
OLD_RUNGROUP="$RUNGROUP"
@@ -358,7 +368,7 @@ 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 "cause warnings and errors (if any) to be colored yellow and red,"
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"
@@ -377,6 +387,18 @@ echo ""
####
echo "Are there any extra arguments you wish to pass to $BUILD_SYSTEM?"
echo "(You may only need to do this if $BUILD_SYSTEM is unable to locate"
echo "missing dependencies without hints)"
echo2 "[$EXTRA_CONFIG_ARGS] "
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
if [ "$INPUT" ] ; then
EXTRA_CONFIG_ARGS=$INPUT
fi
echo ""
####
################################################################################
# Store values
################################################################################
@@ -390,6 +412,7 @@ RUNGROUP="$RUNGROUP"
UMASK=$UMASK
DEBUG="$DEBUG"
USE_RUN_CC_PL="$USE_RUN_CC_PL"
EXTRA_CONFIG_ARGS="$EXTRA_CONFIG_ARGS"
EOT
echo "done."
+2 -1
View File
@@ -7,6 +7,7 @@ LDPROFILE=
SHELL=/bin/sh
INSTDIR=@INSTDIR@
MAKEBIN=@MAKEBIN@
MYSQLDIR=@MYSQLDIR@
INSTALL=@INSTALL@
RM=@RM@
CP=@CP@
@@ -25,7 +26,7 @@ MAKEARGS = 'CFLAGS=${CFLAGS}' 'CC=${CC}' 'ANOPELIBS=${ANOPELIBS}' \
'TOUCH=${TOUCH}' 'SHELL=${SHELL}' \
'RUNGROUP=${RUNGROUP}' \
'SHARED=${SHARED}' 'MODULEFLAGS=${MODULEFLAGS}' \
'MAKEBIN=${MAKEBIN}'
'MAKEBIN=${MAKEBIN}' 'MYSQLDIR=${MYSQLDIR}'
build: language headers
@${MAKE} -C src ${MAKEARGS} all
+5
View File
@@ -0,0 +1,5 @@
# This file is external to the read_from_file macro in Anope.cmake in order to
# get around a possible memory leak in older versions of CMake.
file(READ "${FILE}" RESULT)
message("${RESULT}")
-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
+200 -309
View File
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.62.
# Generated by GNU Autoconf 2.63.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
@@ -635,75 +635,74 @@ ac_includes_default="\
# include <unistd.h>
#endif"
ac_subst_vars='SHELL
PATH_SEPARATOR
PACKAGE_NAME
PACKAGE_TARNAME
PACKAGE_VERSION
PACKAGE_STRING
PACKAGE_BUGREPORT
exec_prefix
prefix
program_transform_name
bindir
sbindir
libexecdir
datarootdir
datadir
sysconfdir
sharedstatedir
localstatedir
includedir
oldincludedir
docdir
infodir
htmldir
dvidir
pdfdir
psdir
libdir
localedir
mandir
DEFS
ECHO_C
ECHO_N
ECHO_T
LIBS
build_alias
host_alias
target_alias
CC
CFLAGS
LDFLAGS
CPPFLAGS
ac_ct_CC
EXEEXT
OBJEXT
RM
CP
TOUCH
INSTALL
MYSQLCONF
ANOPELIBS
CPP
GREP
EGREP
SHARED
MODULEFLAGS
RUNGROUP
INSTDIR
MAKEBIN
ac_subst_vars='LTLIBOBJS
LIBOBJS
LTLIBOBJS'
MYSQLDIR
MAKEBIN
INSTDIR
RUNGROUP
MODULEFLAGS
SHARED
EGREP
GREP
CPP
ANOPELIBS
INSTALL
TOUCH
CP
RM
OBJEXT
EXEEXT
ac_ct_CC
CPPFLAGS
LDFLAGS
CFLAGS
CC
target_alias
host_alias
build_alias
LIBS
ECHO_T
ECHO_N
ECHO_C
DEFS
mandir
localedir
libdir
psdir
pdfdir
dvidir
htmldir
infodir
docdir
oldincludedir
includedir
localstatedir
sharedstatedir
sysconfdir
datadir
datarootdir
libexecdir
sbindir
bindir
program_transform_name
prefix
exec_prefix
PACKAGE_BUGREPORT
PACKAGE_STRING
PACKAGE_VERSION
PACKAGE_TARNAME
PACKAGE_NAME
PATH_SEPARATOR
SHELL'
ac_subst_files=''
ac_user_opts='
enable_option_checking
with_mysql
with_mysqlconfig_path
with_rungroup
with_permissions
with_instdir
with_makebin
with_mysqlpp
with_optimization
with_debugsym
'
@@ -1138,9 +1137,9 @@ fi
if test -n "$ac_unrecognized_opts"; then
case $enable_option_checking in
no) ;;
fatal) { $as_echo "$as_me: error: Unrecognized options: $ac_unrecognized_opts" >&2
fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
{ (exit 1); exit 1; }; } ;;
*) $as_echo "$as_me: WARNING: Unrecognized options: $ac_unrecognized_opts" >&2 ;;
*) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
esac
fi
@@ -1193,7 +1192,7 @@ test "$silent" = yes && exec 6>/dev/null
ac_pwd=`pwd` && test -n "$ac_pwd" &&
ac_ls_di=`ls -di .` &&
ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
{ $as_echo "$as_me: error: Working directory cannot be determined" >&2
{ $as_echo "$as_me: error: working directory cannot be determined" >&2
{ (exit 1); exit 1; }; }
test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
{ $as_echo "$as_me: error: pwd does not report name of working directory" >&2
@@ -1334,14 +1333,13 @@ if test -n "$ac_init_help"; then
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--without-mysql Do not use MySQL or attempt to find it
--with-mysqlconfig-path=PATH Complete path to the mysql_config executable
--with-rungroup=group Specify the rungroup for anope
--with-permissions=permissions Specify the default permissions for anope
--with-instdir=instdir Specify the default install dir for anope
--with-makebin=run-cc.pl Specify the default make binary to use
--with-optimization=1|2|3|4|5 Specify the optimization level
--with-debugsym Include debugging symbols
--with-rungroup=group Specify the rungroup for anope
--with-permissions=permissions Specify the default permissions for anope
--with-instdir=instdir Specify the default install dir for anope
--with-makebin=run-cc.pl Specify the default make binary to use
--with-mysqlpp=/usr/local/ The base directory of the MySQL++ installation
--with-optimization=1|2|3|4|5 Specify the optimization level
--with-debugsym Include debugging symbols
Some influential environment variables:
CC C compiler command
@@ -1419,7 +1417,7 @@ test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
configure
generated by GNU Autoconf 2.62
generated by GNU Autoconf 2.63
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
@@ -1433,7 +1431,7 @@ This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by $as_me, which was
generated by GNU Autoconf 2.62. Invocation command line was
generated by GNU Autoconf 2.63. Invocation command line was
$ $0 $@
@@ -1556,8 +1554,8 @@ _ASBOX
case $ac_val in #(
*${as_nl}*)
case $ac_var in #(
*_cv_*) { $as_echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
$as_echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
*_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
esac
case $ac_var in #(
_ | IFS | as_nl) ;; #(
@@ -1760,6 +1758,8 @@ $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
fi
done
if $ac_cache_corrupted; then
{ $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
{ { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
@@ -1891,12 +1891,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet. If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet. If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
CC=$ac_ct_CC
@@ -2095,12 +2091,8 @@ done
else
case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet. If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&5
$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet. If you think this
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
CC=$ac_ct_CC
@@ -2110,11 +2102,13 @@ fi
fi
test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
See \`config.log' for more details." >&5
$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
{ (exit 1); exit 1; }; }; }
# Provide some information about the compiler.
$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
@@ -2244,11 +2238,13 @@ if test -z "$ac_file"; then
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
See \`config.log' for more details." >&5
$as_echo "$as_me: error: C compiler cannot create executables
See \`config.log' for more details." >&2;}
{ (exit 77); exit 77; }; }
{ (exit 77); exit 77; }; }; }
fi
ac_exeext=$ac_cv_exeext
@@ -2276,13 +2272,15 @@ $as_echo "$ac_try_echo") >&5
if test "$cross_compiling" = maybe; then
cross_compiling=yes
else
{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
See \`config.log' for more details." >&5
$as_echo "$as_me: error: cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
{ (exit 1); exit 1; }; }; }
fi
fi
fi
@@ -2325,11 +2323,13 @@ for ac_file in conftest.exe conftest conftest.*; do
esac
done
else
{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details." >&5
$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
{ (exit 1); exit 1; }; }; }
fi
rm -f conftest$ac_cv_exeext
@@ -2383,11 +2383,13 @@ else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
See \`config.log' for more details." >&5
$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
{ (exit 1); exit 1; }; }; }
fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
@@ -3024,7 +3026,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_inet_ntoa" >&5
$as_echo "$ac_cv_lib_nsl_inet_ntoa" >&6; }
if test $ac_cv_lib_nsl_inet_ntoa = yes; then
if test "x$ac_cv_lib_nsl_inet_ntoa" = x""yes; then
ANOPELIBS="$ANOPELIBS-lnsl "
fi
@@ -3093,7 +3095,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
$as_echo "$ac_cv_lib_socket_socket" >&6; }
if test $ac_cv_lib_socket_socket = yes; then
if test "x$ac_cv_lib_socket_socket" = x""yes; then
ANOPELIBS="$ANOPELIBS-lsocket "
fi
@@ -3162,7 +3164,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_query" >&5
$as_echo "$ac_cv_lib_resolv_res_query" >&6; }
if test $ac_cv_lib_resolv_res_query = yes; then
if test "x$ac_cv_lib_resolv_res_query" = x""yes; then
ANOPELIBS="$ANOPELIBS-lresolv "
fi
@@ -3231,7 +3233,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_revoke" >&5
$as_echo "$ac_cv_lib_bsd_revoke" >&6; }
if test $ac_cv_lib_bsd_revoke = yes; then
if test "x$ac_cv_lib_bsd_revoke" = x""yes; then
ANOPELIBS="$ANOPELIBS-lbsd "
fi
@@ -3316,164 +3318,16 @@ else
$as_echo "no" >&6; }
fi
DIS_MYSQL=" MySQL: No"
# Check whether --with-mysql was given.
if test "${with_mysql+set}" = set; then
withval=$with_mysql;
else
# Check whether --with-mysqlconfig-path was given.
if test "${with_mysqlconfig_path+set}" = set; then
withval=$with_mysqlconfig_path; mysql_config_path="$withval"
else
mysql_config_path=""
fi
MYSQLCONF=""
if test "$mysql_config_path" != ""; then
if test -x "$mysql_config_path"; then
MYSQLCONF="$mysql_config_path"
echo "checking for mysql_config... $MYSQLCONF" >&6
fi
fi
if test "$MYSQLCONF" = ""; then
# Extract the first word of "mysql_config", so it can be a program name with args.
set dummy mysql_config; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_MYSQLCONF+set}" = set; then
$as_echo_n "(cached) " >&6
else
case $MYSQLCONF in
[\\/]* | ?:[\\/]*)
ac_cv_path_MYSQLCONF="$MYSQLCONF" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_MYSQLCONF="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
test -z "$ac_cv_path_MYSQLCONF" && ac_cv_path_MYSQLCONF=""""
;;
esac
fi
MYSQLCONF=$ac_cv_path_MYSQLCONF
if test -n "$MYSQLCONF"; then
{ $as_echo "$as_me:$LINENO: result: $MYSQLCONF" >&5
$as_echo "$MYSQLCONF" >&6; }
else
{ $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi
fi
if test "$MYSQLCONF" != ""; then
hold_cflags="$CFLAGS"
hold_ldflags="$LDFLAGS"
if test "$MYSQL_CFLAGS" = ""; then
MYSQL_CFLAGS="`$MYSQLCONF --cflags`"
fi
if test "$MYSQL_LDFLAGS" = ""; then
MYSQL_LDFLAGS="`$MYSQLCONF --libs`"
fi
CFLAGS="$CFLAGS $MYSQL_CFLAGS"
LDFLAGS="$LDFLAGS $MYSQL_LDFLAGS"
echo $ECHO_N "checking if mysql_config produces valid values... $ECHO_C" >&6
if test "$cross_compiling" = yes; then
{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
See \`config.log' for more details." >&5
$as_echo "$as_me: error: cannot run test program while cross compiling
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <mysql.h>
int main()
{
MYSQL *mysql = mysql_init(0);
return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>&5
ac_status=$?
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
{ (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_try") 2>&5
ac_status=$?
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_mysql_valid=yes
else
$as_echo "$as_me: program exited with status $ac_status" >&5
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
ac_cv_mysql_valid=no
fi
rm -rf conftest.dSYM
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
echo $ac_cv_mysql_valid >&6
if test "$ac_cv_mysql_valid" = "yes"; then
DIS_MYSQL=" MySQL: Yes"
else
CFLAGS="$hold_cflags"
LDFLAGS="$hold_ldflags"
fi
fi
fi
{ $as_echo "$as_me:$LINENO: checking whether this is a bit or little endian system" >&5
$as_echo_n "checking whether this is a bit or little endian system... " >&6; }
if test "$cross_compiling" = yes; then
{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
See \`config.log' for more details." >&5
$as_echo "$as_me: error: cannot run test program while cross compiling
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
{ (exit 1); exit 1; }; }; }
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -3765,11 +3619,13 @@ rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
:
else
{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details." >&5
$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
{ (exit 1); exit 1; }; }; }
fi
ac_ext=c
@@ -4152,8 +4008,9 @@ ac_res=`eval 'as_val=${'$as_ac_Header'}
$as_echo "$as_val"'`
{ $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if test `eval 'as_val=${'$as_ac_Header'}
$as_echo "$as_val"'` = yes; then
as_val=`eval 'as_val=${'$as_ac_Header'}
$as_echo "$as_val"'`
if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
@@ -4290,7 +4147,7 @@ fi
$as_echo "$ac_cv_header_sys_types_h" >&6; }
fi
if test $ac_cv_header_sys_types_h = yes; then
if test "x$ac_cv_header_sys_types_h" = x""yes; then
cat >>confdefs.h <<\_ACEOF
#define HAS_SYS_TYPES_H 1
@@ -4387,7 +4244,7 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
$as_echo "$ac_cv_func_dlopen" >&6; }
if test $ac_cv_func_dlopen = yes; then
if test "x$ac_cv_func_dlopen" = x""yes; then
:
else
{ $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
@@ -4455,7 +4312,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
if test $ac_cv_lib_dl_dlopen = yes; then
if test "x$ac_cv_lib_dl_dlopen" = x""yes; then
ANOPELIBS="$ANOPELIBS -ldl"
@@ -4709,7 +4566,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uint8_t" >&5
$as_echo "$ac_cv_type_uint8_t" >&6; }
if test $ac_cv_type_uint8_t = yes; then
if test "x$ac_cv_type_uint8_t" = x""yes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_UINT8_T 1
@@ -4811,7 +4668,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_u_int8_t" >&5
$as_echo "$ac_cv_type_u_int8_t" >&6; }
if test $ac_cv_type_u_int8_t = yes; then
if test "x$ac_cv_type_u_int8_t" = x""yes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_U_INT8_T 1
@@ -4913,7 +4770,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_int16_t" >&5
$as_echo "$ac_cv_type_int16_t" >&6; }
if test $ac_cv_type_int16_t = yes; then
if test "x$ac_cv_type_int16_t" = x""yes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_INT16_T 1
@@ -5015,7 +4872,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uint16_t" >&5
$as_echo "$ac_cv_type_uint16_t" >&6; }
if test $ac_cv_type_uint16_t = yes; then
if test "x$ac_cv_type_uint16_t" = x""yes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_UINT16_T 1
@@ -5117,7 +4974,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_u_int16_t" >&5
$as_echo "$ac_cv_type_u_int16_t" >&6; }
if test $ac_cv_type_u_int16_t = yes; then
if test "x$ac_cv_type_u_int16_t" = x""yes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_U_INT16_T 1
@@ -5219,7 +5076,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_int32_t" >&5
$as_echo "$ac_cv_type_int32_t" >&6; }
if test $ac_cv_type_int32_t = yes; then
if test "x$ac_cv_type_int32_t" = x""yes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_INT32_T 1
@@ -5321,7 +5178,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uint32_t" >&5
$as_echo "$ac_cv_type_uint32_t" >&6; }
if test $ac_cv_type_uint32_t = yes; then
if test "x$ac_cv_type_uint32_t" = x""yes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_UINT32_T 1
@@ -5423,7 +5280,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_u_int32_t" >&5
$as_echo "$ac_cv_type_u_int32_t" >&6; }
if test $ac_cv_type_u_int32_t = yes; then
if test "x$ac_cv_type_u_int32_t" = x""yes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_U_INT32_T 1
@@ -5560,7 +5417,7 @@ fi
$as_echo "$ac_cv_header_strings_h" >&6; }
fi
if test $ac_cv_header_strings_h = yes; then
if test "x$ac_cv_header_strings_h" = x""yes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_STRINGS_H 1
@@ -5696,7 +5553,7 @@ fi
$as_echo "$ac_cv_header_sys_select_h" >&6; }
fi
if test $ac_cv_header_sys_select_h = yes; then
if test "x$ac_cv_header_sys_select_h" = x""yes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_SYS_SELECT_H 1
@@ -5797,8 +5654,9 @@ ac_res=`eval 'as_val=${'$as_ac_var'}
$as_echo "$as_val"'`
{ $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if test `eval 'as_val=${'$as_ac_var'}
$as_echo "$as_val"'` = yes; then
as_val=`eval 'as_val=${'$as_ac_var'}
$as_echo "$as_val"'`
if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -5900,8 +5758,9 @@ ac_res=`eval 'as_val=${'$as_ac_var'}
$as_echo "$as_val"'`
{ $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if test `eval 'as_val=${'$as_ac_var'}
$as_echo "$as_val"'` = yes; then
as_val=`eval 'as_val=${'$as_ac_var'}
$as_echo "$as_val"'`
if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -6003,8 +5862,9 @@ ac_res=`eval 'as_val=${'$as_ac_var'}
$as_echo "$as_val"'`
{ $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if test `eval 'as_val=${'$as_ac_var'}
$as_echo "$as_val"'` = yes; then
as_val=`eval 'as_val=${'$as_ac_var'}
$as_echo "$as_val"'`
if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -6106,8 +5966,9 @@ ac_res=`eval 'as_val=${'$as_ac_var'}
$as_echo "$as_val"'`
{ $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if test `eval 'as_val=${'$as_ac_var'}
$as_echo "$as_val"'` = yes; then
as_val=`eval 'as_val=${'$as_ac_var'}
$as_echo "$as_val"'`
if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -6209,8 +6070,9 @@ ac_res=`eval 'as_val=${'$as_ac_var'}
$as_echo "$as_val"'`
{ $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if test `eval 'as_val=${'$as_ac_var'}
$as_echo "$as_val"'` = yes; then
as_val=`eval 'as_val=${'$as_ac_var'}
$as_echo "$as_val"'`
if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -6312,8 +6174,9 @@ ac_res=`eval 'as_val=${'$as_ac_var'}
$as_echo "$as_val"'`
{ $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if test `eval 'as_val=${'$as_ac_var'}
$as_echo "$as_val"'` = yes; then
as_val=`eval 'as_val=${'$as_ac_var'}
$as_echo "$as_val"'`
if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -6415,8 +6278,9 @@ ac_res=`eval 'as_val=${'$as_ac_var'}
$as_echo "$as_val"'`
{ $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if test `eval 'as_val=${'$as_ac_var'}
$as_echo "$as_val"'` = yes; then
as_val=`eval 'as_val=${'$as_ac_var'}
$as_echo "$as_val"'`
if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -6518,8 +6382,9 @@ ac_res=`eval 'as_val=${'$as_ac_var'}
$as_echo "$as_val"'`
{ $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if test `eval 'as_val=${'$as_ac_var'}
$as_echo "$as_val"'` = yes; then
as_val=`eval 'as_val=${'$as_ac_var'}
$as_echo "$as_val"'`
if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -6621,8 +6486,9 @@ ac_res=`eval 'as_val=${'$as_ac_var'}
$as_echo "$as_val"'`
{ $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if test `eval 'as_val=${'$as_ac_var'}
$as_echo "$as_val"'` = yes; then
as_val=`eval 'as_val=${'$as_ac_var'}
$as_echo "$as_val"'`
if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -6724,8 +6590,9 @@ ac_res=`eval 'as_val=${'$as_ac_var'}
$as_echo "$as_val"'`
{ $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if test `eval 'as_val=${'$as_ac_var'}
$as_echo "$as_val"'` = yes; then
as_val=`eval 'as_val=${'$as_ac_var'}
$as_echo "$as_val"'`
if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -6827,8 +6694,9 @@ ac_res=`eval 'as_val=${'$as_ac_var'}
$as_echo "$as_val"'`
{ $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if test `eval 'as_val=${'$as_ac_var'}
$as_echo "$as_val"'` = yes; then
as_val=`eval 'as_val=${'$as_ac_var'}
$as_echo "$as_val"'`
if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -6892,6 +6760,20 @@ if test "${with_makebin+set}" = set; then
fi
# If we're using run-cc.pl suppress the make process (run-cc.pl does it for us)
if test "$MAKEBIN"; then
MAKEBIN="@$MAKEBIN"
fi
MYSQLDIR=/usr/local/
# Check whether --with-mysqlpp was given.
if test "${with_mysqlpp+set}" = set; then
withval=$with_mysqlpp; MYSQLDIR=$withval
fi
@@ -6944,8 +6826,8 @@ _ACEOF
case $ac_val in #(
*${as_nl}*)
case $ac_var in #(
*_cv_*) { $as_echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
$as_echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
*_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
esac
case $ac_var in #(
_ | IFS | as_nl) ;; #(
@@ -7337,7 +7219,7 @@ exec 6>&1
# values after options handling.
ac_log="
This file was extended by $as_me, which was
generated by GNU Autoconf 2.62. Invocation command line was
generated by GNU Autoconf 2.63. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -7350,6 +7232,15 @@ on `(hostname || uname -n) 2>/dev/null | sed 1q`
_ACEOF
case $ac_config_files in *"
"*) set x $ac_config_files; shift; ac_config_files=$*;;
esac
case $ac_config_headers in *"
"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
esac
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
config_files="$ac_config_files"
@@ -7362,16 +7253,17 @@ ac_cs_usage="\
\`$as_me' instantiates files from templates according to the
current configuration.
Usage: $0 [OPTIONS] [FILE]...
Usage: $0 [OPTION]... [FILE]...
-h, --help print this help, then exit
-V, --version print version number and configuration settings, then exit
-q, --quiet do not print progress messages
-q, --quiet, --silent
do not print progress messages
-d, --debug don't remove temporary files
--recheck update $as_me by reconfiguring in the same conditions
--file=FILE[:TEMPLATE]
--file=FILE[:TEMPLATE]
instantiate the configuration file FILE
--header=FILE[:TEMPLATE]
--header=FILE[:TEMPLATE]
instantiate the configuration header FILE
Configuration files:
@@ -7386,7 +7278,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
config.status
configured by $0, generated by GNU Autoconf 2.62,
configured by $0, generated by GNU Autoconf 2.63,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Copyright (C) 2008 Free Software Foundation, Inc.
@@ -7583,7 +7475,8 @@ for ac_last_try in false false false false false :; do
{ { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
{ (exit 1); exit 1; }; }
ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
if test $ac_delim_n = $ac_delim_num; then
break
elif $ac_last_try; then
@@ -7788,9 +7681,9 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
mac1 = arg[2]
}
split(mac1, mac2, "(") #)
macro = mac2[1]
prefix = substr(line, 1, index(line, defundef) - 1)
if (D_is_set[macro]) {
# Preserve the white space surrounding the "#".
# Preserve the white space surrounding the "#".
print prefix "define", macro P[macro] D[macro]
next
@@ -7798,7 +7691,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Replace #undef with comments. This is necessary, for example,
# in the case of _POSIX_SOURCE, which is predefined and required
# on some systems where configure will not decide to define it.
if (defundef == "undef") {
if (defundef == "undef") {
print "/*", prefix defundef, macro, "*/"
next
}
@@ -7822,8 +7715,8 @@ do
:[FHLC]) ac_mode=$ac_tag; continue;;
esac
case $ac_mode$ac_tag in
:[FHL]*:*);;
:L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
:[FHL]*:*);;
:L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
$as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
{ (exit 1); exit 1; }; };;
:[FH]-) ac_tag=-:-;;
@@ -8141,16 +8034,14 @@ if test "$no_create" != yes; then
# would make configure fail if this is the last instruction.
$ac_cs_success || { (exit 1); exit 1; }
fi
if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
{ $as_echo "$as_me:$LINENO: WARNING: Unrecognized options: $ac_unrecognized_opts" >&5
if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
{ $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi
cat <<EOT
$DIS_MODULES
$DIS_MYSQL
$DIS_MODULES
+11 -56
View File
@@ -1,6 +1,6 @@
dnl autoconf.in for Services.
dnl
dnl Anope (c) 2003-2008 Anope team
dnl Anope (c) 2003-2010 Anope team
dnl Contact us at team@anope.org
dnl This program is free but copyrighted software; see the file COPYING for
@@ -76,53 +76,6 @@ else
AC_MSG_RESULT(no)
fi
DIS_MYSQL=" MySQL: No"
AC_ARG_WITH(mysql, [ --without-mysql Do not use MySQL or attempt to find it],,[
AC_ARG_WITH(mysqlconfig-path, [ --with-mysqlconfig-path=PATH Complete path to the mysql_config executable],
mysql_config_path="$withval", mysql_config_path="")
MYSQLCONF=""
if test "$mysql_config_path" != ""; then
if test -x "$mysql_config_path"; then
MYSQLCONF="$mysql_config_path"
echo "checking for mysql_config... $MYSQLCONF" >&6
fi
fi
if test "$MYSQLCONF" = ""; then
AC_PATH_PROG(MYSQLCONF,mysql_config, "")
fi
if test "$MYSQLCONF" != ""; then
hold_cflags="$CFLAGS"
hold_ldflags="$LDFLAGS"
if test "$MYSQL_CFLAGS" = ""; then
MYSQL_CFLAGS="`$MYSQLCONF --cflags`"
fi
if test "$MYSQL_LDFLAGS" = ""; then
MYSQL_LDFLAGS="`$MYSQLCONF --libs`"
fi
CFLAGS="$CFLAGS $MYSQL_CFLAGS"
LDFLAGS="$LDFLAGS $MYSQL_LDFLAGS"
echo $ECHO_N "checking if mysql_config produces valid values... $ECHO_C" >&6
AC_TRY_RUN([
#include <mysql.h>
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
DIS_MYSQL=" MySQL: Yes"
else
CFLAGS="$hold_cflags"
LDFLAGS="$hold_ldflags"
fi
fi
])
AC_MSG_CHECKING(whether this is a bit or little endian system)
AC_TRY_RUN([
int main()
@@ -239,7 +192,7 @@ 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
])
@@ -248,24 +201,28 @@ 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(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], [
AC_ARG_WITH(instdir, [ --with-instdir=instdir Specify the default install dir for anope], [
INSTDIR=$withval
])
MAKEBIN=`pwd`/run-cc.pl
AC_ARG_WITH(makebin, [--with-makebin=run-cc.pl Specify the default make binary to use],[MAKEBIN=$withval])
AC_ARG_WITH(makebin, [ --with-makebin=run-cc.pl Specify the default make binary to use],[MAKEBIN=$withval])
MYSQLDIR=/usr/local/
AC_ARG_WITH(mysqlpp, [ --with-mysqlpp=/usr/local/ The base directory of the MySQL++ installation],[MYSQLDIR=$withval])
AC_SUBST(INSTDIR)
AC_SUBST(MAKEBIN)
AC_SUBST(MYSQLDIR)
AC_ARG_WITH(optimization, [ --with-optimization=1|2|3|4|5 Specify the optimization level], [
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], [
AC_ARG_WITH(debugsym, [ --with-debugsym Include debugging symbols], [
CFLAGS="$CFLAGS -g"
])
@@ -280,8 +237,6 @@ AC_OUTPUT
cat <<EOT
$DIS_MODULES
$DIS_MYSQL
All done! Now run "make" (or possibly "gmake") to compile Anope.
+1 -1
View File
@@ -1,6 +1,6 @@
# 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)
set(DATA example.chk example.conf tables.sql)
install(FILES ${DATA}
DESTINATION data
)
+9 -6
View File
@@ -1,7 +1,7 @@
#!/bin/sh
# Crontab script for Anope
#
#
# To know how to install the crontab, read the INSTALL file.
###############################################################
@@ -9,7 +9,10 @@
###############################################################
# Anope binary directory
ANOPATH=/home/ircd/services/
ANOPATH=/home/ircd/services/bin
# Anope data directory
ANODATA=/home/ircd/services/data
# Name of the pid file
ANOPIDF=services.pid
@@ -31,14 +34,14 @@ ANOPID=
cd $ANOPATH
if [ -f $ANOPIDF ]
if [ -f "$ANODATA/$ANOPIDF" ]
then
ANOPID=`cat $ANOPIDF`
ANOPID=`cat "$ANODATA/$ANOPIDF"`
if [ `ps auwx | grep $ANOPROG | grep $ANOPID | grep -v -c grep` = 1 ]
then
exit
exit
fi
rm -f $ANOPIDF
rm -f "$ANODATA/$ANOPIDF"
fi
./$ANOPROG $ANOARGS
+216 -185
View File
@@ -1,7 +1,7 @@
/*
* Example configuration file for Services. After making the appropriate
* changes to this file, place it in the Services data directory (as
* specified in the "configure" script, default /home/username/services)
* specified in the "configure" script, default /home/username/services/data)
* under the name "services.conf".
*
* The format of this file is fairly simple: three types of comments are supported:
@@ -90,6 +90,11 @@ uplink
*/
host = "localhost"
/*
* Enable if Services should connect using IPv6
*/
ipv6 = no
/*
* The port to connect to.
* The IRCd *MUST* be configured to listen on this port, and to accept
@@ -132,17 +137,13 @@ serverinfo
/*
* The local address that Services will bind to before connecting to the remote
* server. This may be useful for multihomed hosts. If neither of these are given,
* Services will let the Operating System choose the local address. If only a
* hostname is specified, Services will bind to that address but let the Operating
* System choose the local port. These directives are optional, and may be overridden
* with the -local command-line option when starting Services.
* server. This may be useful for multihomed hosts. If ommited, Services will let
* the Operating System choose the local address. This directive is optional.
*
* If you don't know what this means or don't need to use it, just leave these
* If you don't know what this means or don't need to use it, just leave this
* directives commented out.
*/
#localhost = "nowhere."
#localport = 0
/*
* This directive instructs Anope which IRCd Protocol to speak when connecting.
@@ -151,11 +152,12 @@ serverinfo
* Supported:
* - inspircd11
* - inspircd12
* - inspircd20
* - ratbox
* - bahamut
* - unreal32
*/
type = "inspircd11"
type = "inspircd12"
/*
* What Server ID to use for this connection?
@@ -165,7 +167,7 @@ serverinfo
#id = "00A"
/*
* These identify the ident@hostname which will be used by the Serivces pesudoclients.
* These identify the ident@hostname which will be used by the Services pesudoclients.
* They can be overridden by the -user and -host command-line options when starting
* Services.
*/
@@ -194,7 +196,7 @@ serverinfo
networkinfo
{
/*
* For the given channel, every use that has or gets op status of the channel
* For the given channel, every user that has or gets op status of the channel
* will automatically receive the +h user mode. This directive is optional.
*/
helpchannel = "#help"
@@ -222,12 +224,26 @@ networkinfo
networkname = "LocalNet"
/*
* Set this to the maximum allowed nick length on your network. Anope does not
* support values larger than 31. Be sure to set this correctly, as setting
* this wrong can result in Services being disconnected from the network.
* This directive is optional, but recommended.
* Set this to the maximum allowed nick length on your network.
* Be sure to set this correctly, as setting this wrong can result in
* Services being disconnected from the network. This directive is optional,
* but recommended.
*/
nicklen = 31
/* Set this to the maximum allowed ident length on your network.
* Be sure to set this correctly, as setting this wrong can result in
* Services being disconnected from the network. This directive is optional,
* but recommended.
*/
userlen = 10
/* Set this to the maximum allowed hostname length on your network.
* Be sure to set this correctly, as setting this wrong can result in
* Services being disconnected from the network. This directive is optional,
* but recommended.
*/
hostlen = 64
}
/*
@@ -238,7 +254,7 @@ networkinfo
options
{
/*
* The encryption module to use when dealing with passwords. This determines how
* The encryption modules are used when dealing with passwords. This determines how
* the passwords are stored in the databases, and does not add any security as
* far as transmitting passwords over the network goes.
*
@@ -255,8 +271,30 @@ options
* - enc_old (old, broken MD5 encryption)
* - enc_md5 (working MD5 encryption)
* - enc_sha1 (SHA1 encryption)
* - enc_sha256 (SHA256 encryption with random salts)
*
* The first module in this list is the active encryption module. All new passwords are
* encrypted by this module. Old passwords stored in another encryption method are
* automatically re-encrypted by the active encryption module on next identify.
* Changing the order of the modules requires the services to restart.
*/
encryption = "enc_none"
encryption = "enc_none enc_sha1 enc_sha256 enc_md5 enc_old"
/*
* The maximum length of passwords
*/
passlen = 32
/*
* The database modules are used for saving and loading databases for Anope.
*
* Supported:
* - db_plain
* - db_mysql_write
* - db_mysql_read
* - db_mysql_execute
*/
database = "db_plain"
/*
* These keys are used to initiate the random number generator. These numbers
@@ -414,7 +452,7 @@ options
/*
* If set, Anope will dump core when a segmentation fault occurs. This is
* generally not needed, but if Anope is crashing on your network and you
* want to make a bug report, having a core file may be of great help.
* want to make a bug report, having a core file will be of great help.
* This directive is optional.
*/
#dumpcore = yes
@@ -488,9 +526,145 @@ options
*
* WARNING: Do NOT put your user servers in this directive.
*/
ulineservers = "stats.your.network proxy.your.network"
ulineservers = "stats.your.network"
/*
* If set, Services will start logging to the log channel immediatly on startup.
* This directive is optional, and has no effect if logchannel is not defined.
*/
#enablelogchannel = yes
/*
* Default modes for mode lock, these are set on newly registered channels.
*/
mlock = "+nrt"
/*
* Modes to set on service bots when they join channels, comment this out for no modes
*/
botmodes = "ao"
/*
* How many times services should attempt to reconnect to the uplink before giving up
* Comment this out to never give up.
*/
maxretries = 10
/*
* How long to wait between connection retries, in seconds.
*/
retrywait = 60
}
/*
* [RECOMMENDED] Oper Access Config
*
* This section is used to set up staff access to restricted oper only commands.
* You may define groups of commands and privileges, as well as who may use them.
*
* The block is recommended, as without it, you will be unable to access most oper commands.
* It replaces the old ServicesRoot directive, amongst others.
*
* Note that third party modules may add additional commands and privileges to this list.
*
* Available privileges:
* botserv/administration - Can perform certain BotServ administrative tasks
* chanserv/access/modify - Can modify channel access lists
* chanserv/auspex - Can see any information with /chanserv info
* chanserv/no-register-limit - May register an unlimited number of channels and nicknames
* chanserv/set - Can modify the settings of any channel (incl. changing of the owner and password!)
* memoserv/info - Can see any information with /memoserv info
* memoserv/set-limit - Can set the limit of max stored memos on any user and channel
* nickserv/confirm - Can confirm other users nicknames
* nickserv/drop - Can drop other users nicks
*
* Available commands:
* botserv/bot/del botserv/bot/add botserv/bot/change botserv/assign/private
* botserv/botlist botserv/set/private botserv/set/nobot
*
* chanserv/access/list chanserv/drop chanserv/forbid chanserv/getkey
* chanserv/list chanserv/suspend chanserv/topic chanserv/set/noexpire
* chanserv/status
*
* memoserv/sendall memoserv/staff
*
* nickserv/getpass nickserv/sendpass nickserv/getemail nickserv/suspend
* nickserv/resetpass
*
* hostserv/set - Can add/modify/delete any vhost
*
* operserv/global operserv/news operserv/stats operserv/kick
* operserv/mode operserv/session operserv/modlist operserv/ignore
* operserv/chankill operserv/akill operserv/sqline operserv/sgline
* operserv/szline operserv/clearmodes operserv/staff operserv/defcon
* operserv/modload operserv/jupe operserv/set operserv/noop
* operserv/quit operserv/update operserv/reload operserv/restart
* operserv/shutdown operserv/svsnick operserv/oline operserv/umode
*
* First, we define 'opertypes', which are named whatever we want ('Network Administrator', etc).
* These can contain commands for oper-only strings (see above) which grants access to that specific command,
* and privileges (which grant access to more general permissions for the named area).
* Wildcard entries are permitted for both, e.g. 'commands = "operserv/*"' for all OperServ commands.
*
* Below are some default example types, but this is by no means exhaustive,
* and it is recommended that you configure them to your liking.
*/
opertype
{
// The name of this opertype
name = "Services Root"
// What commands (see above) this opertype may use
commands = "*"
// What privs (see above) this opertype has
privs = "*"
}
opertype
{
name = "Services Administrator"
commands = "operserv/global operserv/news operserv/stats operserv/kick operserv/mode operserv/session operserv/modlist operserv/ignore operserv/chankill operserv/akill operserv/sqline operserv/sgline operserv/szline operserv/clearmodes operserv/staff operserv/defcon botserv/* chanserv/* nickserv/* memoserv/*"
privs = "*"
}
opertype
{
name = "Helper"
privs = "hostserv/set"
}
/*
* After defining different types of operators in the above opertype section, we now define who is in these groups
* through 'oper' blocks, similar to ircd access.
*
* The default is to comment these out (so NOBODY will have Services access).
* You probably want to add yourself and a few other people at minimum.
*
* As with all permissions, make sure to only give trustworthy people access to Services.
*/
#oper
#{
# // The nickname of this services oper
# name = "DukePyrolator"
#
# // The opertype this person will have
# type = "Services Root"
#}#
#
#oper
#{
# name = "nick1"
# type = "Services Administrator"
#}#
#
#oper
#{
# name = "nick2"
# type = "Helper"
#}
/*
* [OPTIONAL] Mail Config
*
@@ -528,8 +702,8 @@ mail
sendfrom = "services@localhost.net"
/*
* If set, SENDPASS will be restricted to IRC operators. This directive is
* optional.
* If set, SENDPASS and RESETPASS will be restricted to IRC operators.
* This directive is optional.
*
* WARNING: If you choose to not enable this option, you should limit the
* number of processes that the services user can have at a time (you can
@@ -576,24 +750,11 @@ nickserv
*/
description = "Nickname Registration Service"
/*
* The filename of the NickServ database. The path is relative to the services
* executable. If not given, defaults to "nick.db".
*/
database = "nick.db"
/*
* The filename of the NickServ Pre-Nick database. The path is relative to the
* services executable. This directive is only required if the e-mail registration
* option is enabled.
*/
#prenickdatabase = "prenick.db"
/*
* The core modules to load for NickServ. This is a space separated list that corresponds
* to the base names of the modules for NickServ. This directive is optional, but highly recommended.
*/
modules = "ns_help ns_register ns_group ns_identify ns_access ns_set ns_saset ns_drop ns_recover ns_release ns_sendpass ns_ghost ns_alist ns_info ns_list ns_logout ns_status ns_update ns_getpass ns_getemail ns_forbid ns_suspend"
modules = "ns_help ns_register ns_group ns_identify ns_access ns_set ns_saset ns_drop ns_recover ns_release ns_sendpass ns_ghost ns_alist ns_info ns_list ns_logout ns_status ns_update ns_getpass ns_getemail ns_forbid ns_suspend ns_resetpass"
/*
* Force users to give an e-mail address when they register a nick. This directive
@@ -665,7 +826,7 @@ nickserv
#preregexpire = 1d
/*
* The maximum number of nicks allowed in a group. This directve is optional, but
* The maximum number of nicks allowed in a group. This directive is optional, but
* recommended. If not set or set to 0, no limits will be applied.
*/
maxaliases = 16
@@ -684,7 +845,7 @@ nickserv
#enforceruser = "enforcer"
/*
* The delay before a NickServ-collided nick is released.
* The delay before a NickServ collided nick is released.
*/
releasetimeout = 1m
@@ -736,18 +897,6 @@ nickserv
*/
#modeonid = yes
/*
* If set, Services will only allow Services Root(s) to use the NickServ GETPASS command on
* a nick. This directive is optional.
*/
restrictgetpass = yes
/*
* If set, Services will track your last nick identified when issuing nick changes. This
* directive is optional.
*/
#nicktracking = yes
/*
* If set, Services will add the usermask of registering users to the access list of their
* newly created account. If not set, users will always have to identify to NickServ before
@@ -776,17 +925,11 @@ chanserv
*/
description = "Channel Registration Service"
/*
* The filename of the ChanServ database. The path is relative to the services
* executable. If not given, defaults to "chan.db".
*/
database = "chan.db"
/*
* The core modules to load for ChanServ. This is a space separated list that corresponds
* to the base names of the modules for ChanServ. This directive is optional, but highly recommended.
*/
modules = "cs_help cs_register cs_identify cs_set cs_xop cs_access cs_akick cs_drop cs_sendpass cs_ban cs_clear cs_modes cs_getkey cs_invite cs_kick cs_list cs_logout cs_topic cs_info cs_getpass cs_forbid cs_suspend cs_status"
modules = "cs_help cs_register cs_set cs_xop cs_access cs_akick cs_drop cs_ban cs_clear cs_modes cs_getkey cs_invite cs_kick cs_list cs_topic cs_info forbid cs_suspend cs_status cs_unban"
/*
* The default options for newly registered channels. Note that changing these options
@@ -804,12 +947,13 @@ chanserv
* order to be considered for being on the access list of the channel
* - secureops: Only allow operator status to be given if the user is on the access list
* - securefounder: Only allow the real founder of the channel to drop the channel, change it's
* password, or change the founder or succesor
* password, or change the founder or successor
* - signkick: Use of ChanServ's KICK command will cause the user's nick to be signed to the kick.
* - signkicklevel: Same as above, but the kick will not be signed if the user is at the same access
* level or superior to the target
* - topiclock: Disallow the topic to be changed except with ChanServ's TOPIC command
* - xop: Enable use of the xOP system
* - persist: Keep the channel open at all times
*
* This directive is optional, if left blank, the options will default to keetopic, secure, securefounder,
* and signkick. If you really want no defaults, use "none" by itself as the option.
@@ -858,7 +1002,7 @@ chanserv
/*
* The length of time ChanServ stays in a channel after kicking a user from a channel they are not
* premitted to be in. This only occurs when the user is the only one in the channel.
* permitted to be in. This only occurs when the user is the only one in the channel.
*/
inhabit = 15s
@@ -872,12 +1016,6 @@ chanserv
*/
listmax = 50
/*
* If set, Services will only allow Services Root(s) to use the ChanServ GETPASS command on a
* channel. This directive is optional.
*/
#restrictgetpass = yes
/*
* Allow only IRC Operators to use ChanServ. This directive is optional.
*/
@@ -928,7 +1066,7 @@ memoserv
/*
* Should we notify all appropriate users of a new memo? This applies in cases where a memo is
* sent to a nick which is in the group of another nick. Not that, unlike before, it is currently
* sent to a nick which is in the group of another nick. Note that, unlike before, it is currently
* more efficient to enable this. This directive is optional.
*/
notifyall = yes
@@ -964,20 +1102,14 @@ botserv
*/
description = "Bot Service"
/*
* The filename of the BotServ database. The path is relative to the services
* executable. If not given, defaults to "bot.db".
*/
database = "bot.db"
/*
* The core modules to load for BotServ. This is a space separated list that corresponds
* to the base names of the modules for BotServ. This directive is optional, but highly recommended.
*/
modules = "bs_help bs_botlist bs_assign bs_set bs_kick bs_badwords bs_act bs_info bs_say bs_unassign bs_bot bs_fantasy bs_fantasy_kick bs_fantasy_kickban bs_fantasy_owner bs_fantasy_seen bs_fantasy_unban"
modules = "bs_help bs_botlist bs_assign bs_set bs_kick bs_badwords bs_act bs_info bs_say bs_unassign bs_bot"
/*
* The default bot options for newly registered channel. Note that changing these options
* The default bot options for newly registered channels. Note that changing these options
* will have no effect on channels which are already registered. The list must be separated
* by spaces.
*
@@ -1024,7 +1156,7 @@ botserv
#smartjoin = yes
/*
* If set, the bots will use a kick reason that does not retake the word when it is kicking.
* If set, the bots will use a kick reason that does not state the word when it is kicking.
* This is especially useful if you have young people on your network. This directive is
* optional.
*/
@@ -1063,52 +1195,11 @@ hostserv
*/
description = "vHost Service"
/*
* The filename of the HostServ database. The path is relative to the services
* executable. If not given, defaults to "hosts.db".
*/
database = "hosts.db"
/*
* The core modules to load for HostServ. This is a space separated list that corresponds
* to the base names of the modules for HostServ. This directive is optional, but highly recommended.
*/
modules = "hs_help hs_on hs_off hs_group hs_list hs_set hs_setall hs_del hs_delall"
/*
* Specifies the nicks of NON-OPERS allowed to set or remove vHosts using HostServ. Can be re-loaded
* with /msg operserv reload. You can specify more than one nick by separating each one by a space.
*
* This directive is optional, but you are discouraged from using it. It is recommended that you only
* give opers the ability to set or remove vHosts by making them Services Opers or higher, but if you
* do decide to use this directive, make sure you insert the correct nick(s) here.
*/
#hostsetters = "CyberBotX w00t"
}
/*
* [REQUIRED] HelpServ Config
*
* This section is used to set up the Help Service pseudo-client. All directives are required.
*/
helpserv
{
/*
* The nickname of the HelpServ client.
*/
nick = "HelpServ"
/*
* The description of the HelpServ client, which will be used as the GECOS (real
* name) of the client.
*/
description = "Help Service"
/*
* The core modules to load for HelpServ. This is a space separated list that corresponds
* to the base names of the modules for HelpServ. This directive is optional, but highly recommended.
*/
modules = "he_help"
}
/*
@@ -1141,39 +1232,11 @@ operserv
*/
globaldescription = "Global Noticer"
/*
* The filename of the OperServ database. The path is relative to the services
* executable. If not given, defaults to "oper.db".
*/
database = "oper.db"
/*
* The filename of OperServ's News database. The path is relative to the services
* executable. If not given, defaults to "news.db".
*/
newsdatabase = "news.db"
/*
* The filename of OperServ's Session Exception database. The path is relative to the services
* executable. If not given, defaults to "exception.db".
*/
exceptiondatabase = "exception.db"
/*
* The core modules to load for OperServ. This is a space separated list that corresponds
* to the base names of the modules for OperServ. This directive is optional, but highly recommended.
*/
modules = "os_help os_global os_stats os_oper os_admin os_staff os_mode os_kick os_clearmodes os_akill os_sgline os_sqline os_szline os_chanlist os_userlist os_logonnews os_randomnews os_opernews os_session os_noop os_jupe os_ignore os_set os_reload os_update os_restart os_quit os_shutdown os_defcon os_chankill os_svsnick os_oline os_umode os_modload os_modunload os_modlist os_modinfo"
/*
* Specifies the Services "super-users". The super-users, or "roots" as in Unix terminology, are
* the only uses who can add or delete Services Admins.
*
* You can specify more than one nick by separating each one by a space.
*
* This is commented out by default; make sure you insert the correct nicks before uncommenting it.
*/
#servicesroot = "CyberBotX w00t"
modules = "os_help os_global os_stats os_staff os_mode os_kick os_clearmodes os_akill os_sgline os_sqline os_szline os_chanlist os_userlist os_news os_session os_noop os_jupe os_ignore os_set os_reload os_update os_restart os_quit os_shutdown os_defcon os_chankill os_svsnick os_oline os_umode os_modload os_modunload os_modlist os_modinfo"
/*
* If set, Services Admins will be able to use SUPERADMIN [ON|OFF] which will temporarily grant
@@ -1219,13 +1282,6 @@ operserv
*/
#killonsqline = yes
/*
* Disables the highly destructive OperServ RAW command. This directive is optional, but HIGHLY
* recommended. Not setting this and causing problems with your network using RAW will not be
* supported.
*/
disableraw = yes
/*
* Defines what actions should trigger notifications. The list must be separated by spaces.
*
@@ -1242,7 +1298,6 @@ operserv
* - osszline: OperServ's SZLINE command was used
* - osnoop: OperServ's NOOP command was used
* - osjupe: OperServ's JUPE command was used
* - osraw: OperServ's RAW command was used
* - akillexpire: An AKILL has expired
* - sglineexpire: An SGLINE has expired
* - sqlineexpire: An SQLINE has expired
@@ -1257,7 +1312,7 @@ operserv
*
* This directive is optional, if left blank, there will be no notifications.
*/
notifications="osglobal osmode osclearmodes oskick osakill ossgline ossqline osszline osnoop osjupe osraw getpass setpass forbid drop"
notifications="osglobal osmode osclearmodes oskick osakill ossgline ossqline osszline osnoop osjupe getpass setpass forbid drop"
/*
* Enables session limiting. Session limiting prevents users from connecting more than a certain
@@ -1457,6 +1512,14 @@ module { name = "hs_request" }
* The following blocks are used for options pertaining to modules and are not part of the core.
* Unless otherwise stated, most of the options are optional.
*/
db_plain
{
/*
* The database db_plain should use
*/
database = "anope.db"
}
hs_request
{
/*
@@ -1474,12 +1537,6 @@ hs_request
* If set, Services will send a memo to all Host Setters when a new vHost is requested.
*/
#memosetters = yes
/*
* The filename of the vHost request database. The path is relative to the services
* executable. If not given, defaults to "hs_request.db".
*/
#database = "hs_request.db"
}
ns_maxemail
@@ -1492,29 +1549,3 @@ ns_maxemail
#maxemails = 1
}
ns_noop_convert
{
/*
* The filename of the NickServ AUTOOP convert database. The path is relative to the services
* executable. If not given, defaults to "autoop.db".
*/
#database = "autoop.db"
}
os_ignore
{
/*
* The filename of the Services' ignore database. The path is relative to the services
* executable. If not given, defaults to "os_ignore.db".
*/
#database = "os_ignore.db"
}
os_info
{
/*
* The filename of the oper information database. The path is relative to the services
* executable. If not given, defaults to "os_info.db".
*/
#database = "os_info.db"
}
+174
View File
@@ -0,0 +1,174 @@
<?php
/*
* (C) 2010 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for furhter details.
*
*
*/
/** Object representing a MySQL query
*/
class MySQLQuery
{
/* Our query */
private $Query;
/* The result */
private $Result;
/* Socket used to connect to MySQL */
private $MysqlSock;
/** Constructor
* @param MysqlSock The MySQL socket
*/
function __construct($MysqlSock)
{
$this->MysqlSock = $MysqlSock;
}
/** Destructor
*/
function __destruct()
{
}
/** Execute a query
* @return true or false
*/
private function Execute()
{
$Res = mysql_query($this->Query, $this->MysqlSock);
$this->Result = array();
if (!empty($Res))
{
while (($Result = @mysql_fetch_assoc($Res)))
{
$this->Result[] = $Result;
}
return true;
}
return false;
}
/** Get the result for the query
* @return The result
*/
public function Result()
{
return $this->Result;
}
/** Execute a query
* @param A formatted string
* @param ... Args
* @return true or false
*/
public function Query($String, $P1 = NULL, $P2 = NULL, $P3 = NULL, $P4 = NULL, $P5 = NULL, $P6 = NULL, $P7 = NULL,
$P8 = NULL, $P9 = NULL, $P10 = NULL, $P11 = NULL, $P12 = NULL, $P13 = NULL, $P14 = NULL)
{
$this->Query = sprintf($String, $P1, $P2, $P3, $P4, $P5, $P6, $P7, $P8, $P9, $P10, $P11, $P12, $P13, $P14);
return $this->Execute();
}
/** Escape a string to by MySQL safe
* @return A new, MySQL safe string
*/
public function Escape($String)
{
return mysql_real_escape_string($String, $this->MysqlSock);
}
}
/** Main Anope class
*/
class Anope
{
/* Socket used to connect to MySQL */
private $MysqlSock;
/* True if we were able to connect successfully */
private $Connected;
/** Constructor
* @param MysqlHost The host of the MySQLd server, port can be included on this too
* @param MysqlUser The username to authenticate to MySQL with
* @param MysqlPassword The password to authenticate with
* @param MysqlDatabase The name of the Anope database
*/
function __construct($MysqlHost, $MysqlUser, $MysqlPassword, $MysqlDatabase)
{
$this->Connected = false;
$this->MysqlSock = @mysql_connect($MysqlHost, $MysqlUser, $MysqlPassword);
if ($this->MysqlSock)
$this->Connected = @mysql_select_db($MysqlDatabase, $this->MysqlSock);
}
/** Destructor
* Closes the connection to the MySQL server
*/
function __destruct()
{
if ($this->MysqlSock)
@mysql_close($this->MysqlSock);
}
/** Check if we are connected successfully
* @return true or false
*/
public function Connected()
{
return $this->Connected;
}
/** Retrieve a new query object
* @return A new Query object
*/
public function Query()
{
return new MySQLQuery($this->MysqlSock);
}
/** Anope Functions **/
/** Execute a command in Anope
* For more information read docs/MYSQL
* @param Nick The nickname to execute the command from
* @param Service The service to execute the command on
* @param Command The command to execute
*/
public function Command($Nick, $Service, $Command)
{
$Query = $this->Query();
return $Query->Query("INSERT DELAYED INTO `anope_commands` (nick, service, command) VALUES('%s', '%s', '%s')", $Query->Escape($Nick), $Query->Escape($Service), $Query->Escape($Command));
}
/** Register a nick
* @param Nick The nick to be registered
* @param Password The password
* @param Email The email address to use, defaults to NULL
* @param Returns a message confirming or denying the registration process
*/
public function Register($Nick, $Password, $Email = NULL)
{
$Query = $this->Query();
$Query->Query("SELECT nick FROM `anope_ns_alias` WHERE `nick` = '%s'", $Query->Escape($Nick));
$Result = $Query->Result();
if (isset($Result[0]['nick']))
{
return "Nickname already registered";
}
if ($this->Command($Nick, "NickServ", "REGISTER ".$Password." ".$Email))
{
return "Nick registration successful. If your network has email registration enabled check your inbox for the next step of the registration process.";
}
return "Error registering nick";
}
}
?>
+59
View File
@@ -0,0 +1,59 @@
<?php
/*
* (C) 2010 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for furhter details.
*
*
*
*/
/* This is an example functional webpage showing how to use Anopes MySQL
* Execute feature to register a nickname online
*/
/* Include Anope's PHP API */
include('Anope.php');
function IsValidEmail($Email)
{
return eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $Email);
}
if (!empty($_POST['nick']) && !empty($_POST['password1']) && !empty($_POST['password2']) && !empty($_POST['email']))
{
if ($_POST['password1'] != $_POST['password2'])
{
echo 'Passwords do not match';
}
else if (!IsValidEmail($_POST['email']))
{
echo 'Invalid email address';
}
else
{
/* Create a new connection, arguments are hostname, username, password, and database name */
$Anope = new Anope("localhost", "anope", "anoperules", "anope");
/* Check if we connected */
if (!$Anope->Connected())
{
echo "Error connecting to MySQL database";
}
else
{
echo $Anope->Register($_POST['nick'], $_POST['password1'], $_POST['email']);
}
die;
}
}
?>
</br>
<form method="post" action="Register.php">
Nick: <input type="text" name="nick"></br>
Password: <input type="password" name="password1"></br>
Confirm Password: <input type="password" name="password2"></br>
Email: <input type="text" name="email"></br>
<input type="submit" value="Submit">
</form>
+386
View File
@@ -0,0 +1,386 @@
-- If you need to create your db, uncomment the following lines.
--
-- CREATE DATABASE anope;
-- USE anope;
-- --------------------------------------------------------
--
-- Table structure for table 'anope_extra'
--
DROP TABLE IF EXISTS anope_extra;
CREATE TABLE anope_extra (
data text NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table 'anope_commands'
--
DROP TABLE IF EXISTS anope_commands;
CREATE TABLE anope_commands (
nick varchar(255) NOT NULL default '',
service varchar(255) NOT NULL default '',
command text NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table 'anope_ns_core'
--
DROP TABLE IF EXISTS anope_ns_core;
CREATE TABLE anope_ns_core (
display varchar(255) NOT NULL default '',
pass text NOT NULL,
email text NOT NULL default '',
greet text NOT NULL default '',
icq int(10) unsigned NOT NULL default '0',
url text NOT NULL default '',
flags text NOT NULL default '',
language smallint(5) unsigned NOT NULL default '0',
channelcount smallint(5) unsigned NOT NULL default '0',
memomax smallint(5) unsigned NOT NULL default '0',
PRIMARY KEY (display)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table 'anope_ns_core_metadata'
--
DROP TABLE IF EXISTS anope_ns_core_metadata;
CREATE TABLE anope_ns_core_metadata (
nick varchar(255) NOT NULL default '',
name varchar(255) NOT NULL default '',
value text NOT NULL default '',
PRIMARY KEY (name)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- ---------------------------------------------------------
--
-- Table structure for table 'anope_ns_alias'
--
DROP TABLE IF EXISTS anope_ns_alias;
CREATE TABLE anope_ns_alias (
nick varchar(255) NOT NULL default '',
last_quit text NOT NULL,
last_realname text NOT NULL,
last_usermask text NOT NULL,
time_registered int(10) unsigned NOT NULL default '0',
last_seen int(10) unsigned NOT NULL default '0',
flags text NOT NULL default '',
display varchar(255) NOT NULL default '',
PRIMARY KEY (nick)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table 'anope_ns_alias_metadata'
--
DROP TABLE IF EXISTS anope_ns_alias_metadata;
CREATE TABLE anope_ns_alias_metadata (
nick varchar(255) NOT NULL default '',
name varchar(255) NOT NULL default '',
value text NOT NULL default '',
PRIMARY KEY (name)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table 'anope_ns_access'
--
DROP TABLE IF EXISTS anope_ns_access;
CREATE TABLE anope_ns_access (
display varchar(255) NOT NULL default '',
access varchar(160) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- ---------------------------------------------------------
--
-- Table structure for table 'anope_ns_request'
--
DROP TABLE IF EXISTS anope_ns_request;
CREATE TABLE anope_ns_request (
nick varchar(255) NOT NULL default '',
passcode text NOT NULL,
password text NOT NULL,
email text NOT NULL,
requested int(10) unsigned NOT NULL default '0',
PRIMARY KEY (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 (
level int(11) NOT NULL default '0',
display varchar(255) NOT NULL default '',
channel varchar(255) NOT NULL default '',
last_seen int(10) unsigned NOT NULL default '0',
creator varchar(255) NOT NULL default '',
UNIQUE KEY (channel,display)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table 'anope_cs_akick'
--
DROP TABLE IF EXISTS anope_cs_akick;
CREATE TABLE anope_cs_akick (
channel varchar(255) NOT NULL default '',
flags varchar(255) NOT NULL default '',
mask varchar(255) NOT NULL default '',
reason text NOT NULL default '',
creator varchar(255) NOT NULL default '',
created int(10) unsigned NOT NULL default '0',
last_used int(10) unsigned NOT NULL default '0',
UNIQUE KEY channel (channel, mask)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table 'anope_bs_badwords'
--
DROP TABLE IF EXISTS anope_bs_badwords;
CREATE TABLE anope_bs_badwords (
channel varchar(255) NOT NULL default '',
word varchar(255) NOT NULL,
type varchar(50) NOT NULL,
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 (
name varchar(255) NOT NULL default '',
founder text NOT NULL,
successor text 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 text NOT NULL default '',
forbidby text NOT NULL,
forbidreason text NOT NULL,
bantype smallint(6) NOT NULL default '0',
mlock_on text NOT NULL default '',
mlock_off text NOT NULL default '',
mlock_params text NOT NULL default '',
entry_message text NOT NULL,
memomax smallint(5) unsigned NOT NULL default '0',
botnick varchar(255) NOT NULL default '',
botflags text NOT NULL default '',
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',
PRIMARY KEY (name)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table 'anope_cs_info_metadata'
--
DROP TABLE IF EXISTS anope_cs_info_metadata;
CREATE TABLE anope_cs_info_metadata (
channel varchar(255) NOT NULL default '',
name varchar(255) NOT NULL default '',
value text NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table 'anope_cs_levels'
--
DROP TABLE IF EXISTS anope_cs_levels;
CREATE TABLE anope_cs_levels (
channel varchar(255) NOT NULL default '',
position int(11) NOT NULL default '0',
level int(11) NOT NULL default '0',
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 (
channel varchar(255) NOT NULL default '',
ttb_id int(11) NOT NULL default '0',
value int(11) NOT NULL default '0',
UNIQUE KEY channel (channel,ttb_id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table 'anope_bs_core'
--
DROP TABLE IF EXISTS anope_bs_core;
CREATE TABLE anope_bs_core (
nick varchar(255) NOT NULL default '',
user varchar(255) NOT NULL default '',
host text NOT NULL default '',
rname text NOT NULL default '',
flags text NOT NULL default '',
created int(10) unsigned NOT NULL default '0',
chancount int(11) NOT NULL default '0',
PRIMARY KEY (nick)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table 'anope_bs_info_metadata'
--
DROP TABLE IF EXISTS anope_bs_info_metadata;
CREATE TABLE anope_bs_info_metadata (
botname varchar(255) NOT NULL default '',
name varchar(255) NOT NULL default '',
value text NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table 'anope_ms_info'
--
DROP TABLE IF EXISTS anope_ms_info;
CREATE TABLE anope_ms_info (
receiver varchar(255) NOT NULL,
number int(11) NOT NULL default '0',
flags int(11) NOT NULL default '0',
time int(10) unsigned NOT NULL default '0',
sender text NOT NULL,
text blob NOT NULL,
serv enum('NICK','CHAN') NOT NULL default '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 (
user varchar(255) NOT NULL,
host varchar(255) NOT NULL,
xby text NOT NULL,
reason text NOT NULL,
seton int(10) unsigned NOT NULL default '0',
expire int(10) unsigned NOT NULL default '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table 'anope_os_core'
--
DROP TABLE IF EXISTS anope_os_core;
CREATE TABLE anope_os_core (
maxusercnt int(11) NOT NULL default '0',
maxusertime int(10) unsigned 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'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table 'anope_os_exceptions'
--
DROP TABLE IF EXISTS anope_os_exceptions;
CREATE TABLE anope_os_exceptions (
mask varchar(255) NOT NULL,
slimit int(11) NOT NULL default '0',
who text NOT NULL,
reason text NOT NULL,
time int(10) unsigned NOT NULL default '0',
expires int(10) unsigned NOT NULL default '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table 'anope_os_sxlines'
--
DROP TABLE IF EXISTS anope_os_sxlines;
CREATE TABLE anope_os_sxlines (
type varchar(20) NOT NULL,
mask varchar(255) NOT NULL,
xby text NOT NULL,
reason text NOT NULL,
seton int(10) unsigned NOT NULL default '0',
expire int(10) unsigned NOT NULL default '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table 'anope_metadata'
--
DROP TABLE IF EXISTS anope_metadata;
CREATE TABLE anope_metadata (
name varchar(255) NOT NULL default '',
value text NOT NULL default '',
PRIMARY KEY (name)
) 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;
+1
View File
@@ -0,0 +1 @@
astyle --style=java --indent=tab --brackets=break-closing --indent-switches --indent-cases --brackets=break
+1 -1
View File
@@ -7,7 +7,7 @@ if(WIN32)
# 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)
set(DOCS DEFCON FAQ INSTALL MODULES NEWS PROXY ${CMAKE_CURRENT_BINARY_DIR}/README.txt WIN32.txt)
install(FILES ${DOCS}
DESTINATION docs
)
View File
+100
View File
@@ -0,0 +1,100 @@
Anope Version 1.9.2
--------------------
A K alias to chanserv kick command
A KB alias to chanserv ban command
A The ability to register empty nonregistered channels
A Flatfile plaintext databases and removed old binary ones
A Added in live updating SQL and the ability to execute commands through SQL (see docs/MYSQL)
A Added support for many more modes into Anope and the ability to have generic support for modes unknown to Anope
A Added a mode stacker to combine many mode changes into fewer
A Added in the CS SET PERSIST command which can be used to keep service bots in channels even when the channel is empty
A Added AUTOOWNER OWNER and OWNERME into CS LEVELS
A Added ns_resetpass module to the core
A CS ACCESS VIEW which shows who added the access and last time used
A Last used time to CS AKICK VIEW
A Added a sha_256 encryption module
A Added the ability to load multiple encryption modules, and the ability to seamlessly convert your database between diferent encryptions
A Added configuration options to allow Anope to reconnect if it disconnects from the uplink instead of dieing
A Added support for linking with IPv6
F Unban command to accept an optional nick arg
F Some typos in services.conf
F Crash when users change their host that are identified to a group, but not a nick
F Host length checking in HS SET(ALL) and HS REQUEST
F Only show if a user is online in NS INFO if they are really identiifed for the group of the nick they are on
F Crash when using BSSmartJoin
F Converting access entries to access from xop when a users access is below voice
F A bad pointer passed to the OnDelEvent which could cause some 3rd party modules to crash
F CS FORBID allows to you forbid unregistered channels
F The -nothird command line option to work
F ms_rsend to really work
F SQUITing juped servers on InspIRCd1.2+
Anope Version 1.9.1
--------------------
F Don't enforce akick/forbidden/etc.-restrictions on clients on ulined servers.
F Remove modules_unload_all fini + hack that goes with it.
F Signal handling cleanup.
A Seamless fantasy support on all ChanServ commands, instead of requiring bs_fantasy_*.
F Allow fantasy to be disabled on some commands (e.g. FORBID).
F Some commands (e.g. !help) need to strip the pre-provided channelname from them.
D HelpServ removed
F Command parser cleanup: mod_current_buffer removed and replaced with proper parser. Commands now indicate how they want the buffer split.
F Make NS ENFORCE/RELEASE stuff more sane, redo timers.
A Opertypes (similar to InspIRCd's opertypes)
Provided by Ankit <ankit@nevitus.com> - 2009
F Segfault on shutdown
Provided by Adam <adam@anope.org> - 2009
F NickServ registration is sometimes denied.
F Applied patch from Adam to fix some potential screwups
F More fixes to bs_bot from Adam, plus an extra fix within DoAdd not covered in Adam's patch.
F Fix bs_bot to use the correct parameters, patch from Adam.
F Fix for bug #1004, based from second half of patch from Adam.
F Partial patch by Adam, commenting fix for #1006 for future reference.
F Forward-port r1946: Patch by Adam fixing #1006 (originally caused by #922): modes set by ChanServ are reversed. Thanks!
Provided by DukePyrolator <dukepyrolator@gmx.de> - 2009
F Patch converting all match calls to new method, thanks!
F Add 'w' and 'y' support to dotime(), also prevent an overflow.
F Allow NS STATUS from unregistered users, thanks DP!
F Wild pointers do not a happy Anope make. Thanks DP :)
F Allow NS REGISTER to unregistered nicks, silly oversight. Thanks DP! :)
F Fix call order, thanks to DP
F Pass the right array to do_umode(), fixes mode tracking on Unreal. Thanks to DukePyrolator (yet again :P)
F Fix bs_set help, thanks to DukePyrolator! :)
F Fix two segfaults, noted by DukePyrolator. Thanks!
F Fix part one of #1010, reported by DukePyrolator. (Language settings are not respected in message sending.) Thanks!
F Memory leak on +beI modes.
Provided by Liber <Liber@jasonirc.net> - 2009
F Support operoverride and such things (stop reversing changes from nonopped people where unnecessary)
Anope Version 1.9.0
--------------------
F Modified compile to use g++
F Improve protocol modules support (classes, virtual methods, etc)
F Move core services to use BotInfo
F Move BotInfo and related methods into a class
F Move modules into a class
F Fixed ns resending of passcode issue
F Modules now delete themselves
F additional field where users' masked host can be stored so both masked IP and vhost are available instead of just one.
F No struct Uid, ugly, and, unnecessary that we store UID in BotInfo.
F Prevent deletion of core services via /bs bot
F Module subsystem cleanup ('modules' branch)
F Move modules to use classes somewhat (AnopeInit, AnopeFini)
F Change MODULE_INIT to return a pointer
F Remove duplicate module creation.. have loadModule return a pointer rather than creating one
F Remove buffered loading/unloading, this makes os_modunload perm, but who cares
F 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.
A Remove old config, replace with insp-inspired (albeit bind format) config (CBX)
F Clean up protocol modules a bit
A InspIRCd 1.2 support
F Remove old (prior to 1.8.0) db compat
F Establish a proper base for services pseudoclients
F Add ss_main StatServ Hal9000 to play with :)
F Burn automake with fire (CBX)
Provided by mooncup <mooncup@anonnet.org> - 2009
F Automatically reapply vhost on hs off for unreal.
+52
View File
@@ -0,0 +1,52 @@
Anope Version 1.9.2
--------------------
** ADDED CONFIGURATION DIRECTIVES **
options:enablelogchannel added to auto turn on the logchannel on startup
options:mlock added to configure the default mlock modes on new channels
options:database added for the database modules
options:botmodes added to configure modes BotServ bots should use
options:userlen added to configure maxiumum ident length
options:hostlen added to configure maximum hostname length
options:database added to configure what database modules to use
options:passlen added to specify the maximum length of passwords
uplink:ipv6 added to enable IPv6 connectivity
options:maxretries added to specify the number of reconnect attempts allowed
options:retrywait added to specify how long to wait between reconnect attempts
opertype command chanserv/aop/list removed as it was unnecessary, use chanserv/access/list instead
** MODIFIED CONFIGURATION DIRECTIVES **
options:encryption added enc_sha256
chanserv:modules added cs_unban
nickserv:modules added ns_resetpass
** DELETED CONFIGURATION DIRECTIVES **
nickserv:database deleted because of new database system
nickserv:prenickdatabase deleted because of new database system
chanserv:database deleted because of the new database system
botserv:database deleted because of the new database system
hostserv:database deleted because of the new database system
operserv:database deleted because of the new database system
operserv:newsdatabase deleted because of the new database system
operserv:exceptiondatabase deleted because of the new database system
hs_request:database deleted because of the new database system
os_ignore:database deleted because of the new database system
serverinfo:localport deleted
Anope Version 1.9.1
-------------------
** ADDED CONFIGURATION DIRECTIVES **
Opertypes have been added, through the opertype blocks.
Services Operators are now specified in the oper blocks.
** MODIFIED CONFIGURATION DIRECTIVES **
botserv:modules no longer contains bs_fantasy* modules, fantasy is now seamless.
operserv:modules has replaced os_logonnews, os_opernews, and os_randomnews with os_news.
operserv:modules no longer contains os_admin and os_oper modules, removed in favor of oper blocks.
operserv:notifications no longer contains osraw due to removal of OS RAW.
** DELETED CONFIGURATION DIRECTIVES **
Nick tracking has been removed as an option.
Restricting of NS GETPASS and CS GETPASS removed in favor of opertypes.
Host Setters were removed in favor of opertypes.
HelpServ has been removed entirely.
operserv:disableraw removed due to removal of OS RAW.
+255
View File
@@ -0,0 +1,255 @@
Anope Version 1.9.2
--------------------
*** New Strings:
CHAN_INVITE_OTHER_SUCCESS
NICK_HELP_CONFIRM_OPER
CHAN_QOP_DISABLED
CHAN_QOP_NICKS_ONLY
CHAN_QOP_ADDED
CHAN_QOP_MOVED
CHAN_QOP_NO_SUCH_ENTRY
CHAN_QOP_NOT_FOUND
CHAN_QOP_DELETED
CHAN_QOP_DELETED_ONE
CHAN_QOP_DELETED_SEVERAL
CHAN_QOP_LIST_EMPTY
CHAN_QOP_LIST_HEADER
CHAN_QOP_CLEAR
CHAN_HELP_QOP
CHAN_QOP_SYNTAX
CHAN_HELP_CMD_QOP
CHAN_HELP_SET_PASSWORD
CHAN_LEVEL_AUTOOWNER
CHAN_LEVEL_OWNER
CHAN_LEVEL_OWNERME
CHAN_ACCESS_VIEW_XOP_FORMAT
CHAN_ACCESS_VIEW_AXS_FORMAT
CHAN_SET_PERSIST_SYNTAX
CHAN_SET_PERSIST_ON
CHAN_SET_PERSIST_OFF
CHAN_INFO_OPT_PERSIST
BOT_UNASSIGN_PERSISTANT_CHAN
CHAN_HELP_SET_PERSIST
NICK_RESETPASS_SYNTAX
NICK_RESETPASS_SUBJECT
NICK_RESETPASS_MESSAGE
NICK_RESETPASS_COMPLETE
NICK_CONFIRM_EXPIRED
NICK_CONFIRM_SUCCESS
NICK_HELP_CMD_RESETPASS
NICK_HELP_RESETPASS
CHAN_UNBANNED_OTHER
OPER_HELP_SYNC
OPER_HELP_CMD_SQLSYNC
OPER_SYNC_UPDATING
OPER_SYNC_UPDATED
CHAN_LEVELS_CHANGED_FOUNDER
*** Mod Strings:
CHAN_HELP_SET
CHAN_REGISTER_SYNTAX
CHAN_ACCESS_SYNTAX
CHAN_HELP_ACCESS
CHAN_HELP_SET
NICK_HELP_CONFIRM
CHAN_UNBAN_SYNTAX
CHAN_HELP_CMD_UNBAN
CHAN_HELP_UNBAN
CHAN_HELP_REGISTER
CHAN_HELP_DROP
CHAN_HELP_LEVELS
*** Del Strings:
CHAN_PASSWORD_IS
CHAN_SET_PASSWORD_FAILED
CHAN_PASSWORD_CHANGED
CHAN_IDENTIFY_SUCCEEDED
CHAN_IDENTIFY_FAILED
CHAN_HELP_IDENTIFY
CHAN_IDENTIFY_SYNTAX
CHAN_HELP_CMD_IDENTIFY
CHAN_LOGOUT_FOUNDER_FAILED
CHAN_LOGOUT_SUCCEDED
CHAN_LOGOUT_NOT_LOGGEDIN
CHAN_LOGOUT_ALL_SUCCEEDED
CHAN_SERVADMIN_HELP_LOGOUT
CHAN_HELP_LOGOUT
CHAN_LOGOUT_SERVADMIN_SYNTAX
CHAN_LOGOUT_SYNTAX
CHAN_HELP_CMD_LOGOUT
CHAN_GETPASS_UNAVAILABLE
CHAN_GETPASSWORD_IS
CHAN_SERVADMIN_HELP_GETPASS
CHAN_GETPASS_SYNTAX
CHAN_HELP_CMD_GETPASS
CHAN_SENDPASS_SUBJECT
CHAN_SENDPASS_HEAD
CHAN_SENDPASS_LINE_1
CHAN_SENDPASS_LINE_2
CHAN_SENDPASS_LINE_3
CHAN_SENDPASS_LINE_4
CHAN_SENDPASS_LINE_5
CHAN_SENDPASS_OK
CHAN_SENDPASS_UNAVAILABLE
CHAN_HELP_SENDPASS
CHAN_SENDPASS_SYNTAX
CHAN_HELP_CMD_SENDPASS
OPER_DEFCON_NO_CONF
Anope Version 1.9.1
--------------------
*** New Strings:
COMMAND_REQUIRES_PERM
COMMAND_IDENTIFY_REQUIRED
COMMAND_CANNOT_USE
COMMAND_CAN_USE
NICK_STATUS_REPLY
NICK_INFO_SERVICES_OPERTYPE
CHAN_LOGOUT_NOT_LOGGEDIN
CHAN_INVITE_ALREADY_IN
CHAN_INVITE_SUCCESS
CHAN_OP_SYNTAX
CHAN_HALFOP_SYNTAX
CHAN_VOICE_SYNTAX
CHAN_PROTECT_SYNTAX
CHAN_OWNER_SYNTAX
CHAN_DEOP_SYNTAX
CHAN_DEHALFOP_SYNTAX
CHAN_DEVOICE_SYNTAX
CHAN_DEPROTECT_SYNTAX
CHAN_DEOWNER_SYNTAX
CHAN_KICK_SYNTAX
CHAN_BAN_SYNTAX
MEMO_STAFF_SYNTAX
OPER_JUPE_INVALID_SERVER
*** Mod Strings:
NICK_LOGOUT_SERVICESADMIN
CHAN_STATUS_SYNTAX
CHAN_GETKEY_KEY
MEMO_SET_NOTIFY_SYNTAX
BOT_REASON_BADWORD
BOT_BOTLIST_EMPTY
OPER_IGNORE_SYNTAX
OPER_DEFCON_SYNTAX
OPER_HELP_EXCEPTION
OPER_HELP_SESSION
NEWS_LOGON_SYNTAX
NEWS_OPER_SYNTAX
NEWS_RANDOM_SYNTAX
NEWS_HELP_LOGON
NEWS_HELP_OPER
NEWS_HELP_RANDOM
NICK_HELP_STATUS
NICK_HELP_SENDPASS
NICK_SERVADMIN_HELP
NICK_SERVADMIN_HELP_LOGOUT
NICK_SERVADMIN_HELP_DROP
NICK_SERVADMIN_HELP_INFO
NICK_SERVADMIN_HELP_LIST
NICK_SERVADMIN_HELP_ALIST
NICK_SERVADMIN_HELP_GLIST
CHAN_HELP_SET_RESTRICTED
CHAN_HELP_OP
CHAN_HELP_DEOP
CHAN_HELP_VOICE
CHAN_HELP_DEVOICE
CHAN_HELP_HALFOP
CHAN_HELP_DEHALFOP
CHAN_HELP_PROTECT
CHAN_HELP_DEPROTECT
CHAN_HELP_OWNER
CHAN_HELP_DEOWNER
CHAN_HELP_KICK
CHAN_HELP_CLEAR
CHAN_HELP_GETKEY
CHAN_HELP_SENDPASS
CHAN_SERVADMIN_HELP
CHAN_SERVADMIN_HELP_LOGOUT
CHAN_SERVADMIN_HELP_DROP
CHAN_SERVADMIN_HELP_SET
CHAN_SERVADMIN_HELP_INFO
CHAN_SERVADMIN_HELP_LIST
MEMO_HELP_SET_NOTIFY
MEMO_HELP_STAFF
OPER_HELP_CMD_CHANKILL
OPER_HELP_STATS
OPER_HELP_IGNORE
OPER_HELP_UMODE
OPER_HELP_ULINE
OPER_HELP_SVSNICK
OPER_HELP_SET
BOT_HELP
BOT_SERVADMIN_HELP_BOT
BOT_SERVADMIN_HELP_SET
HOST_DELALL_SYNTAX
HOST_SET_SYNTAX
HOST_SETALL_SYNTAX
HOST_DEL_SYNTAX
*** Del Strings:
PERMISSION_DENIED
RAW_DISABLED
HELP_LIMIT_SERV_OPER
HELP_LIMIT_SERV_ADMIN
HELP_LIMIT_SERV_ROOT
HELP_LIMIT_IRC_OPER
HELP_LIMIT_HOST_SETTER
HELP_LIMIT_HOST_REMOVER
NICK_STATUS_0
NICK_STATUS_1
NICK_STATUS_2
NICK_STATUS_3
NICK_INFO_SERVICES_OPER
NICK_INFO_SERVICES_ADMIN
NICK_INFO_SERVICES_ROOT
CHAN_MUST_REGISTER_NICK
CHAN_MUST_IDENTIFY_NICK
OPER_ADMIN_SYNTAX
OPER_ADMIN_SKELETON
OPER_ADMIN_EXISTS
OPER_ADMIN_REACHED_LIMIT
OPER_ADMIN_ADDED
OPER_ADMIN_NOT_FOUND
OPER_ADMIN_NO_MATCH
OPER_ADMIN_DELETED
OPER_ADMIN_DELETED_ONE
OPER_ADMIN_DELETED_SEVERAL
OPER_ADMIN_LIST_EMPTY
OPER_ADMIN_LIST_HEADER
OPER_ADMIN_LIST_FORMAT
OPER_ADMIN_CLEAR
OPER_ADMIN_MOVED
OPER_OPER_SYNTAX
OPER_OPER_SKELETON
OPER_OPER_EXISTS
OPER_OPER_REACHED_LIMIT
OPER_OPER_ADDED
OPER_OPER_NOT_FOUND
OPER_OPER_NO_MATCH
OPER_OPER_DELETED
OPER_OPER_DELETED_ONE
OPER_OPER_DELETED_SEVERAL
OPER_OPER_LIST_EMPTY
OPER_OPER_LIST_HEADER
OPER_OPER_LIST_FORMAT
OPER_OPER_CLEAR
OPER_OPER_MOVED
OPER_SET_SQL_ON
OPER_SET_SQL_OFF
OPER_SET_SQL_ERROR
OPER_SET_SQL_ERROR_INIT
OPER_SET_SQL_ERROR_DISABLED
OPER_RAW_SYNTAX
HELP_HELP
HELP_HELP_BOT
HELP_HELP_HOST
OPER_HELP_CMD_OPER
OPER_HELP_CMD_ADMIN
OPER_HELP_OPER
OPER_HELP_ADMIN
OPER_HELP_SET_SQL
OPER_HELP_RAW
HOST_ID
HOST_NOT_REGGED
HOST_OFF_UNREAL
+14 -35
View File
@@ -32,8 +32,8 @@ Anope DefCon
The DefCon system is part of Anope's core,
The DefCon system has to be configured on your services.conf file to
be enabled. All directives are optional unless they depend on what
options you enable for each level. Look for the "DefCon configuration"
be enabled. The defcon module will not unload unless all non-optional
directives are set. Look for the defcon block
section on your services.conf file for more information.
Make sure you restart Anope after changing the DefCon configuration
@@ -43,40 +43,19 @@ Anope DefCon
Pre-defined DefCon actions:
No new channel registrations 1
No New Nick Registrations 2
No MLOCK changes 4
Force Chan Mode 8
Use Reduced Session Limit 16
KILL any new clients trying to connect 32
Services will ignore everyone but opers 64
Services will silently ignore everyone but opers 128
AKILL all new clients trying to connect 256
No new memos sent to block MemoServ attacks 512
These are the values used to determine each defcon setting, are set via:
DefCon1 XX
DefCon2 XX
DefCon3 XX
DefCon4 XX
To set the desired value, you simply add the value of the numbers together
and place that as your DefCon# setting. For instance:
Say you wish to set:
No Channel Registrations, No Nickname Registrations and Services Ignoring
everyone except for Operators. You would do this by:
1 + 2 + 128 (Each value listed above is added together)
Giving: 131
You would then place this as which ever Defcon setting you want:
No new channel registrations
No New Nick Registrations
No MLOCK changes
Force Chan Mode
Use Reduced Session Limit
KILL any new clients trying to connect
Services will ignore everyone but opers
Services will silently ignore everyone but opers
AKILL all new clients trying to connect
No new memos sent to block MemoServ attacks
DefCon1 131
The recommended default values are safe to use on any network.
Information regarding how to enable this for specific defcon levels can
be found in services.conf
4) Usage
+21 -395
View File
@@ -2,415 +2,41 @@ Anope Internal Events
---------------------
1) Intro
2) Complex Events
3) Triggered Events
4) Triggered Events List
2) Using Events
1) Introduction to Internal Events
Internal Events are setup to give module developers more information
about what the core is doing at different times. This information can
be as complex as data we are feeding to the uplink, to simple triggered
events such as the databases being saved. A list of triggered events
can be found below. Additional there is a module included with the core
events such as the databases being saved.
Additionally there is a module included with the core
which can provide some clue as to how to use the code in your modules.
The rest of this document assumes that you are used to writing modules.
2) Complex Events
2) Using Events
This type of events are based around what happens when we talk to the
IRCd, much like MESSAGE events that the IRCD sends to us. The events
are triggered when Anope writes to the ircd. To watch for these events
you must have some knowledge of how the IRCd command system works. In
our example we will trap for NICK events.
Anope is told about modules wanting to hook to events by the function
ModuleManager::Attach(EventName, Module*);, eg:
A) All functions most be formatted as:
ModuleManager::Attach(I_OnJoinChannel, this);
int functioname(char *source, int ac, char **av);
You can also specifcy an array of events:
B) In AnopeInit you must declare EvtMessage in some fashion, it is into
this variable that we will create the event handler. Here is what the
base AnopeInit should look like at this point:
int AnopeInit(int argc, char **argv)
{
EvtMessage *msg = NULL;
int status;
Implementation i[] = { I_OnJoinChannel, I_OnPartChannel };
ModuleManager::Attach(i, this, 2);
Where 2 is the number of events in the list
moduleAddAuthor(AUTHOR);
moduleAddVersion(VERSION);
return MOD_CONT;
}
You must then overload these functions in your main modules class.
The full list of functions and parameters are in modules.h. In this
case, you would be overloading OnJoinChannel() and OnPartChannel() like so:
Note that AUTHOR and VERSION should be defined above the AnopeInit
function, just like you should do with any module.
void OnJoinChannel(User *u, Channel *c) { }
void OnPartChannel(User *u, Channel *c) { }
C) Pass "createEventHandler" the name of the message in this case NICK,
and the function that was created in Step A. At this point you should
assign the return of "createEventHandler" to the EvtMessage variable.
Some of these events can be used to prevent or allow things to happen that
would normally not be allowed or denied. You can also use ModuleManager
(not explained here) to set control which order the modules are queried
(when multiple modules hook to the same event).
msg = createEventHandler("NICK", my_nick);
D) The Handler is not ready for use yet; now you must add it to the hash
with "moduleAddEventHandler". You will want to pass to this function
the return of "createEventHandler".
status = moduleAddEventHandler(msg);
It will return the same module error codes as adding a regular message,
which you can use to confirm it was added correctly.
E) With that setup in your function you will be passed 3 items. The source
most of the time this will be set to ServerName or NULL; consult our
IRCd documentation about how messages are formatted. AC is the count of
variables you will find in AV.
int my_nick(char *source, int ac, char **av)
{
alog("Internal Event - nick is %s",av[0]);
return MOD_CONT;
}
3) Triggered Events
These events also known as "event hooks" are internal events such as
expiring of nicks to the saving of databases.
A) All functions most be formatted as:
int functioname(int argc, char **argv);
B) In AnopeInit you must declare EvtHook in some fashion; it is into
this variable that we will create the event handler. Here is what
the base AnopeInit should look like at this point:
int AnopeInit(int argc, char **argv)
{
EvtHook *hook = NULL;
int status;
moduleAddAuthor(AUTHOR);
moduleAddVersion(VERSION);
return MOD_CONT;
}
C) Pass "createEventHook" the name of the event. In this case we are
going to hook to the saving of databases, "EVENT_DB_SAVING".
hook = createEventHook(EVENT_DB_SAVING, my_save);
D) The Handler is not ready for use yet; now you must add it to the hash
with "moduleAddEventHook". You will want to pass to this function the
return of "createEventHook"
status = moduleAddEventHook(hook);
It will return the same module error codes as adding a regular message,
which you can use to confirm it was added correctly.
E) With that setup in your function you will be passed 1 item. The message
is very simple; it could be as simple as a start, stop or message. In
the case of saving it has a start and stop.
int my_save(int argc, char **argv)
{
if (argc < 1) {
return MOD_CONT;
}
if (!stricmp(argv[0], EVENT_START)) {
alog("Saving the databases! has started");
} else {
alog("Saving the databases is complete");
}
return MOD_CONT;
}
4) Triggered Events List
Here's a list of all event hooks we currently offer, with a description
of what argument is being passed to the event functions for this type of
event. All arguments are plain-text strings (char *). The list is sorted
in alphabetical order.
Note that all events are emitted AFTER the action has taken place, so
any deleted nick/channel/etc won't exist anymore and any created one will
exist when your function is being run, unless noted otherwise.
Also note that EVENT_START and EVENT_STOP should not be matched with an
equal sign, but with string comparision. See the bundled events module for
an example on how to do this.
The arguments are given as av[0] for the first argument, av[1] for the
second argument, and so on. If av[0] and av[1] are given, the event has
two arguments, and argc should be 2.
EVENT_ACCESS_ADD
An user has been added to a channel access list.
av[0] Name of the channel the user has been added to.
av[1] The nickname of the user that has just added an entry to the
access list.
av[2] The nickname of the user that has been added to the access
list.
av[3] The level number the user has been added with.
EVENT_ACCESS_CHANGE
An user level has been changed on a channel access list.
av[0] Name of the channel the access list has been modified which.
av[1] The nickname of the user that has just modified the access
list of the channel.
av[2] The nickname of the user wich his access level has just been
modified.
av[3] The new access level for the user.
EVENT_ACCESS_CLEAR
A channel access list has been cleared.
av[0] Name of the channel the access list has been cleared of
av[1] The nickname of the user that has cleared the access list
EVENT_ACCESS_DEL
An user has been deleted of a channel access list.
av[0] Name of the channel the access entry has been deleted which.
av[1] The nickname of the user that has just deleted the access entry.
av[2] [OPTIONAL] The nickname of the user wich his access level has just
been removed. Not present if numbers were used (e.g. /cs access
del 7).
EVENT_BOT_ASSIGN
A BotServ bot has been assigned to a channel.
av[0] Name of the channel the bot has been assigned to.
av[1] The nickname of the bot that has been assigned to the channel.
EVENT_BOT_BAN
A BotServ bot has banned a user, e.g. kickers.
av[0] The nick of the user banned.
av[1] The Channel the user was banned from.
av[2] The mask that was banned.
EVENT_BOT_CHANGE
The properties of a BotServ bot have been changed.
av[0] The nickname of the bot involved.
EVENT_BOT_CREATE
A new BotServ bot has been created, and is ready to use.
av[0] The nickname of the newly created bot.
EVENT_BOT_DEL
A BotServ bot is being deleted from BotServ. This event is being sent
just before the actual deletion is performed.
av[0] The nickname of the bot being deleted.
EVENT_BOT_FANTASY
A fantasy command of the bot has been triggered. This event should be
used to create your own fantasy commands.
av[0] The fantasy command that has been triggered without leading '!'.
av[1] The nickname of the user that has triggered the fantasy
command.
av[2] The name of the channel the fantasy command has been triggered
on.
av[3] Contains any optional paramenters passed after the fantasy
command. If none are present, this will not exist, and argc will
will be 3.
EVENT_BOT_FANTASY_NO_ACCESS
A fantasy command of the bot has been triggered by someone without
access to BotServ FANTASY commands on the channel. This will NOT
trigger if someone with access has triggered a fantasy command; use
EVENT_BOT_FANTASY for those. Hook to both events to catch both event
triggers.
av[0] The fantasy command that has been triggered without leading '!'.
av[1] The nickname of the user that has triggered the fantasy
command.
av[2] The name of the channel the fantasy command has been triggered
on.
av[3] Contains any optional paramenters passed after the fantasy
command. If none are present, this will not exist, and argc will
will be 3.
EVENT_BOT_JOIN
A BotServ bot has joined a channel and opped itself.
av[0] The channel name the bot has just joined.
av[1] The nickname of the bot that has joined the channel.
EVENT_BOT_KICK
A BotServ bot has kicked a user from a channel.
av[0] The name of the user that has been kicked.
av[1] The name of the channel the user was kicked from.
av[2] The reason for the kick.
EVENT_BOT_UNASSIGN
A BotServ bot is being unassigned from a channel. This event is being
sent before the actual removing of the bot is done.
av[0] The channel name the bot has been unassigned from.
av[1] The nickname of the bot that has been unassigned.
EVENT_CHAN_DROP
A channel has been dropped and deleted.
av[0] The name of the channel that has been dropped.
EVENT_CHAN_EXPIRE
A channel has been expired and will be deleted. The event will be
emitted just before the actual channel deletion happens.
av[0] The name of the channel that has been expired.
EVENT_CHAN_FORBIDDEN
A channel has been forbidden (ChanServ FORBID).
av[0] The name of the channel that has been forbidden.
EVENT_CHAN_KICK
Someone has just been kicked from a channel.
av[0] The nick of the user that has been kicked.
av[1] The channel the user has been kicked from.
EVENT_CHAN_REGISTERED
A new channel has been registered.
av[0] The name of the channel that has been registered.
EVENT_CHAN_SUSPENDED
A channel has been suspended (ChanServ SUSPEND).
av[0] The name of the channel that has been suspended.
EVENT_CHAN_UNSUSPEND
A channel has been unsuspended (ChanServ UNSUSPEND).
av[0] The name of the channel that has been unsuspended.
EVENT_CHANGE_NICK
A user has just changed it's nick.
av[0] The new nickname of the user.
EVENT_CONNECT
This event is emitted when the connection to our uplink hub is being
made.
av[0] EVENT_START or EVENT_STOP, to indicate if it's emitted before
or after the connection has been made. EVENT_STOP is emitted
before our burst is being sent over the link.
EVENT_DB_EXPIRE
This event is emitted when the expiry routines for all things that can
expire in Anope are being run.
av[0] EVENT_START or EVENT_STOP, to indicate if it's being emitted
before or after the expiry routines have been run.
EVENT_DB_SAVING
This event is emitted when the databases are being saved.
av[0] EVENT_START or EVENT_STOP, to indicate if it's emitted before
or after the saving routines have been run.
EVENT_DB_BACKUP
This event is emitted when the databases are backed up.
av[0] EVENT_START when the backup commences, and EVENT_STOP when it
finishes.
EVENT_DEFCON_LEVEL
The DefCon level has just been changed. This event is emitted before
any DefCon-related action is taken. The internal DefConLevel has
already been raised at this point.
av[0] The new level of DefCon being invoked.
EVENT_GROUP
A user has grouped it's nickname to another user group.
av[0] The nickname of the user that joined the group.
EVENT_JOIN_CHANNEL
A user joins a channel.
av[0] EVENT_START or EVENT_STOP. EVENT_START when the user has passed
all access checks and is allowed to join, but has not yet
joined the channel. EVENT_STOP when the user has joined and all
needed modes are set etc.
av[1] The nickname of the user joining the channel.
av[2] The name of the channel the user has joined.
EVENT_NEWNICK
A new user has been introduced on the network.
av[0] The nickname of the newly introduced user.
EVENT_NICK_DROPPED
A user's nick has just been dropped. Note that the nickname information
has already been deleted!
av[0] The nickname of the user that has just been dropped.
EVENT_NICK_EXPIRE
A user's nick has just expired. Note that, as with EVENT_NICK_DROPPED,
the nickname information has already been deleted!
av[0] The nickname of the user that has just expired.
EVENT_NICK_FORBIDDEN
A user's nick has just been forbidden.
av[0] The nickname that has just been forbidden.
EVENT_NICK_IDENTIFY
A user has just identified for it's nickname with NickServ.
av[0] The nickname of the user that just identified.
EVENT_NICK_LOGOUT
A user has just (been) logged out.
av[0] The nickname of the user that has (been) logged out.
EVENT_NICK_REGISTERED
A new user has just registered it's nickname. This event is being
emitted when the registration is completed, but the user modes have not
yet been set.
av[0] The nickname of the newly registered user.
EVENT_NICK_SUSPENDED
A user's nick has just been suspended.
av[0] The nickname that has just been suspended.
EVENT_NICK_UNSUSPEND
A user's nick has just been unsuspended.
av[0] The nickname that has just been unsuspended.
EVENT_PART_CHANNEL
A user parts a channel.
av[0] EVENT_START or EVENT_STOP. EVENT_START when the user is about
to be removed from the channel internally, EVENT_STOP when
this has been done.
av[1] The nickname of the user parting the channel.
av[2] The name of the channel the user has parted.
av[3] The reason the user parted the channel, this is not always sent
so check the count to make sure it was passed. (ac == 4)
EVENT_RELOAD
This event is emitted after the configuration file has been reloaded.
av[0] Always EVENT_START.
EVENT_RESTART
This event is emitted before the services are being restarted.
av[0] Always EVENT_START.
EVENT_SERVER_CONNECT
A new server has just connected to the network.
av[0] The name of the new server.
EVENT_SERVER_SQUIT
A server has sent an SQUIT and is about to be removed from the
network. This event is being sent before the server is actually
removed from the network.
av[0] The name of the server that is being removed.
EVENT_SHUTDOWN
This event is emitted when Anope is being shut down.
av[0] EVENT_START or EVENT_STOP, to indicate where in the process of
restarting the core is. With EVENT_START, services are still
fully online and operating. With EVENT_STOP, every internal
clean up has been done already, and the SQUIT has been sent;
the only thing done after emitting the event is closing the
socket to the uplink hub.
EVENT_SIGNAL
This event is emitted when Anope is quitting because of a signal it
received.
av[0] The quit message that will be sent with the SQUIT for this
shutdown.
EVENT_TOPIC_UPDATED
A channel topic has been succesfully updated. Note that this event is
only emitted if the new topic has been fully accepted and set by the
Anope core.
av[0] The name of the channel involved.
av[1] The new topic set on the channel.
EVENT_USER_LOGOFF
A user has left the network. This event is emitted before the internal
removal is performed, so the user still exists internally.
av[0] The nickname of the user leaving the network.
+8 -478
View File
@@ -1,480 +1,10 @@
Frequently Asked Questions (FAQ) concerning Anope
------------------------------------------------
NOTE:
An updated version of this FAQ can be found on our website: www.anope.org
Table of Contents
-----------------
1) General
1.1) What is Anope?
1.2) Where can I find Anope?
1.3) Does Anope run under Windows?
1.4) Can I send you questions without reading the FAQ, INSTALL or README
files?
1.5) I need support for the XYZ protocol.
1.6) Your Services program doesn't do XYZ like DALnet (or other) Services.
What's wrong?
1.7) I've got a great new idea for Services. Do you want it?
1.8) Examples of features we have been asked about and why we won't add (or
haven't yet added) them, so don't ask us about them:
1.9) Can you help me?
1.10) Where is RootServ?
2) Installation / Configuration
2.1) When I run "make", I get an error message like "missing separator",
"Unassociated shell command", "Unexpected end of line seen", etc.
2.2) I get an error like "Makefile.inc not found".
2.3) I typed "./services" at the command line, but nothing happened!
2.4) Whenever I start Anope, I get a message on my IRC server saying
"connection refused" or something similar, and Anope gives an error
message from the server saying "Closing Link: ...".
2.5) My IRC server is giving me messages like "Connection to
services.whatever.net[127.0.0.1] activated" and then "Access denied --
no N line". Why?
2.6) When I say "/connect services.*", it doesn't work!
2.7) Anope starts up okay, but if I try to register a nickname, it comes
back with "Sorry, registration failed."
2.8) Anope reports (via /stats u or /msg OperServ STATS) a different number
of users online than I get from doing /lusers.
3) OperServ
3.1) Using the OperServ JUPE command results in server messages like
"Server juped.server introduced by non-hub server services.my.net".
3.2) I can't use the ADMIN command to add Services admins, it tells me
"Permission denied."
3.3) When I add an AKILL, the users matching it don't get killed.
3.4) Trying to use OperServ gives me "Access denied", but my nick is in the
ServicesRoot directive and is registered, and I've identified for my
nick.
3.5) When I used the OperServ RAW command, Anope and/or my network crashed,
or did weird things! Please fix this bug!
3.6) I would like to have the list of the different RAW on OperServ.
3.7) I can't get /OS UMODES and /OS SVSNICK to work!
3.8) What is a Super-Admin? How does it work? Why might it not work?
3.9) How can i enable the OperServ RAW command?
4) Bugs / Crashes
4.1) Anope always dies after about five minutes, saying "FATAL ERROR! Can't
back up nick.db".
4.2) Anope crashed with a segmentation fault.
4.3) I've found a bug that's not mentioned here or in the README or BUGS
files. What should I do?
4.4) My FreeBSD box complains about 'Shared object "nss_dns.so.1" not
found'
4.5) Anope and long (more then 30 character) nicknames.
5) ChanServ
5.1) Anope's channel mode setting doesn't work. I can't set modes with
OperServ, and every time ChanServ tries to set a mode, my server
reverses the change.
5.2) Anope ignored the SET SUCCESSOR setting and deleted a channel when the
founder expired.
5.3) How to auto voice all those whom join my #channel?
5.4) Channel options like RESTRICTED or SECUREOPS don't work. What's wrong?
6) BotServ
6.1) How do I add bots to BotServ?
6.2) Why do kick triggers and fantasy commands fail to work with my Bahamut
IRCd?
7) Language
7.1) Anope complains in the logfile about being unable to load the default
language.
7.2) Anope spricht kein Deutsch!, etc. (Anope doesn't speak my language!)
7.3) I selected a language other than English, but sometimes Anope sends
responses in English instead.
8) DevNull
8.1) What is the purpose of DevNull?
-------------------------------------------------------------------------------
1) General
1.1) What is Anope?
Anope is a set of services for IRC networks. See the README file for more
information. And in case you were wondering, Anope is Epona spelt backwards
:)
1.2) Where can I find Anope?
The latest version can always be found at the official Anope distribution
site:
* http://www.anope.org/
New version announcements can also be found at http://www.anope.org/ in the
main page.
1.3) Does Anope run under Windows?
Yes. For more information on how to obtain the windows version of Anope
visit http://wiki.anope.org/Windows
1.4) Can I send you questions without reading the FAQ, INSTALL or README files?
No. If you don't read those files, your messages will most probably be
ignored. We don't mean to be rude, but if we took the time to write down
some documentation, we'd expect you to take some time to read it.
1.5) I need support for the XYZ protocol.
Since Anope 1.7.9, support for other IRCD's, and thus protocols, has been
made modular. More information on making a support file for your favorite
IRCD can be found in the docs/IRCD file.
1.6) Your Services program doesn't do XYZ like DALnet (or other) Services.
What's wrong?
Nothing is wrong, except your expectations. Anope is a completely
different program from that used on DALnet; they are similar in concept
only.
1.7) I've got a great new idea for Services. Do you want it?
We are always interested in hearing new ideas. HOWEVER, do not expect your
proposal to be in the next Anope release for sure. As a rule, we usually
don't add anything that can be equivalently done by other means, or that we
consider totally useless; see question 1.8 for examples of things we don't
plan to add.
Our general intent is for Anope to provide as much functionality as
possible--while staying as lean as possible. So features which are
arguably beneficial will tend to be added, while features of limited or no
benefit or which can be equally provided by something else already in use
will tend to be passed over.
If you'd like to give us your idea, you can go to our website at
http://www.anope.org/ and add it on our online Forum, in the Feature
Requests section.
1.8) Examples of features we have been asked about and why we won't add (or
haven't yet added) them, so don't ask us about them:
* An option to make ChanServ stay in some/all registered channels: we see
absolutely no necessity for this feature, since BotServ already does this
anyway.
* A "current time" field in NickServ and ChanServ INFO displays: Most
people have clocks of some sort either on their computer screens or on
their walls (or both), and all IRC servers, as well as Services, have a
command to return the server's current time. Thus a current-time field in
INFO displays would simply take up extra space for no reason.
1.9) Can you help me?
No, we can't help you unless you tell us what you need help with.
1.10) Where is RootServ?
Anope does not supply RootServ. All functions you would find in RootServ
have been integrated into OperServ. If you really want to use RootServ, you
can set the OperServAlias in services.conf to be RootServ. This will enable
the RootServ nick to be used for OperServ as well. Read the comments near
OperServAlias in the configuration file for more information.
2) Installation / Configuration
2.1) When I run "make", I get an error message like "missing separator",
"Unassociated shell command", "Unexpected end of line seen", etc.
Your make program isn't compatible with the Makefile for Anope. The
Makefile was designed to work with GNU make, and as such may not work on
other systems' "make" programs. If you get an error from "make", obtain
GNU make from ftp://prep.ai.mit.edu/pub/gnu/ (or wherever you prefer) and
use it instead of your system's default "make". Note that GNU make may
already be installed on your system; try using the command "gmake" instead
of "make".
The make programs bundled with SunOS/Solaris and FreeBSD have been reported
not to work; you will need to use GNU make on these systems.
2.2) I get an error like "Makefile.inc not found".
You forgot to run the Config script first. See the INSTALL file for
compilation instructions.
2.3) I typed "./services" at the command line, but nothing happened!
Anope puts itself in the background when it starts, so you get your shell
prompt right back. Meanwhile, Anope will continue setting up, then connect
to the IRC server specified in services.conf (or on the command line). If
it doesn't connect, you probably specified the wrong server type in the
configuration file. (Also make sure that you are actually running one of
the supported servers. There are a gazillion different variations on the
basic IRC protocol out there, and we have neither the time nor the desire
to add support for them.)
The recommended server, under which Epona (the original code base used by
Anope) was developed, is Bahamut. DreamForge 4.6.7 will also work fine, but
it's a bit obsolete nowadays. Derivatives of Bahamut and DreamForge may
also work, if they don't change the server<->server protocol too much;
contact their authors for more information. Most people, though, are
running Anope with UnrealIRCd, UltimateIRCd or Bahamut.
As always, you can check the log file (services.log by default) for error
messages. You can also start services with the -nofork command line option
to prevent it from running in the background, and it will output the
messages written to the log file to the console as well.
2.4) Whenever I start Anope, I get a message on my IRC server saying
"connection refused" or something similar, and Anope gives an error
message from the server saying "Closing Link: ...".
See section 3 of the INSTALL file.
2.5) My IRC server is giving me messages like "Connection to
services.whatever.net[127.0.0.1] activated" and then "Access denied -- no
N line". Why?
This is typically caused by including a port number in the C:line for
services, which tells your server to try to autoconnect to it (depending on
the class (Y:line) settings). This is not what you want, because Anope
will connect to the server itself, but does not listen for servers to
connect to it. The solution is to remove the port number from the C:line.
2.6) When I say "/connect services.*", it doesn't work!
Of course not. RTFM (Read The Fine Manual), and see the previous answer.
2.7) Anope starts up okay, but if I try to register a nickname, it comes back
with "Sorry, registration failed."
Make sure you've selected the correct IRC server type in the configure
script; see question 2.4 for details.
2.8) Anope reports (via /stats u or /msg OperServ STATS) a different number of
users online than I get from doing /lusers.
Anope doesn't count its own pseudo-clients (NickServ, ChanServ, etc.) in
its user count, while the IRC server does.
3) OperServ
3.1) Using the OperServ JUPE command results in server messages like "Server
juped.server introduced by non-hub server services.my.net".
Services' uplink must have an H: line for Services in the ircd.conf file,
which looks something like:
H:*::services.whatever.net
3.2) I can't use the ADMIN command to add Services admins, it tells me
"Permission denied."
Did you define yourself as the Services root? You need to insert your
nickname in the ServicesRoot directive in services.conf. Also, you must be
a global IRC Operator and your nickname must be registered and properly
indentified with NickServ.
3.3) When I add an AKILL, the users matching it don't get killed.
Use the AkillOnAdd configuration directive.
3.4) Trying to use OperServ gives me "Access denied", but my nick is in the
ServicesRoot directive and is registered, and I've identified for my nick.
You need to be a global oper (i.e. user mode +o) to access OperServ. This
can be configured via the OSOpersOnly directive in services.conf .
3.5) When I used the OperServ RAW command, Anope and/or my network crashed, or
did weird things! Please fix this bug!
"That's not a bug, it's a feature."
Have you ever typed /msg OperServ HELP RAW? It's clearly stated there that
this command is dangerous and that its use may result in very bad things.
And that's why this command has been disabled by default. If you enabled
and used it, YOU'RE ON YOUR OWN. All help requests will be ignored, even if
the problem happens not immediately.
3.6) I would like to have the list of the different RAW on OperServ.
If you have to ask, you should not be messing with RAW :)
3.7) I can't get /OS UMODES and /OS SVSNICK to work!
You need to be a SuperAdmin to be able to use these commands.
3.8) What is a Super-Admin? How does it work? Why might it not work?
Super-Admin's have extra privileges, including being founder on all
channels. It must be activated on a per user basis and is only available to
Services Roots. It is set using OperServ and is not persistent. It only
works if SuperAdmin is not commented in the services configuration file.
This is commented by default. Read /msg OperServ HELP SET SUPERADMIN for
further help.
3.9) How can i enable the OperServ RAW command?
Enabling the OperServ RAW command is VERY dangerous and should never be
done on a real network without thinking about it very well first. The RAW
command can easily break your whole network if used incorrectly, and thus
you will receive NO SUPPORT if you enable RAW on your network.
Before you enable RAW, be very sure you really want to enable it, and keep
in mind that you will NOT BE ABLE to receive ANY SUPPORT anymore, because
Anope's stability cannot be guaranteed if RAW is enabled.
The RAW command comes bundled as a core module for operserv. To load it,
add the os_raw module to the list of OperServ core modules. But be sure to
keep in mind that when you enable the RAW command, you CANNOT GET ANY
SUPPORT for Anope anymore.
4) Bugs / Crashes
4.1) Anope always dies after about five minutes, saying "FATAL ERROR! Can't
back up nick.db".
Make sure that the user Anope runs as has write access to the data
directory, and that the data directory actually exists (the latter
shouldn't be a problem if you ran the Config script). This means Anope
needs write and execute permission on the data directory itself and execute
permission on every parent directory of the data directory.
4.2) Anope crashed with a segmentation fault.
See if you can reproduce this by doing a certain sequence of things. If
so, please report it to us (see part 6 of README file). If not, you're
probably out of luck; if you like, you can report it to us anyway, but
chances are it won't get fixed if we don't have instructions on reproducing
it. If you do have such a problem, you may find the crontab utility useful
for dealing with it.
Also, see the DumpCore directive in the configuration file. It allows Anope
to dump its core whenever it's segfaulting, usually calling it core and
placing it into Anope's main directory. Open up gdb by issuing the
following command at your shell:
* gdb services core
(of course replacing 'core' with the name of the core if different) and
type 'bt' at the gdb prompt. After that, send us the output you got and
keep the core file in a safe place, in case we need it to dig deeper into
the problem.
4.3) I've found a bug that's not mentioned here or in the README or BUGS files.
What should I do?
See section 6 of the README file.
4.4) My FreeBSD box complains about 'Shared object "nss_dns.so.1" not found'
We haven't figured out the exact cause yet, but as a quickfix you can
delete the /etc/nsswitch.conf file. Please keep in mind that removing a
configuration file can be dangerous, so only do this if you know what you
are doing.
4.5) Anope and long (more then 30 character) nicknames.
By default anope only supports nicknames up to 30 characters (NICKLEN=30).
If your IRCd allows for longer nicknames or has been modified to do so
anope will start logging a lot of ("NICK from nonexistent nick") messages.
This is because once a user uses a nick that is too long for anope to handle,
anope loses track of the user for the remainder of the session.
It is POSSIBLE but not NOT RECOMMENDED to extend the maximum length of nicknames
anope can track, however this will also break database compatibility. DBs saved
with anope set to allow for example 40 chars cannot be read by a default anope
and vice versa. So changing the maximum nick length is only possible
when starting with fresh databases and even then the consequences of this are
UNTESTED.
In order to change the maximum internal nick length, change the NICKMAX setting
in include/config.h, recompile anope and start without databases.
5) ChanServ
5.1) Anope's channel mode setting doesn't work. I can't set modes with
OperServ, and every time ChanServ tries to set a mode, my server reverses
the change.
Make sure EVERY server on your network has a U: line for Services in
ircd.conf, for example:
U:services.whatever.net:*:*
5.2) Anope ignored the SET SUCCESSOR setting and deleted a channel when the
founder expired.
Normally, this is because the successor had too many channels registered;
in this case, you will see an entry in the log file like the following:
[date] Successor (SuccessorNick) of channel #somechannel owns too many
channels, deleting channel #somechannel
If you don't get a message like this or you can verify that the successor
wasn't running into the channel limit, please report it using the
bug-reporting procedure below (see section 6 of the README file).
5.3) How to auto voice all those whom join my #channel?
Execute the following commands (/cs is an alias for /msg ChanServ):
/cs set #channel secure off
/cs set #channel xop off
/cs levels #channel set AUTOVOICE -1
5.4) Channel options like RESTRICTED or SECUREOPS don't work. What's wrong?
Make sure that you didn't put any of your normal IRCd's as a ULined server
in Anope. Some access checks for clients from ULined servers are skipped to
avoid fights between the ULined servers. This is usually only useful when
you have a statistics server connected to your network.
6) BotServ
6.1) How do I add bots to BotServ?
Read /msg BotServ HELP and /msg BotServ HELP BOT. Note that you need to be
opered up and identified as a Services Administrator before you can use the
BOT command.
6.2) Why do kick triggers and fantasy commands fail to work with my Bahamut
IRCd?
Bahamut allows you to setup a server as 'serviceshub'. This will filter
certain data services usually don't need to process. This option also
filters channel messages, because DALnet's services have no use for them.
Anope parses the channel messages for kick triggers and fantasy commands.
To make sure these work the server type of the hub they're linked to should
be simply 'hub' and not 'serviceshub'.
7) Language
7.1) Anope complains in the logfile about being unable to load the default
language.
You forgot to run "make install".
7.2) Anope spricht kein Deutsch!, etc. (Anope doesn't speak my language!)
See section 5 of the README file.
7.3) I selected a language other than English, but sometimes Anope sends
responses in English instead.
Some language files are not complete--in other words, they don't have a
translation of every message Anope uses, but only some of them. In this
case, the missing messages will be displayed in English. You can either
wait for the primary translator to provide us with a translation, or do the
translation yourself and send us the messages translated into your
language.
8) DevNull
8.1) What is the purpose of DevNull?
DevNull functions as a message sink. Any message sent to it will be
ignored. It will not be logged, there will be no response. It will be lost
forever. Whether it's useful or not is up to you; we just provide you with
the option.
The information in the 1.9 FAQ is subject to change at any
moment due to new developments. Please visit our website
for the most up to date information.
An updated version of the FAQ can be found here:
http://wiki.anope.org/index.php/FAQ
+1 -1
View File
@@ -157,7 +157,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
+378 -601
View File
@@ -1,601 +1,378 @@
How To Add IRCd Support
-----------------------
1) Files to Edit
2) Modifing the Header File
3) The Code
4) Modes
5) Functions / Events
6) CAPAB/PROTOCTL
1) Files to Edit
When preparing to add support to Anope for your ircd, you need to edit
the following files.
A) Make a copy of the .c and .h file of the IRCd that matches the ircd
that you are attempting to add support for best.
B) Make a backup copy of include/services.h, include/sysconf.h.in
C) Make a backup copy of Config and configure.in
First step in this process is to rename the .c and .h file after the IRCd
that you are going to be adding support for. Its recommended that you come
up with a name that is clear and easy to understand.
Now that you have the files that you will need to create your own ircd
support, starting with Config. This file is a shell script file; scroll
down until you find the list of ircs for the user to select. Indicate
the based ircd version which is supported such as a series 1.x or 2.2.x,
placing in the comment side an exact version that the support is for or
"experimental" if you are not the ircd developer. The next step is to
decide how the IRCd will be defined, following the existing examples edit
'IRCTYPE_DEF="IRC_RATBOX"' to be the descriptive define for your ircd.
With the Config file ready to go, edit configure.in and find in there the
reference to --with-ircd. You should see the various other ircds, and
you will want to add yours in there using the same IRC_ name you came up
with above. Important in this step is to make sure that you set the
IRCDFILE to the name of the .c file you set in step 1. Once you have the
configure.in created you can remove the old configure and at the command
prompt type "autconf"; this will generate the new configure file.
Getting close to actually modify code. Open sysconf.h.in and add two
lines for your given ircd, which is similar to this:
/* "First IRCD type" */
#undef IRC_RATBOX
Open services.h and add a line with the rest of the ircd include files to
match the name of the .h file you set in step 1.
#include "ratbox.h"
Taking the .c and .h file open them and replace the #ifdef IRC_* with the
IRC_ name you set in step two. Ensure that the code comments at the top
of the file match the ircd that the code will be for.
You are now ready to start getting into the code.
2) Modifying the Header File
Now that you have gotten past the first part of the creation process, you
are into the code. This part is the harder and more complex part. You
will need a general understanding of C code to continue. Here are the
step by step instructions required to make this work.
Open the .h file and find the section of code with
#define PROTECT_SET_MODE "+"
#define PROTECT_UNSET_MODE "-"
#define CS_CMD_PROTECT "PROTECT"
#define CS_CMD_DEPROTECT "DEPROTECT"
#define FANT_PROTECT_ADD "!protect"
#define FANT_PROTECT_DEL "!deprotect"
#define LEVEL_PROTECT_WORD "AUTOPROTECT"
#define LEVELINFO_PROTECT_WORD "PROTECT"
#define LEVELINFO_PROTECTME_WORD "PROTECTME"
If the ircd supports a protective/admin (not owner) mode, set the
PROTECT_SET_MODE and PROTECT_UNSET_MODE to be that mode. On most ircds
it's usermode "a" so you will be setting it to "+a" and "-a". The next
two are based more on what this mode is called. When you message ChanServ
to get this mode, this is the command you will be using. After this are
the fantasy commands which can be used in channel to get these modes. The
next three relate to the ACCESS LEVEL list system. Again these are the
words to gain these levels in the ACCESS LEVEL system. If your ircd does
not have these functions, leave them at what ever value is currently set;
the core code will ignore the request of the user.
Now that this is set, you can define the MODES. All user modes are stored
with UMODE_ followed by a letter matching the modes case; be careful to
use the correct case as this will make it clear when you setup MODES in
the .c in a few. Use hex values for the modes so starting at 0x00000001
to 0x8000000. In most cases you want to list all modes. If you run out of
values look at removing any modes that do not impact services.
Channel modes are done much like user modes, with the exception that
bans, exceptions, invites, and modes that are applied to a user such as
op and voice are not defined here. All other modes are defined in here.
Again be clear and use the correct case and use hex values as done with
user modes.
Finally we come to DEFAULT_MLOCK; this is the mode that services will set
by default on channels when they are registered. In general you want this
to be what is acceptable by the ircd; in most cases this is "+nt"
3) The Code
Here is where the code of the .c file comes in. Be prepared to spend at
least an hour, if not longer, going over the code and getting it right;
Especially if you are setting up an ircd that is completely different
than the one you used as a base. This section covers the majority of the
code that is in use.
The first bit of code you will face is:
const char version_protocol[] = "Ratbox IRCD";
This the protocol name which will appear in various places; especially
when you do -version at the command prompt, this is where you state the
server name. The version is not always needed unless you are showing that
the support is for one branch of a ircd family, such as Unreal 3.1 and
Unreal 3.2.
Once you have decided on this little piece of code, you will come to
flood mode characters being used for setting and removing. If your IRCd
does not support flood modes, you can just use ""; we will be setting if
your IRCD supports flooding or not in a little bit.
const char flood_mode_char_set[] = "+f";
const char flood_mode_char_remove[] = "-f";
The next task that you will face is setting whether the IRCD sends time
stamps on modes but does not tell us that it will do so. If it does, set
UseTSMODE to 1; if it does not set it to be 0. If you're not sure refer
to your IRCd's documentation on how MODE is sent.
int UseTSMODE = 0;
Now you've come to the part where you setup your ircd. There are two
structs which hold this information; This allows you to quickly setup
your specific ircd.
IRCDVar ircd[] = { }
This struct contains your basic IRCd functions. Your base source file has
the list of all available variables; note that you should not swap any
around, or you will break stuff. Here is a brief description of the usage
of each.
1) Name: This member tells Anope about the IRCD's name. It may contain
text about it's name and version. This is used to identify the
build on startup.
2) NickServ Mode: This is the user mode set by Anope on NickServ.
Normally you want this to be some form of oper flag,
or a services flag.
3) ChanServ Mode: This is the user mode set by Anope on ChanServ.
Normally you want this to be some form of oper flag,
or a services flag.
4) MemoServ Mode: This is the user mode set by Anope on MemoServ.
Normally you want this to be some form of oper flag,
or a services flag.
5) HostServ Mode: This is the user mode set by Anope on HostServ.
Normally you want this to be some form of oper flag,
or a services flag. Note that if your ircd does not
support HostServ, you can safely make this NULL or +,
as there is a check before bringing HostServ online.
6) OperServ Mode: This is the user mode set by Anope on OperServ.
Normally you want this to be some form of oper flag,
or a services flag.
7) BotServ Mode: This is the user mode set by Anope on BotServ.
Normally you want this to be some form of oper flag,
or a services flag.
8) HelpServ Mode: This is the user mode set by Anope on HelpServ.
Normally you want this to be some form of oper flag,
or a services flag.
9) DevNull Mode: This is the user mode set by Anope on DevNull.
Normally you want this to be some form of oper flag,
or a services flag.
10) Global Mode: This is the user mode set by Anope on Global.
Normally you want this to be some form of oper flag,
or a services flag.
11) NickServ Alias Mode: This is the user mode set by Anope on the alias
of NickServ. Normally you want this to be some
form of oper flag, or a services flag.
12) ChanServ Alias Mode: This is the user mode set by Anope on the alias
of ChanServ. Normally you want this to be some
form of oper flag, or a services flag.
13) MemoServ Alias Mode: This is the user mode set by Anope on the alias
of MemoServ. Normally you want this to be some
form of oper flag, or a services flag.
14) HostServ Alias Mode: This is the user mode set by Anope on the alias
of MemoServ. Normally you want this to be some
form of oper flag, or a services flag. Note that
if your ircd does not support HostServ, you can
safely make this NULL or +, as there is a check
before bringing HostServ online.
15) OperServ Alias Mode: This is the user mode set by Anope on the alias
of OperServ. Normally you want this to be some
form of oper flag, or a services flag.
16) BotServ Alias Mode: This is the user mode set by Anope on the alias
of BotServ. Normally you want this to be some
form of oper flag, or a services flag.
17) HelpServ Alias Mode: This is the user mode set by Anope on the alias
of HelpServ. Normally you want this to be some
form of oper flag, or a services flag.
18) DevNull Alias Mode: This is the user mode set by Anope on the alias
of DevNull. Normally you want this to be some
form of oper flag, or a services flag.
19) Global Alias Mode: This is the user mode set by Anope on the alias
of Global. Normally you want this to be some form
of oper flag, or a services flag.
20) BotServ Bots Mode: This is the user mode set by Anope on all BotServ
bots. Normally you want this to be a some form of
service or bot flag; you can use + for no mode at
all.
21) Max Channelmode Symbols: This is the total number of possible channel
modes that can appear before a nick. Do
remember to count each possible mode, so +ov
is 2.
22) Modes to Remove: This is every mode that Anope should remove when
stripping channel modes.
23) Channelmode for bots: When a BotServ bot joins a channel, this is the
mode set on them. Normally you will want them
opped (+o), and protected (+a) on IRCd's that
support it.
24) SVSNICK: Can the ircd use SVSNICK to change some ones nick? Otherwise,
KILL is used. Use 1 for yes, 0 for no.
25) VHOST: Can a user's host be changed on the fly? Enabling this allow
HostServ online. Use 1 for yes, 0 for no.
26) OWNER: Has a channel umode for being the channel owner. For example,
UnrealIRCd has mode +q. Use 1 for yes, 0 for no.
27) OWNER MODE SET: What mode to set to make someone the owner. If the
IRCd doesn't support owners, set this to NULL.
28) OWNER MODE UNSET: What mode to unset to take away someone's channel
owner status. If the IRCd doesn't support owners,
set this to NULL.
29) ADMIN MODE SET: What mode to set to make someone a channel admin.
If the IRCd dosn't support admins, set to NULL.
30) ADMIN MODE UNSET: What mode to unset to take away channel admin.
If the IRCd dosn't support admins, set to NULL.
31) Mode on Nick Register: What mode to give users when they register
with NickServ. If your ircd doesn't set expect
a mode to be set on registration, you should
set this to NULL.
32) Mode on Nick Unregister: What mode to set give users when they cancel
their registration with NickServ. If your
IRCd doesn't set a mode for registered users
you should set this to NULL.
33) Mode on Nick Change: What mode to give users when they change their
nick. If your ircd doesn't set a mode, you
should set this to NULL.
34) SGLINE: Does the IRCd support realname (geocs) bans? Use 1 for yes,
0 for no.
35) SQLINE: Does the IRCd support nick bans? Use 1 for yes, 0 for no.
36) SZLINE: Does the IRCd support SZLINES? Use 1 for yes, 0 for no.
37) HALFOP: Is channel mode +h for halfop supported by the IRCd? Use 1 for
yes, 0 for no.
38) Number of Server Args: When an IRCd connects, this is the number of
parameters that are passed.
39) Join to Set: Services must join a channel to set any modes on that
channel. Use 1 for yes, 0 for no.
40) Join to Message: Services must join a channel to send any message to
that channel (cannot override +n). Use 1 for yes,
0 for no.
41) Exceptions: Support for channel exceptions (mode +e). Use 1 for yes,
0 for no.
42) TS Topic Forward: Some IRCd's (like UnrealIRCd) like their topic TS
set forward by +1. Use 1 for yes, 0 for no.
43) TS Topic Backward: Some IRCd's (mainly older DreamForge-like ones)
like their topic TS set back by -1. Use 1 for yes,
0 for no.
44) Protected Umode: UMODE_ define that defines the protected usermod.
Use 0 for no support, or enter the UMODE_ define.
45) Admin: Support for channel admins (Mainly used by UltimateIRCd). Use
1 for yes, 0 for no.
46) SQline Channels: The IRCd's supports banning channel names via
SQLINES. Use 1 for yes, 0 for no.
47) Quit On Kill: When we (SVS)KILL a user, does the IRCd send back a
QUIT message for that user? Use 1 for yes, 0 for no.
48) SVSMODE -b: We can use SVSMODE to unban hosts from a channel. Use
1 for yes, 0 for no.
49) Protect: Support for channel protect (mode +a, mainly being used by
UnrealIRCd and ViagraIRCd). Use 1 for yes, 0 for no.
50) Reverse: We can do a reverse check when unbanning. For use with
DreamForge based IRCd's. Use 1 for yes, 0 for no.
51) Register Channels: Supports sending a channelmode for registered
channels. Use 1 for yes, 0 for no.
52) Registered Mode: Channelmode to set on registered channels, see the
option above. Use 1 for yes, 0 for no.
53) vIdent: Support for including a user's ident in their vHost. Use
1 for yes, 0 for no.
54) SVSHOLD: Support for temporarily 'holding' a nick, instead of using
a nick enforcer client. Use 1 for yes, 0 for no.
55) TS on MODE: We need to send a timestamp when modes are being changed.
Use 1 for yes, 0 for no.
56) NICKIP: The IP address of new users is being sent along with their
hostname when new users are being introduced on the network.
Use 1 for yes, 0 for no.
57) Umode: We can use OperServ to change a user's mode. Use 1 for yes,
0 for no.
58) O:LINE: We can use OperServ to give some user a temporary O:LINE.
Use 1 for yes, 0 for no.
59) Vhost On Nick: On NICK the IRCd sends the VHOST. Use 1 for yes,
0 for no.
60) Change Realname: Change real name. Use 1 for yes, 0 for no.
61) Extra Help: If the IRCd has more help for functions in ChanServ than
the default help, you should put the language string
identifier here. Use 0 for no extra help.
62) No Knock: CMODE_ that defines NO KNOCK. Use 0 for no support.
63) Admin Only: CMODE_ that defines Admin Only. Use 0 for no support.
64) Default MLock: Default channelmodes for MLOCK. Use 0 for no modes.
65) Vhost Umode: UMODE_ that indicates if the user currently has a vHost.
Use 0 for no support.
66) Flood Mode: The IRCd has a channelmode for blocking floods. Use 1 for
yes, 0 for no.
67) Link Mode: The IRCd has a channelmode for linking a channel to some
other channel. Use 1 for yes, 0 for no.
68) CMode F: CMODE_ that defines flood mode. Use 0 for no support.
69) CMode L: CMODE_ that defines link mode. Use 0 for no support.
70) Check Nick ID: Should we check if a user should remain identified when
changing their nick? This is for IRCd's that remove
their registered-user mode when someone changes their
nick (like Bahamut does).
Use 1 for yes, 0 for no.
71) No Knock Requires +i: Does the No Knock channel mode require invite
only channels? Use 1 for yes, 0 for no.
72) Chan Modes: If sent in CAPAB/PROTOCOL, we store it in here. This is
NULL by default.
73) Tokens: Can we use tokens to talk to the IRCd? Use 1 for yes,
0 for no.
74) Token Case Senstive: Are the IRCd's TOKENS/COMMANDS case sensitive?
Use 1 for yes, 0 for no.
75) base64 SJOIN TS: Are the timestamps sent with a SJOIN in base64? Use
1 for yes, 0 for no.
76) Supports +I: Does the IRCd support channelmode +I? Use 1 for yes,
0 for no.
77) SJOIN Ban Char: Character used to identify bans. Use ''.
78) SJOIN Except Char: Character used to identify exceptions. use ''.
79) SVSMODE UCMODE: Can we clear user channel modes with SVSMODE? Use
1 for yes, 0 for no.
80) SGline Enforce: Does the IRCd enforce SGLINES for us or do we need to
do so? Use 1 for yes, 0 for no.
81) Vhost Character: The character used to represent the vHost mode, if
this is supported by the IRCd.
82) TS6: Does the IRCd support TS6? Use 1 for yes, 0 for no.
83) UMode +h: Does the IRCd support usermode +h for helpers?
Use 1 for yes, 0 for no.
84) P10: Is this IRCd a P10-style IRCd? Use 1 for yes, 0 for no.
85) Character Set: Unreal passes the character set during PROTOCTL,
the value is stored here. Set this NULL to start.
86) Reports sync: Does the IRCd report when it's in sync (or done bursting,
depending on how you want to say it)? Remember to set
the sync state for servers correctly if it does.
Use 1 for yes, 0 for no.
87) Channel CIDR: Set to 1 if channel bans, excepts and invites
support CIDR masks. Expected syntax: *!*@ip/mask.
When set to 1, anope will only parse strict CIDR masks.
IRCd's that try to correct invalid CIDR's (like nefarious)
will need a custom implementation in the core.
Contact the anope Dev Team if this is the case.
Set to 0 if CIDR's are not supported by your IRCd.
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.
IRCDCAPAB ircdcap[] = { }
This struct is based on the CAPAB defines. You should review the CAPAB
table below to see how this should be done.
Define Table
--------------------------------------------------------------------------
Define | Value | Token | Description
----------------|------------|-----------|--------------------------------
CAPAB_NOQUIT | 0x00000001 | NOQUIT | NOQUIT protocol support
CAPAB_TSMODE | 0x00000002 | TS | Chanmodes are timestamped
CAPAB_UNCONNECT | 0x00000004 | UNCONNECT | UNCONNECT protocol support
CAPAB_NICKIP | 0x00000008 | NICKIP | IP sent in the NICK line
CAPAB_NSJOIN | 0x00000010 | SSJOIN | Smart SJOIN support
CAPAB_ZIP | 0x00000020 | ZIP | Support for gzipped links
CAPAB_BURST | 0x00000040 | BURST | Supports BURST command
CAPAB_TS3 | 0x00000080 | TS3 | Support for TS3 protocol
CAPAB_TS5 | 0x00000100 | TS5 | Support for TS5 protocol
CAPAB_DKEY | 0x00000200 | DKEY | DH-Key exchange using DKEY
CAPAB_DOZIP | 0x00000400 | ZIP | Link traffic will be gzipped
CAPAB_DODKEY | 0x00000800 | DKEY | Do DKEY with this link
CAPAB_QS | 0x00001000 | QS | Supports quit storm removal
CAPAB_SCS | 0x00002000 | SCS | String Cache System support
CAPAB_PT4 | 0x00004000 | PT4 | Support for PT4 protocol
CAPAB_UID | 0x00008000 | UID | Support for UIDs
CAPAB_KNOCK | 0x00010000 | KNOCK | Supports KNOCK
CAPAB_CLIENT | 0x00020000 | CLIENT | Supports CLIENT
CAPAB_IPV6 | 0x00040000 | IPV6 | Support for IPv6 addresses
CAPAB_SSJ5 | 0x00080000 | SSJ5 | Smart Join protocol 5 support
CAPAB_SN2 | 0x00100000 | SN2 | Support for SN2 protocol
CAPAB_VHOST | 0x00200000 | VHOST | Supports VHOST protocol
CAPAB_TOKEN | 0x00400000 | TOKEN | Supports s2s tokens
CAPAB_SSJ3 | 0x00800000 | SSJ3 | Smart Join protocol 3 support
CAPAB_NICK2 | 0x01000000 | NICK2 | Support for extended NICK (v2)
CAPAB_UMODE2 | 0x02000000 | UMODE2 | Supports UMODE2 command
CAPAB_VL | 0x04000000 | VL | VLine information in info field
CAPAB_TLKEXT | 0x08000000 | TLKEXT | Not 8, but 10 params in TKL's
CAPAB_CHANMODE | 0x10000000 | CHANMODE | Channel modes are passed here
CAPAB_SJB64 | 0x20000000 | SJB64 | SJOIN timestamps are base64 encoded
CAPAB_NICKCHARS | 0x40000000 | NICKCHARS | Character set used by the IRCD for nicks
4) Modes
The next thing you should do is defining the user modes. You will want to
have your .h file handy for this part.
unsigned long umodes[128] = { }
This array goes from 0 to 127 in the ASCII character set. Insert the user
modes at the slot where the mode fits. If you are adding a the user mode
of +i find the 105th (ASCII code of 'i') character slot in the array, and
place the UMODE_i into this slot. Your base .c file should contain a good
start for this, as well as a little help locating the characters.
The following mode set is for the channel symbols. During a SJOIN event
the modes are sent usually before the nick. These normally are @, +, %
etc.. depending on the ircd. Starting at ASCII 0 and running to 127.
Replace the 0 with the character (o = @, h = %) for the given mode. In the
case of halfop which is usually sent as % replace the 37th character with
'h', do this until all modes that are possible be received in this manor
have been inserted into the array.
Now that you have that complete, the following array is ready to be dealt
with. This is the cmmodes array, like the others it is a ASCII array
starting at 0 and going to 127. However at the given letter you will want
to enter the add, and delete function for the given mode. In the case of
bans (+b) there is add_ban, and del_ban. Anope provides functions for
bans, exceptions and invites, should your ircd have more then these please
contact Anope to discuss what can be done to add this mode.
5) Functions and Events
A brief word about functions and events. All events are captured using:
void moduleAddIRCDMsgs(void)
{
m = createMessage("NICK", anope_event_nick);
addCoreMessage(IRCD,m);
}
Each event should have a event handler if its important enough to be
processed by services. All event functions should be formed like this:
int anope_event_capab(char *source, int ac, char **av)
{
return MOD_CONT;
}
They will receive the source; this can be NULL at times depending on the
event. Next, ac is the number of arguments that are in the event, and av
holds the values for each; so av[0] is the first variable, av[1] will be
the second one, and so on. Events are likely to pass to various upper
level event handlers; see the previous ircd source for how they handle
these events.
All commands are formed like this:
void anope_cmd_svsnoop(char *server, int set)
{
send_cmd(NULL, "SVSNOOP %s %s", server, (set ? "+" : "-"));
}
They may take any number of arguments, depending on the command. They
should eventually come to a send_cmd(); this root function is how
commands are sent to the IRCd.
6) CAPAB/PROTOCTL
Most IRCD send a CAPAB or PROTOCTL line so that they can work out what
the other end of the connection is capable of doing. Anope has a function
to read these lines and set itself up to to handle these events better.
When adding support for your ircd, take the following steps.
1) In the ircd.c find the function anope_cmd_capab(); this function will
send the CAPAB/PROTOCTL line (consult your ircd documentation for
which to send). In a single line type in the tokens that anope must
send. Here is an example of Hybrid's capab line:
/* CAPAB */
void anope_cmd_capab()
{
send_cmd(NULL, "CAPAB TS5 EX IE HOPS HUB AOPS");
}
2) In the ircd.h file make sure to place the defines (see below) that
match your IRCd's tokens; only use the ones that matter to your ircd.
Should your IRCd add new features not covered in the defined, please
contact the Anope Dev team before doing so. See README for information
on how to contact the Anope team.
3) Ensure that the CAPAB/PROTOCTL event his handled correctly.
A) In the function "moduleAddIRCDMsgs" making sure that you have the
following two lines:
m = createMessage("CAPAB", anope_event_capab);
addCoreMessage(IRCD,m);
B) Add the function to handle the event
int anope_event_capab(char *source, int ac, char **av)
{
capab_parse(ac, av);
return MOD_CONT;
}
This function should call the capab_parse function which parses
the received CAPAB/PROTOCTL line.
How To Add IRCd Support
-----------------------
1) Files to Edit
2) The Code
3) The IRCDVar struct
4) Modes
5) Functions / Events
6) CAPAB/PROTOCTL
7) IRCDProto Class
1) Files to Edit
When preparing to add supprt to Anope for your IRCd, you need to edit
the following files
A) Make a copy of the .cpp file of the IRCd that matches the IRCd that
you are attempting to add support for best.
B) Add your IRCd into the supported IRCds in example.conf
2) The Code
Here is where the code of the .cpp file comes in. Be prepared to spend at
least an hour, if not longer, going over the code and getting it right;
Especially if you are setting up an ircd that is completely different
than the one you used as a base. This section covers the majority of the
code that is in use.
The first bit of code you will face is the IRCDVar structure, which is
explained in depth in the next section.
Scroll down to the bottom and find the class for this module and rename it
to something reflecting your IRCd name. Find the function:
pmodule_ircd_version("Unreal 3.2+");
This is the protocol name which will appear in various places; especially
when you do -version at the command prompt, this is where you state the
server name. The version is not always needed unless you are showing that
the support is for one branch of a ircd family, such as Unreal 3.1 and
Unreal 3.2.
The next task that you will face is setting whether the IRCD sends time
stamps on modes but does not tell us that it will do so. If it does, set
UseTSMODE to 1; if it does not set it to be 0. If you're not sure refer
to your IRCd's documentation on how MODE is sent.
pmodule_ircd_useTSMode(0);
3) The IRCDVar struct
Now you've come to the part where you setup your ircd. There are two
structs which hold this information; This allows you to quickly setup
your specific ircd.
IRCDVar myIrcd[] = { };
This struct contains your basic IRCd functions. Your base source file has
the list of all available variables; note that you should not swap any
around, or you will break stuff. Here is a brief description of the usage
of each.
1) Name: This member tells Anope about the IRCD's name. It may contain
text about it's name and version. This is used to identify the
build on startup.
2) Pseudo Client Mode: This is the user mode set by Anope on all BotServ
bots. Normally you want this to be a some form of
service or bot flag; you can use + for no mode at
all.
3) Max Channelmode Symbols: This is the total number of possible channel
modes that can appear before a nick. Do
remember to count each possible mode, so +ov
is 2.
4) Channelmode for bots: When a BotServ bot joins a channel, this is the
mode set on them. Normally you will want them
opped (+o), and protected (+a) on IRCd's that
support it.
5) SVSNICK: Can the ircd use SVSNICK to change some ones nick? Otherwise,
KILL is used. Use 1 for yes, 0 for no.
6) VHOST: Can a user's host be changed on the fly? Enabling this allow
HostServ online. Use 1 for yes, 0 for no.
7) SGLINE: Does the IRCd support realname (geocs) bans? Use 1 for yes,
0 for no.
8) SQLINE: Does the IRCd support nick bans? Use 1 for yes, 0 for no.
9) SZLINE: Does the IRCd support SZLINES? Use 1 for yes, 0 for no.
10) Number of Server Args: When an IRCd connects, this is the number of
parameters that are passed.
11) Join to Set: Services must join a channel to set any modes on that
channel. Use 1 for yes, 0 for no.
12) Join to Message: Services must join a channel to send any message to
that channel (cannot override +n). Use 1 for yes,
0 for no.
13) TS Topic Forward: Some IRCd's (like UnrealIRCd) like their topic TS
set forward by +1. Use 1 for yes, 0 for no.
14) TS Topic Backward: Some IRCd's (mainly older DreamForge-like ones)
like their topic TS set back by -1. Use 1 for yes,
0 for no.
15) SQline Channels: The IRCd's supports banning channel names via
SQLINES. Use 1 for yes, 0 for no.
16) Quit On Kill: When we (SVS)KILL a user, does the IRCd send back a
QUIT message for that user? Use 1 for yes, 0 for no.
17) SVSMODE -b: We can use SVSMODE to unban hosts from a channel. Use
1 for yes, 0 for no.
18) Reverse: We can do a reverse check when unbanning. For use with
DreamForge based IRCd's. Use 1 for yes, 0 for no.
19) vIdent: Support for including a user's ident in their vHost. Use
1 for yes, 0 for no.
20) SVSHOLD: Support for temporarily 'holding' a nick, instead of using
a nick enforcer client. Use 1 for yes, 0 for no.
21) TS on MODE: We need to send a timestamp when modes are being changed.
Use 1 for yes, 0 for no.
22) NICKIP: The IP address of new users is being sent along with their
hostname when new users are being introduced on the network.
Use 1 for yes, 0 for no.
23) OMODE: We can use OperServ to give some user a temporary O:LINE.
Use 1 for yes, 0 for no.
24) Umode: We can use OperServ to change a user's mode. Use 1 for yes,
0 for no.
25) Vhost On Nick: On NICK the IRCd sends the VHOST. Use 1 for yes,
0 for no.
26) Change Realname: Change real name. Use 1 for yes, 0 for no.
27) Check Nick ID: Should we check if a user should remain identified when
changing their nick? This is for IRCd's that remove
their registered-user mode when someone changes their
nick (like Bahamut does).
Use 1 for yes, 0 for no.
28) No Knock Requires +i: Does the No Knock channel mode require invite
only channels? Use 1 for yes, 0 for no.
29) Chan Modes: If sent in CAPAB/PROTOCOL, we store it in here. This is
NULL by default.
30) Tokens: Can we use tokens to talk to the IRCd? Use 1 for yes,
0 for no.
31) base64 SJOIN TS: Are the timestamps sent with a SJOIN in base64? Use
1 for yes, 0 for no.
32) SJOIN Ban Char: Character used to identify bans. Use ''.
33) SJOIN Except Char: Character used to identify exceptions. Use ''.
34) SJOIN Invite char: Character used to idenfity invexs. Use ''.
35) SVSMODE UCMODE: Can we clear user channel modes with SVSMODE? Use
1 for yes, 0 for no.
36) SGline Enforce: Does the IRCd enforce SGLINES for us or do we need to
do so? Use 1 for yes, 0 for no.
37) Vhost Character: The character used to represent the vHost mode, if
this is supported by the IRCd.
38) TS6: Does the IRCd support TS6? Use 1 for yes, 0 for no.
39) P10: Is this IRCd a P10-style IRCd? Use 1 for yes, 0 for no.
40) Character Set: Unreal passes the character set during PROTOCTL,
the value is stored here. Set this NULL to start.
41) Channel CIDR: Set to 1 if channel bans, excepts and invites
support CIDR masks. Expected syntax: *!*@ip/mask.
When set to 1, anope will only parse strict CIDR masks.
IRCd's that try to correct invalid CIDR's (like nefarious)
will need a custom implementation in the core.
Contact the anope Dev Team if this is the case.
Set to 0 if CIDR's are not supported by your IRCd.
42) Global TLD Prefix: Prefix used to send global messages, should probably
be "$"
43) Max Modes: The max number of mode changes we can send in one line
4) Modes
Anope is told about modes in the moduleAddModes() function.
For the most part, the syntax for adding channel and user modes are:
ModeManager::AddUserMode(new UserMode(UMODE_NETADMIN, 'N'));
Where 'N' is the char for the mode, and UMODE_NETADMIN shows what the
mode does. Or:
ModeManager::AddChannelMode(new ChannelMode(CMODE_BLOCKCOLOR, 'c'));
Where 'c' is the char for the mode and CMODE_BLOCKCOLOR shows what
the mode does
A full list of valid mode names for the second param can be found
in services.h in the enum for ChannelModeName and UserModeName
If necessary, you can add additional modes to this list.
Adding simple modes with parameters is similar, instead adding a
'new ChannelMode', use 'new ChannelModeParam', set the third optional
arg of ChannelModeParam to false if the param should NOT be sent when unsetting
it. Eg:
ModeManager::AddChannelMode(new ChannelModeParam(CMODE_JOINFLOOD, 'j', true));
Anope will internally track the params, and they can be retrieved through
Channel::GetParam();
If you want to make param validity checking for a mode, you must create a new
class which inherits from ChannelModeParam and overload the IsValid function.
Modes CMODE_OPERONLY, CMODE_ADMINONLY, and CMODE_REGISTERED already exist
internally as classes, to overload the CanSet function to disable non opers
from mlocking (or in CMODE_REGISTERED's case, anyone) from setting them.
This should be added like:
ModeManager::AddChannelMode(new ChannelModeOper('O'));
The CMODE_FLOOD param also has its own class, but due to the wide range of
valid parameters accepted across IRCds, your protocol module MUST have the
IsValid function for this.
bool ChannelModeFlood::IsValid(const std::string &value) { }
5) Functions and Events
A brief word about functions and events. All events are captured using:
void moduleAddIRCDMsgs(void)
{
m = createMessage("NICK", anope_event_nick);
addCoreMessage(IRCD,m);
}
Each event should have a event handler if its important enough to be
processed by services. All event functions should be formed like this:
int anope_event_capab(char *source, int ac, char **av)
{
return MOD_CONT;
}
They will receive the source; this can be NULL at times depending on the
event. Next, ac is the number of arguments that are in the event, and av
holds the values for each; so av[0] is the first variable, av[1] will be
the second one, and so on. Events are likely to pass to various upper
level event handlers; see the previous ircd source for how they handle
these events.
All commands are formed like this:
void anope_cmd_svsnoop(char *server, int set)
{
send_cmd(NULL, "SVSNOOP %s %s", server, (set ? "+" : "-"));
}
They may take any number of arguments, depending on the command. They
should eventually come to a send_cmd(); this root function is how
commands are sent to the IRCd.
6) CAPAB/PROTOCTL
Most IRCD send a CAPAB or PROTOCTL line so that they can work out what
the other end of the connection is capable of doing. Anope has a function
to read these lines and set itself up to to handle these events better.
When adding support for your ircd, take the following steps.
1) In the module constructor you must tell Anope what the uplink is capable of that
isn't already passed in the CAPAB/PROTOCTL, you do this by something similar to:
CapabType c[] = { CAPAB_NOQUIT, CAPAB_NICKIP, CAPAB_ZIP, CAPAB_TOKEN, CAPAB_SSJ3, CAPAB_NICK2, CAPAB_VL, CAPAB_TLKEXT, CAPAB_CHANMODE, CAPAB_SJB64, CAPAB_NICKCHARS };
for (unsigned i = 0; i < 11; ++i)
Capab.SetFlag(c[i]);
Anything else given to Anope in the CAPAB/PROTOCTL message will be handled later by CapabParse.
The available CAPAB options are:
--------------------------------------------------------------------------
Define | Description
----------------|------------|-----------|--------------------------------
CAPAB_NOQUIT | NOQUIT protocol support
CAPAB_TSMODE | Chanmodes are timestamped
CAPAB_UNCONNECT | UNCONNECT protocol support
CAPAB_NICKIP | IP sent in the NICK line
CAPAB_NSJOIN | Smart SJOIN support
CAPAB_ZIP | Support for gzipped links
CAPAB_BURST | Supports BURST command
CAPAB_TS3 | Support for TS3 protocol
CAPAB_TS5 | Support for TS5 protocol
CAPAB_DKEY | DH-Key exchange using DKEY
CAPAB_DOZIP | Link traffic will be gzipped
CAPAB_DODKEY | Do DKEY with this link
CAPAB_QS | Supports quit storm removal
CAPAB_SCS | String Cache System support
CAPAB_PT4 | Support for PT4 protocol
CAPAB_UID | Support for UIDs
CAPAB_KNOCK | Supports KNOCK
CAPAB_CLIENT | Supports CLIENT
CAPAB_IPV6 | Support for IPv6 addresses
CAPAB_SSJ5 | Smart Join protocol 5 support
CAPAB_SN2 | Support for SN2 protocol
CAPAB_VHOST | Supports VHOST protocol
CAPAB_TOKEN | Supports s2s tokens
CAPAB_SSJ3 | Smart Join protocol 3 support
CAPAB_NICK2 | Support for extended NICK (v2)
CAPAB_UMODE2 | Supports UMODE2 command
CAPAB_VL | VLine information in info field
CAPAB_TLKEXT | Not 8, but 10 params in TKL's
CAPAB_CHANMODE | Channel modes are passed here
CAPAB_SJB64 | SJOIN timestamps are base64 encoded
CAPAB_NICKCHARS | Character set used by the IRCD for nicks
2) In the ircd.c find the function anope_cmd_capab(); this function will
send the CAPAB/PROTOCTL line (consult your ircd documentation for
which to send). In a single line type in the tokens that anope must
send. Here is an example of Hybrid's capab line:
/* CAPAB */
void anope_cmd_capab()
{
send_cmd(NULL, "CAPAB TS5 EX IE HOPS HUB AOPS");
}
3) Ensure that the CAPAB/PROTOCTL event his handled correctly.
A) In the function module constructor make sure that you have the
following two lines:
m = createMessage("CAPAB", anope_event_capab);
addCoreMessage(IRCD,m);
B) Add the function to handle the event
int anope_event_capab(char *source, int ac, char **av)
{
CapabParse(ac, av);
return MOD_CONT;
}
This function should call the CapabParse function which parses
the received CAPAB/PROTOCTL line.
7) IRCDProto Class
The IRCDProto class is set up like:
class MyIRCdProto : public IRCDProto { } ircdproto;
And told to Anope through the
pmodule_ircd_proto(&ircd_proto);
function.
This is used for sending out specific messages from Anope to your IRCd.
A list of all of the valid function names to overload and their args
are in services.h. If the protocol module you are editing is similar enough
to the IRCd you are adding support for, many of these probably won't need to
be changed.
+15 -97
View File
@@ -1,109 +1,27 @@
Anope MySQL Support
-------------------
1) Introduction
MySQL support was readded in version 1.9.2 In the form of three modules.
Anope 1.6 onwards supports MySQL databases. On Anope 1.6.0 only PHASE 1
has been implemented. Since the next phases require major changes in the
core, we decided to save it for 2.0. However, having your db's easily
accessible on your website is still a great feature.
db_mysql_read - Allows you to load your databases from MySQL.
db_mysql_write - Allows live updating of SQL tables whenever something is executed in Anope.
db_mysql_execute - Allows executing of Anope commands via SQL.
PHASE 1:Anope will be able to save all it's databases to MySQL. It will
happen in conjunction with the current FFF databases. This first step is
nothing more than a MySQL dump of the databases (i.e. read-only), since
Anope will not (for now) read from Mysql. (COMPLETED)
To execute commands via SQL, you must insert the command into the anope_commands table, an example is as follows:
PHASE 2:The next step is load the databases from MySQL, being able to
replace the FFF completely as an archive method (since all changes to
the MySQL db would be lost on the next Services save). All, while keeping
FFF intact. This is still not the final goal, but it's a milestone.
(COMPLETED)
UPDATE: Anope 1.7.0 (Revision 11 and above) finally supports phase 2!
A new config directive called 'UseRDB' has been added.
If you enable this, anope will automatically try to load its
data from MySQL (if configured and compiled with).
INSERT INTO `anope_commands` (nick, service, command) VALUES('Adam', 'NickServ', 'REGISTER qwerty Adam@anope.org');
PHASE 3:The next step, and most convoluted of all (since we'll need to
modify pretty much all the source) is to load/save (SELECT/INSERT) data
in realtime. That way the MySQL db could be modified externally (web?).
Again, the FFF will be kept intact.
By default, every 60 seconds Anope checks this table for commands to execute. When Anope sees a new command to execute, it checks the following.
2) Requirements
If the nick given is -SQLUser, then the command gets executed by a special fake user within Anope called -SQLUser. -SQLUser has every permission and command available, there are no permission checks at all for this user, it can do anything.
1. MySQL server version 3.23.32 or greater
2. MySQL libs and development files (usually called mysql-dev).
3. A MySQL user account
4. A MySQL database
If the nick is not -SQLUser, it checks to see if it is a registered nick. If it is, it sees if there are any users online using the NickCore of that nick.
If there is a user online with that core the command gets executed as if that user executed it, and the reply goes to that user.
If there isn't a user online with the core, it creates a fake user as the nick given to it, and gives to it the permissions the user would have if they were online and identified.
If the nick is not registered, it checks to see if there is a user currently on that nick. If there is, it executes the command as that user, and the reply goes to that user.
If the nick is not registered and no one is using the nick, it creates a fake user of the nick given to it, and gives it regular nonidentified user access.
3) Installation
Currently there is no way to check to see if a command was executed successfully within Anope from SQL (even if there was, the possibly update delay would be a problem).
1. The ./Config script automatically detects if your system is capable
of running Anope with MySQL support. There is no need anymore to
answer yes when asked.
IMPORTANT: When using db_mysql_write when you already have a database, you need to do an initial import of the data to SQL (as db_mysql_write only updates it when it is changed, it never actually mass-dumps all of your data into SQL). To do this, start Anope and execute /OperServ SQLSYNC.
Note: You might need to run "make distclean" prior to running ./Config
2. Compile Anope as usual. The (g)make process will now compile MySQL
support into Anope.
3. Install Anope as usual.
4) Configuration
1. Go to your "services bin directory" (eg: /home/someuser/services/) and run mydbgen
to help on the schema creation and adjustments.
2. Edit services.conf and add your MySQL data to the MySQL configuration
block.
3. Start or restart services to make use of the new Anope executable.
5) Security
To add a layer of security you have the option of encrypting or encoding
all passwords for nicks and chans. Use the "MysqlSecure" directive on your
services.conf file to enable it. The available storage methods are:
#MysqlSecure ""
or
MysqlSecure ""
Disables security. All passwords will be saved on the MySQL database
as clear text, with no encryption or encoding. FASTEST
MysqlSecure "des"
Encrypts all passwords using a UNIX DES encryption. This is a one way
encryption algorithm. You can only validate it against another DES
encrypted string, using the same "salt" (the first two characters of
the encrypted string). FAST
MysqlSecure "md5"
Calculates an MD5 128-bit checksum for the password. The value is
returned as a 32-digit hex number that may be used as a hash key.
This is a one way encryption algorithm. SLOW
MysqlSecure "sha"
Calculates an SHA 160-bit checksum for the password. The value is
returned as a 40-digit hex number. This is a one way encryption
algorithm. SLOWEST
MysqlSecure "mykey"
Encodes the passwords using "mykey" as the encryption password. It
produces a binary string and can be decoded using the MySQL built in
function DECODE(crypt_str,mykey). VARIABLE
Caveat: Keep in mind that this if you use any method other than clear
text, services will need to encrypt/encode every single password on
every database save. On large networks, it may impact responsiveness
during the saves.
Caveat: If you enable MysqlSecure you can not longer use the UseRDB directive
as all the password types are encrypted with a one way encryption method for
older MySQL servers.
+4 -136
View File
@@ -1,139 +1,7 @@
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
Highlighted News in Anope 1.9
=============================
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
* Added in live updating SQL and the ability to execute commands through SQL
* Re-designed configuration file
* Code refresh / rewrite into C++
-2509
View File
File diff suppressed because it is too large Load Diff
+5 -15
View File
@@ -1,7 +1,7 @@
Anope -- a set of IRC services for IRC networks
-----------------------------------------------
Anope is 2003-2008 Anope Team <team@anope.org>.
Anope is 2003-2010 Anope Team <team@anope.org>.
Based on Epona 2000-2002 PegSoft <epona@pegsoft.net>.
Based on Services 1996-1999 Andrew Church <achurch@achurch.org>.
@@ -73,6 +73,7 @@ Table of Contents
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>
@@ -87,6 +88,7 @@ Table of Contents
* 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>
@@ -186,24 +188,12 @@ Table of Contents
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
* InspIRCd 1.1, 1.2, or 2.0
* 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
* UnrealIRCd 3.2 or later
Anope could also work with some of the daemons derived by the ones listed
above, but there's no support for them if they work or don't work.
+80
View File
@@ -0,0 +1,80 @@
Legend:
x = done
? = unsure
+ = in progress
1.9.2
-----
[x] Redo database insanity.
[x] Move database load/save to a module
[x] realtime SQL/whatever module using events (possibly ongoing)
[x] flatfile save on a periodic timer
[x] SANE password encryption - prefix password with the method it was encrypted with, allowing for *seamless* upgrading to different methods
[x] Salted SHA256 (contact Special for this)
[x] New database format (text, not binary - works very well for merging and so on)
[x] generic database routines modules can use to create their own database
[?] IRCd capability support: don't rely on CAPAB, provide an interface to turn capabilities on specifically
[x] Socket subsystem needs some serious loving
[x] Multiple sockets
[x] Asynchronous, using select() (multiple engines? not really needed..)
[x] Callbacks, event style, see also inspircd
[x] generic way to check which modes a user has set (u->HasUmode(UMODE_OPER))
[x] 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?)
[x] Last used time on AKICK/access entries
[x] Channel passwords seem to be of limited use, think of a more appropriate way to handle this
[+] General options block, ability to turn LOGCHAN on from the config file..
[x] Docs directory cleanup
[x] Fix permanent channels support properly
[x] CS SET INHABIT to keep pseudoclient in a channel after it empties to maintain banlists and such
[x] Set forbidden channels +s
[x] SendAkill should just take a pointer to the Akill class instead of millions of fields (same for some other stuff)
[x] burn do_sjoin with fire
[x] Channel access additions
[x] Setter
[x] Last used
Future
------
[ ] Asynchronous DNS
[ ] CIDR Akills, session exceptions, etc
[ ] Hashing system for storing just about everything needs to die
[ ] Move a (lot) of stuff to class members as a defined interface rather than copypasta everywhere (ns_set, ns_saset!)
[?] Remote identification (1.9.1? will this break stuff?)
[ ] Language charset stuff, including collation (1.9.1? phoenix?)
[ ] Add support for +k, +q, etc type umodes
[ ] fantasy: allow replies/notifications to fantasy commands to go to the channel via notice
[?] a way for a module to queue itself (or even another module) for unloading
[ ] 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").
[?] Update help to reflect the fact /msg memoserv set notify mail - works just fine ;)
[ ] Useful/common "third party" modules to core distro
[ ] NS AJOIN
[+] Method to store listmodes (more generically than AKICK, too) for e.g. +beI and extbans, etc.
[ ] Channel access additions
[ ] Time added
[ ] Time modified
[ ] Expiry (useful?)
[ ] 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)
[ ] Merge NS INFO blah ALL with NS INFO blah, if you're requesting info, you really want the info anyway.
[?] 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
[x] AKILL/SGLINE/etc..
[x] Setter
[x] Time added
[+] Time modified (can they be modified?)
[ ] Time until expiry/expiry time (YES, time until expiry *instead of* expiry time, more human)
[x] 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)
[?] NS MARK, CS MARK. Allow multiple marks. Combine into OS MARK? (AKA os_info)
[?] 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)")
[?] OS INJECT
[?] Drop CS SET ENTRYMSG, replace with a 'news' type system? (limited to a configured number of items, default 3)
+309
View File
@@ -0,0 +1,309 @@
Troubleshooting Guide for Anope 1.9
------------------------------------------------
NOTE:
An updated version of this guide can be found on our wiki:
http://wiki.anope.org/index.php/Troubleshooting
Table of Contents
-----------------
1) General
1.1) Anope complains in the logfile about being unable to load the default
language.
1.2) Anope spricht kein Deutsch!, etc. (Anope doesn't speak my language!)
1.3) I selected a language other than English, but sometimes Anope sends
responses in English instead.
1.4) Anope always dies after about five minutes, saying "FATAL ERROR! Can't
back up nick.db".
1.5) Anope crashed with a segmentation fault.
1.6) I've found a bug that's not mentioned here or in the README or BUGS
files. What should I do?
1.7) My FreeBSD box complains about 'Shared object "nss_dns.so.1" not
found'
1.8) Anope and long (more then 30 character) nicknames.
2) Installation / Configuration
2.1) When I run "make", I get an error message like "missing separator",
"Unassociated shell command", "Unexpected end of line seen", etc.
2.2) I get an error like "Makefile.inc not found".
2.3) I typed "./services" at the command line, but nothing happened!
2.4) Whenever I start Anope, I get a message on my IRC server saying
"connection refused" or something similar, and Anope gives an error
message from the server saying "Closing Link: ...".
2.5) My IRC server is giving me messages like "Connection to
services.whatever.net[127.0.0.1] activated" and then "Access denied --
no N line". Why?
2.6) When I say "/connect services.*", it doesn't work!
2.7) Anope starts up okay, but if I try to register a nickname, it comes
back with "Sorry, registration failed."
2.8) Anope reports (via /stats u or /msg OperServ STATS) a different number
of users online than I get from doing /lusers.
3) BotServ
3.1) How do I add bots to BotServ?
3.2) Why do kick triggers and fantasy commands fail to work with my Bahamut
IRCd?
4) ChanServ
4.1) Anope's channel mode setting doesn't work. I can't set modes with
OperServ, and every time ChanServ tries to set a mode, my server
reverses the change.
4.2) Anope ignored the SET SUCCESSOR setting and deleted a channel when the
founder expired.
4.3) How to auto voice all those whom join my #channel?
4.4) Channel options like RESTRICTED or SECUREOPS don't work. What's wrong?
5) OperServ
5.1) Using the OperServ JUPE command results in server messages like
"Server juped.server introduced by non-hub server services.my.net".
5.2) When I add an AKILL, the users matching it don't get killed.
5.3) Trying to use OperServ gives me "Access denied".
5.4) I can't get /OS UMODES and /OS SVSNICK to work!
5.5) What is a Super-Admin? How does it work? Why might it not work?
-------------------------------------------------------------------------------
1) General
1.1) Anope complains in the logfile about being unable to load the default
language.
You forgot to run "make install".
1.2) Anope spricht kein Deutsch!, etc. (Anope doesn't speak my language!)
See section 5 of the README file.
1.3) I selected a language other than English, but sometimes Anope sends
responses in English instead.
Some language files are not complete--in other words, they only have a
translation of some of the message Anope uses. In this case, the
missing messages will be displayed in English. You can either wait for
the primary translator to provide us with a translation, or do the
translation yourself and send us the messages translated into your
language.
1.4) Anope always dies after about five minutes, saying "FATAL ERROR! Can't
back up nick.db".
Make sure that the user Anope runs as has write access to the data
directory, and that the data directory actually exists (the latter
shouldn't be a problem if you ran the Config script). This means Anope
needs write and execute permission on the data directory itself and execute
permission on every parent directory of the data directory.
1.5) Anope crashed with a segmentation fault.
See if you can reproduce this by doing a certain sequence of things. If
so, please report it to us (see part 6 of README file). If not, you're
probably out of luck; if you like, you can report it to us anyway, but
chances are it won't get fixed if we don't have instructions on reproducing
it. If you do have such a problem, you may find the crontab utility useful
for dealing with it.
Also, see the DumpCore directive in the configuration file. It allows Anope
to dump its core whenever it's segfaulting, usually calling it core and
placing it into Anope's main directory. Open up gdb by issuing the
following command at your shell:
* gdb services core
(of course replacing 'core' with the name of the core if different) and
type 'bt' at the gdb prompt. After that, send us the output you got and
keep the core file in a safe place, in case we need it to dig deeper into
the problem.
1.6) I've found a bug that's not mentioned here or in the README or BUGS files.
What should I do?
See section 6 of the README file.
1.7) My FreeBSD box complains about 'Shared object "nss_dns.so.1" not found'
We haven't figured out the exact cause yet, but as a quickfix you can
delete the /etc/nsswitch.conf file. Please keep in mind that removing a
configuration file can be dangerous, so only do this if you know what you
are doing.
1.8) Anope and long (more then 30 character) nicknames.
By default, Anope only supports nicknames up to 30 characters (NICKLEN=30).
If your IRCd allows for longer nicknames or has been modified to do so
Anope will start logging a lot of ("NICK from nonexistent nick") messages.
This is because once a user uses a nick that is too long for Anope to handle,
Anope loses track of the user for the remainder of the session.
It is POSSIBLE but not NOT RECOMMENDED to extend the maximum length of nicknames
Anope can track, however this will also break database compatibility. DBs saved
with Anope set to allow for example 40 chars cannot be read by a clean Anope
installation and vice versa. So changing the maximum nick length is only possible
when starting with fresh databases and even then the consequences of this are
UNTESTED.
In order to change the maximum internal nick length, change the NICKMAX setting
in include/config.h, recompile anope and start without databases.
2) Installation / Configuration
2.1) When I run "make", I get an error message like "missing separator",
"Unassociated shell command", "Unexpected end of line seen", etc.
Your make program isn't compatible with the Makefile for Anope. The
Makefile was designed to work with GNU make, and as such may not work on
other systems' "make" programs. If you get an error from "make", obtain
GNU make from ftp://prep.ai.mit.edu/pub/gnu/make/ (or wherever you prefer) and
use it instead of your system's default "make". Note that GNU make may
already be installed on your system; try using the command "gmake" instead
of "make".
The make programs bundled with SunOS/Solaris and FreeBSD have been reported
not to work; you will need to use GNU make on these systems.
2.2) I get an error like "Makefile.inc not found".
You forgot to run the Config script first. See the INSTALL file for
compilation instructions.
2.3) I typed "./services" at the command line, but nothing happened!
Anope puts itself in the background when it starts, so you get your shell
prompt right back. Meanwhile, Anope will continue setting up, then connect
to the IRC server specified in services.conf (or on the command line). If
it doesn't connect, you probably specified the wrong IRCd or RemoteServer in
the configuration file. Check to make sure that you are actually running one of
the supported IRCds, also. A list of supported IRCds can be found in the README
file.
You can also check the log file (services.log by default) for error
messages. Starting services with the -support command line option
will prevent it from running in the background will output the
messages written to the log file to the console as well. Please note that this
will also prevent 3rd party modules from loading and will put Anope into
debug mode.
2.4) Whenever I start Anope, I get a message on my IRC server saying
"connection refused" or something similar, and Anope gives an error
message from the server saying "Closing Link: ...".
See section 3 of the INSTALL file.
2.5) My IRC server is giving me messages like "Connection to
services.whatever.net[127.0.0.1] activated" and then "Access denied -- no
N line". Why?
This is typically caused by including a port number in the C:line for
services, which tells your server to try to autoconnect to it (depending on
the class (Y:line) settings). This is not what you want, because Anope
will connect to the server itself, but does not listen for servers to
connect to it. The solution is to remove the port number from the C:line.
2.6) When I say "/connect services.*", it doesn't work!
You cannot /connect services. When you start Anope, it will attempt to
connect to the server you specified in services.conf. Please see the answer
above for more information.
2.7) Anope starts up okay, but if I try to register a nickname, it comes back
with "Sorry, registration failed."
Make sure you've selected the correct IRC server type in the configure
script; see section 3 of the INSTALL file for details.
2.8) Anope reports (via /stats u or /msg OperServ STATS) a different number of
users online than I get from doing /lusers.
Anope doesn't count its own pseudo-clients (NickServ, ChanServ, etc.) in
its user count, while the IRC server does.
3) BotServ
3.1) How do I add bots to BotServ?
Read /msg BotServ HELP and /msg BotServ HELP BOT. Note that you need to be
opered up and identified as a Services Administrator in Anope before you
can use the BOT command.
3.2) Why do kick triggers and fantasy commands fail to work with my Bahamut
IRCd?
Bahamut allows you to setup a server as 'serviceshub'. This will filter
certain data that services usually don't need to process. This option also
filters channel messages, because DALnet's services have no use for them.
Anope parses the channel messages for kick triggers and fantasy commands.
To make sure these work the server type of the hub they're linked to should
be simply 'hub' and not 'serviceshub'.
4) ChanServ
4.1) Anope's channel mode setting doesn't work. I can't set modes with
OperServ, and every time ChanServ tries to set a mode, my server reverses
the change.
Make sure EVERY server on your network has a U: line for Services in
ircd.conf, for example:
U:services.whatever.net:*:*
4.2) Anope ignored the SET SUCCESSOR setting and deleted a channel when the
founder expired.
Normally, this is because the successor had too many channels registered.
In this case, you will see an entry in the log file like the following:
[date] Successor (SuccessorNick) of channel #somechannel owns too many
channels, deleting channel #somechannel
If you don't get a message like this or you can verify that the successor
wasn't running into the channel limit, please report it using the
bug-reporting procedure in section 6 of the README file.
4.3) How to auto voice all those whom join my #channel?
Execute the following commands (/cs is an alias for /msg ChanServ):
/cs set #channel secure off
/cs set #channel xop off
/cs levels #channel set AUTOVOICE -1
4.4) Channel options like RESTRICTED or SECUREOPS don't work. What's wrong?
Make sure that you didn't put any of your normal IRCd's as a ULined server
in Anope. Some access checks for clients from ULined servers are skipped to
avoid fights between the ULined servers. This is usually only useful when
you have a statistics server connected to your network.
5) OperServ
5.1) Using the OperServ JUPE command results in server messages like "Server
juped.server introduced by non-hub server services.my.net".
Services' uplink must have an H: line for Services in the ircd.conf file,
which looks something like:
H:*::services.whatever.net
5.2) When I add an AKILL, the users matching it don't get killed.
Use the AkillOnAdd configuration directive.
5.3) Trying to use OperServ gives me "Access denied".
Check that you're opered on your IRCd (ie, moded +o)
Check that you're identified to a nickname listed within an opertype allowed to do the command you're trying.
Check whether you can use /msg operserv staff
5.4) I can't get /OS UMODES and /OS SVSNICK to work!
You need to be a SuperAdmin to be able to use these commands.
5.5) What is a Super-Admin? How does it work? Why might it not work?
SuperAdmin's have extra privileges, including being founder on all
channels. It must be activated on a per user basis and is only available to
Services Roots. It is set using OperServ and is not persistent. It only
works if SuperAdmin is not commented in the services configuration file,
which is commented out by default. Read /msg OperServ HELP SET SUPERADMIN
for further help.
View File
+1 -1
View File
@@ -10,7 +10,7 @@ services.h: sysconf.h config.h extern.h
extern.h: slist.h
touch $@
pseudo.h: commands.h timeout.h encrypt.h datafiles.h slist.h
pseudo.h: commands.h timers.h slist.h
touch $@
clean:
+169 -37
View File
@@ -1,22 +1,87 @@
/* NickServ nickname structures. */
/** Flags set on NickAliases
*/
enum NickNameFlag
{
NS_BEGIN,
/* Nick may not be registered or used */
NS_FORBIDDEN,
/* Nick never expires */
NS_NO_EXPIRE,
/* This nick is being held after a kill by an enforcer client
* or is being SVSHeld. Used by ns_release to determin if something
* should be allowed to be released
*/
NS_HELD,
/* We are taking over this nick, either by SVSNICK or KILL.
* We are waiting for the confirmation of either of these actions to
* proceed. This is checked in NickAlias::OnCancel
*/
NS_COLLIDED,
NS_END
};
/** Flags set on NickCores
*/
enum NickCoreFlag
{
NI_BEGIN,
/* Kill others who take this nick */
NI_KILLPROTECT,
/* Dont recognize unless IDENTIFIED */
NI_SECURE,
/* Use PRIVMSG instead of NOTICE */
NI_MSG,
/* Don't allow user to change memo limit */
NI_MEMO_HARDMAX,
/* Notify of memos at signon and un-away */
NI_MEMO_SIGNON,
/* Notify of new memos when sent */
NI_MEMO_RECEIVE,
/* Don't show in LIST to non-servadmins */
NI_PRIVATE,
/* Don't show email in INFO */
NI_HIDE_EMAIL,
/* Don't show last seen address in INFO */
NI_HIDE_MASK,
/* Don't show last quit message in INFO */
NI_HIDE_QUIT,
/* Kill in 20 seconds instead of in 60 */
NI_KILL_QUICK,
/* Kill immediatly */
NI_KILL_IMMED,
/* User gets email on memo */
NI_MEMO_MAIL,
/* Don't show services access status */
NI_HIDE_STATUS,
/* Nickname is suspended */
NI_SUSPENDED,
/* Autoop nickname in channels */
NI_AUTOOP,
/* This nickcore is forbidden, which means the nickalias for it is aswell */
NI_FORBIDDEN,
NI_END
};
/** XXX: this really needs to die with fire and be merged with metadata into NickCore or something.
*/
class NickRequest
class CoreExport NickRequest
{
public:
NickRequest()
{
next = prev = NULL;
nick = passcode = email = NULL;
*password = 0;
requested = lastmail = 0;
}
NickRequest(const std::string &nickname);
~NickRequest();
NickRequest *next, *prev;
char *nick;
char *passcode;
char password[PASSMAX];
std::string passcode;
std::string password;
char *email;
time_t requested;
time_t lastmail; /* Unsaved */
@@ -24,18 +89,18 @@ class NickRequest
class NickCore;
class NickAlias
class CoreExport NickAlias : public Extensible, public Flags<NickNameFlag>
{
public:
NickAlias()
{
next = prev = NULL;
nick = last_quit = last_realname = last_usermask = NULL;
time_registered = last_seen = 0;
status = 0;
nc = NULL;
u = NULL;
}
/** Default constructor
* @param nickname The nick
* @param nickcore The nickcofe for this nick
*/
NickAlias(const std::string &nickname, NickCore *nickcore);
/** Default destructor
*/
~NickAlias();
NickAlias *next, *prev;
char *nick; /* Nickname */
@@ -44,43 +109,110 @@ class NickAlias
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 */
HostInfo hostinfo;
/* Not saved */
User *u; /* Current online user that has me */
/** Release a nick
* See the comment in users.cpp
*/
void Release();
/** This function is called when a user on this nick either disconnects or changes nick.
* Note that the user isnt necessarially identified to this nick
* See the comment in users.cpp
* @param u The user
*/
void OnCancel(User *u);
};
class NickCore : public Extensible
class CoreExport NickCore : public Extensible, public Flags<NickCoreFlag>
{
public:
NickCore()
{
next = prev = NULL;
display = email = greet = url = NULL;
pass[0] = '\0';
icq = flags = 0;
language = accesscount = channelcount = 0;
lastmail = 0;
}
/** Default constructor
* @param display The display nick
*/
NickCore(const std::string &nickdisplay);
/** Default destructor
*/
~NickCore();
NickCore *next, *prev;
std::list<User *> Users;
char *display; /* How the nick is displayed */
char pass[PASSMAX]; /* Password of the nicks */
std::string pass; /* 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 */
std::vector<std::string> access; /* Access list, vector of strings */
MemoInfo memos;
uint16 channelcount; /* Number of channels currently registered */
OperType *ot;
/* Unsaved data */
time_t lastmail; /* Last time this nick record got a mail */
SList aliases; /* List of aliases */
/** Check whether this opertype has access to run the given command string.
* @param cmdstr The string to check, e.g. botserv/set/private.
* @return True if this opertype may run the specified command, false otherwise.
*/
virtual bool HasCommand(const std::string &cmdstr) const;
/** Checks whether this account is a services oper or not.
* @return True if this account is a services oper, false otherwise.
*/
virtual bool IsServicesOper() const;
/** Check whether this opertype has access to the given special permission.
* @param privstr The priv to check for, e.g. users/auspex.
* @return True if this opertype has the specified priv, false otherwise.
*/
virtual bool HasPriv(const std::string &privstr) const;
/** Add an entry to the nick's access list
*
* @param entry The nick!ident@host entry to add to the access list
*
* Adds a new entry into the access list.
*/
void AddAccess(const std::string &entry);
/** Get an entry from the nick's access list by index
*
* @param entry Index in the access list vector to retrieve
* @return The access list entry of the given index if within bounds, an empty string if the vector is empty or the index is out of bounds
*
* Retrieves an entry from the access list corresponding to the given index.
*/
std::string GetAccess(unsigned entry);
/** Find an entry in the nick's access list
*
* @param entry The nick!ident@host entry to search for
* @return True if the entry is found in the access list, false otherwise
*
* Search for an entry within the access list.
*/
bool FindAccess(const std::string &entry);
/** Erase an entry from the nick's access list
*
* @param entry The nick!ident@host entry to remove
*
* Removes the specified access list entry from the access list.
*/
void EraseAccess(const std::string &entry);
/** Clears the entire nick's access list
*
* Deletes all the memory allocated in the access list vector and then clears the vector.
*/
void ClearAccess();
};
+31 -15
View File
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2008-2009 Robin Burchell <w00t@inspircd.org>
* Copyright (C) 2008-2009 Anope Team <team@anope.org>
* Copyright (C) 2008-2010 Robin Burchell <w00t@inspircd.org>
* Copyright (C) 2008-2010 Anope Team <team@anope.org>
*
* Please read COPYING and README for further details.
*
@@ -9,38 +9,55 @@
*
*/
/** Flags settable on a bot
*/
enum BotFlag
{
BI_BEGIN,
/* This bot can only be assigned by IRCops */
BI_PRIVATE,
/* The following flags are used to determin what bot really is what.
* Since you *could* have ChanServ really named BotServ or something stupid,
* this keeps track of them and allows them to be renamed in the config
* at any time, even if they already exist in the database
*/
BI_CHANSERV,
BI_BOTSERV,
BI_HOSTSERV,
BI_OPERSERV,
BI_MEMOSERV,
BI_NICKSERV,
BI_GLOBAL,
BI_END
};
struct CommandHash;
class CoreExport BotInfo
class CoreExport BotInfo : public Extensible, public Flags<BotFlag>
{
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 */
std::string nick; /* Nickname of the bot */
std::string user; /* Its user name */
std::string host; /* Its hostname */
std::string real; /* Its real name */
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);
BotInfo(const std::string &nick, const std::string &user = "", const std::string &host = "", const std::string &real = "");
/** Destroy a bot, clearing up appropriately.
*/
@@ -68,4 +85,3 @@ class CoreExport BotInfo
*/
void UnAssign(User *u, ChannelInfo *ci);
};
+264
View File
@@ -0,0 +1,264 @@
/* Channel support
*
* (C) 2008-2010 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* $Id$
*
*/
struct UserData
{
UserData()
{
lastline = NULL;
last_use = last_start = time(NULL);
lines = times = 0;
}
virtual ~UserData() { delete [] lastline; }
/* Data validity */
time_t last_use;
/* for flood kicker */
int16 lines;
time_t last_start;
/* for repeat kicker */
char *lastline;
int16 times;
};
struct UserContainer
{
User *user;
UserData ud;
Flags<ChannelModeName> *Status;
UserContainer(User *u) : user(u) { }
virtual ~UserContainer() { }
};
typedef std::list<UserContainer *> CUserList;
enum ChannelFlags
{
/* Channel still exists when emptied */
CH_PERSIST,
/* If set the channel is syncing users (channel was just created) and it should not be deleted */
CH_SYNCING
};
class CoreExport Channel : public Extensible, public Flags<ChannelFlags>
{
private:
/** A map of channel modes with their parameters set on this channel
*/
std::map<ChannelModeName, std::string> Params;
/* Modes set on the channel */
std::bitset<128> modes;
public:
/** Default constructor
* @param name The channel name
* @param ts The time the channel was created
*/
Channel(const std::string &name, time_t ts = time(NULL));
/** Default destructor
*/
~Channel();
Channel *next, *prev;
std::string name; /* Channel name */
ChannelInfo *ci; /* Corresponding ChannelInfo */
time_t creation_time; /* When channel was created */
char *topic;
std::string topic_setter;
time_t topic_time; /* When topic was set */
EList *bans;
EList *excepts;
EList *invites;
/* List of users in the channel */
CUserList users;
BanData *bd;
time_t server_modetime; /* Time of last server MODE */
time_t chanserv_modetime; /* Time of last check_modes() */
int16 server_modecount; /* Number of server MODEs this second */
int16 chanserv_modecount; /* Number of check_mode()'s this sec */
int16 bouncy_modes; /* Did we fail to set modes here? */
int16 topic_sync; /* Is the topic in sync? */
/** Restore the channel topic, set mlock (key), set stickied bans, etc
*/
void Sync();
/** Join a user internally to the channel
* @param u The user
*/
void JoinUser(User *u);
/** Remove a user internally from the channel
* @param u The user
*/
void DeleteUser(User *u);
/** Check if the user is on the channel
* @param u The user
* @return A user container if found, else NULL
*/
UserContainer *FindUser(User *u);
/** Check if a user has a status on a channel
* @param u The user
* @param cms The status mode, or NULL to represent no status
* @return true or false
*/
bool HasUserStatus(User *u, ChannelModeStatus *cms);
/** Check if a user has a status on a channel
* Use the overloaded function for ChannelModeStatus* to check for no status
* @param u The user
* @param Name The Mode name, eg CMODE_OP, CMODE_VOICE
* @return true or false
*/
bool HasUserStatus(User *u, ChannelModeName Name);
/** See if the channel has any modes at all
* @return true or false
*/
inline const bool HasModes() const { return modes.count(); }
/** See if a channel has a mode
* @param Name The mode name
* @return true or false
*/
bool HasMode(ChannelModeName Name);
/** Set a mode internally on a channel, this is not sent out to the IRCd
* @param cm The mode
* @param param The param
* @param EnforceMLock true if mlocks should be enforced, false to override mlock
*/
void SetModeInternal(ChannelMode *cm, const std::string &param = "", bool EnforceMLock = true);
/** Remove a mode internally on a channel, this is not sent out to the IRCd
* @param cm The mode
* @param param The param
* @param EnforceMLock true if mlocks should be enforced, false to override mlock
*/
void RemoveModeInternal(ChannelMode *cm, const std::string &param = "", bool EnforceMLock = true);
/** Set a mode on a channel
* @param bi The client setting the modes
* @param cm The mode
* @param param Optional param arg for the mode
* @param EnforceMLock true if mlocks should be enforced, false to override mlock
*/
void SetMode(BotInfo *bi, ChannelMode *cm, const std::string &param = "", bool EnforceMLock = true);
/**
* Set a mode on a channel
* @param bi The client setting the modes
* @param Name The mode name
* @param param Optional param arg for the mode
* @param EnforceMLock true if mlocks should be enforced, false to override mlock
*/
void SetMode(BotInfo *bi, ChannelModeName Name, const std::string &param = "", bool EnforceMLock = true);
/**
* Set a mode on a channel
* @param bi The client setting the modes
* @param Mode The mode
* @param param Optional param arg for the mode
* @param EnforceMLock true if mlocks should be enforced, false to override mlock
*/
void SetMode(BotInfo *bi, char Mode, const std::string &param = "", bool EnforceMLock = true);
/** Remove a mode from a channel
* @param bi The client setting the modes
* @param cm The mode
* @param param Optional param arg for the mode
* @param EnforceMLock true if mlocks should be enforced, false to override mlock
*/
void RemoveMode(BotInfo *bi, ChannelMode *cm, const std::string &param = "", bool EnforceMLock = true);
/**
* Remove a mode from a channel
* @param bi The client setting the modes
* @param Name The mode name
* @param param Optional param arg for the mode
* @param EnforceMLock true if mlocks should be enforced, false to override mlock
*/
void RemoveMode(BotInfo *bi, ChannelModeName Name, const std::string &param = "", bool EnforceMLock = true);
/**
* Remove a mode from a channel
* @param bi The client setting the modes
* @param Mode The mode
* @param param Optional param arg for the mode
* @param EnforceMLock true if mlocks should be enforced, false to override mlock
*/
void RemoveMode(BotInfo *bi, char Mode, const std::string &param = "", bool EnforceMLock = true);
/** Clear all the modes from the channel
* @param bi The client unsetting the modes
*/
void ClearModes(BotInfo *bi = NULL);
/** Clear all the bans from the channel
* @param bi The client unsetting the modes
*/
void ClearBans(BotInfo *bi = NULL);
/** Clear all the excepts from the channel
* @param bi The client unsetting the modes
*/
void ClearExcepts(BotInfo *bi = NULL);
/** Clear all the invites from the channel
* @param bi The client unsetting the modes
*/
void ClearInvites(BotInfo *bi = NULL);
/** Get a param from the channel
* @param Name The mode
* @param Target a string to put the param into
* @return true on success
*/
const bool GetParam(ChannelModeName Name, std::string &Target);
/** Check if a mode is set and has a param
* @param Name The mode
*/
const bool HasParam(ChannelModeName Name);
/** Set a string of modes on the channel
* @param bi The client setting the modes
* @param EnforceMLock Should mlock be enforced on this mode change
* @param cmodes The modes to set
*/
void SetModes(BotInfo *bi, bool EnforceMLock, const char *cmodes, ...);
/** Kick a user from a channel internally
* @param source The sender of the kick
* @param nick The nick being kicked
* @param reason The reason for the kick
*/
void KickInternal(const std::string &source, const std::string &nick, const std::string &reason);
/** Kick a user from the channel
* @param bi The sender, can be NULL for the service bot for this channel
* @param u The user being kicked
* @param reason The reason for the kick
* @return true if the kick was scucessful, false if a module blocked the kick
*/
bool Kick(BotInfo *bi, User *u, const char *reason = NULL, ...);
};
+7 -7
View File
@@ -1,14 +1,14 @@
/* Declarations for command data.
*
* (C) 2003-2009 Anope Team
* (C) 2003-2010 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.
*
* $Id$
* Based on the original code of Services by Andy Church.
*
* $Id$
*
*/
@@ -21,8 +21,8 @@
*/
extern MDE Command *lookup_cmd(Command *list, char *name);
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);
extern MDE void mod_help_cmd(char *service, User *u, CommandHash *cmdTable[], const char *cmd);
extern MDE void mod_run_cmd(const std::string &service, User *u, CommandHash *cmdTable[], const char *cmd);
//extern MDE void do_help_limited(char *service, User * u, Command * c);
/*************************************************************************/
+3 -35
View File
@@ -1,6 +1,6 @@
/* Services configuration.
*
* (C) 2003-2009 Anope Team
* (C) 2003-2010 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for furhter details.
@@ -22,20 +22,9 @@
/******* General configuration *******/
/* Name of configuration file (in Services directory) */
#define SERVICES_CONF "services.conf"
/* Name of log file (in Services directory) */
#define LOG_FILENAME "services.log"
/* Maximum amount of data from/to the network to buffer (bytes). */
#define NET_BUFSIZE 65536
/******* OperServ configuration *******/
/* Define this to enable OperServ's svs commands (superadmin only). */
#define USE_OSSVS
/******************* END OF USER-CONFIGURABLE SECTION ********************/
/* Size of input buffer (note: this is different from BUFSIZ)
@@ -43,29 +32,8 @@
* things will happen. */
#define BUFSIZE 1024
/* Extra warning: If you change CHANMAX, your ChanServ database will be
* unusable.
*/
/* Maximum length of a channel name, including the trailing null. Any
* channels with a length longer than (CHANMAX-1) including the leading #
* will not be usable with ChanServ. */
#define CHANMAX 64
/* Maximum length of a nickname, including the trailing null. This MUST be
* at least one greater than the maximum allowable nickname length on your
* network, or people will run into problems using Services! The default
* (32) works with all servers I know of. */
#define NICKMAX 32
/* Maximum length of a password */
#define PASSMAX 32
/* Maximum length of a username */
#define USERMAX 10
/* Maximum length of a domain */
#define HOSTMAX 64
/* Maximum amount of data from/to the network to buffer (bytes). */
#define NET_BUFSIZE 65536
/**************************************************************************/
+388 -3
View File
@@ -61,6 +61,8 @@ class ValueItem
ValueItem(const char *);
/** Initialize with an std::string */
ValueItem(const std::string &);
/** Initialize with a long */
ValueItem(long);
/** Change value to a char pointer */
//void Set(char *);
/** Change value to a const char pointer */
@@ -72,7 +74,9 @@ class ValueItem
/** Get value as an int */
int GetInteger();
/** Get value as a string */
char *GetString();
const char *GetString() const;
/** Get value as a string */
inline const std::string &GetValue() const { return v; }
/** Get value as a bool */
bool GetBool();
};
@@ -370,6 +374,387 @@ class ServerConfig
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 &);
/** Below here is a list of variables which contain the config files values
*/
/* IRCd module in use */
char *IRCDModule;
/* Host to connect to **/
char *LocalHost;
/* List of uplink servers to try and connect to */
std::list<Uplink *> Uplinks;
/* Our server name */
char *ServerName;
/* Our servers description */
char *ServerDesc;
/* The username/ident of services clients */
char *ServiceUser;
/* The hostname if services clients */
char *ServiceHost;
/* Help channel, ops here get usermode +h **/
char *HelpChannel;
/* Log channel */
char *LogChannel;
/* Name of the network were on */
char *NetworkName;
/* The max legnth of nicks */
unsigned NickLen;
/* Max length of idents */
unsigned UserLen;
/* Max lenght of hostnames */
unsigned HostLen;
/* Max length of passwords */
unsigned PassLen;
/* NickServ Name */
char *s_NickServ;
/* ChanServ Name */
char *s_ChanServ;
/* MemoServ Name */
char *s_MemoServ;
/* BotServ Name */
char *s_BotServ;
/* OperServ name */
char *s_OperServ;
/* Global name */
char *s_GlobalNoticer;
/* NickServs realname */
char *desc_NickServ;
/* ChanServ realname */
char *desc_ChanServ;
/* MemoServ relname */
char *desc_MemoServ;
/* BotServ realname */
char *desc_BotServ;
/* OperServ realname */
char *desc_OperServ;
/* Global realname */
char *desc_GlobalNoticer;
/* HostServ Name */
char *s_HostServ;
/* HostServ realname */
char *desc_HostServ;
/* Filename for the PID file */
char *PIDFilename;
/* MOTD filename */
char *MOTDFilename;
/* True if its ok to not be able to save backs */
bool NoBackupOkay;
/* Do password checking when new people register */
bool StrictPasswords;
/* How many times you're allowed to give a bad password before being killed */
unsigned BadPassLimit;
/* How long before bad passwords are forgotten */
time_t BadPassTimeout;
/* Delay between automatic database updates */
time_t UpdateTimeout;
/* Delay between checks for expired nicks and channels */
time_t ExpireTimeout;
/* How long to wait for something from the uplink, this is passed to select() */
time_t ReadTimeout;
/* How often to send program errors */
time_t WarningTimeout;
/* How long to process things such as timers to see if there is anything to calll */
time_t TimeoutCheck;
/* Num of days logfiles are kept */
int KeepLogs;
/* Number of days backups are kept */
int KeepBackups;
/* Forbidding requires a reason */
bool ForceForbidReason;
/* Services should use privmsgs instead of notices */
bool UsePrivmsg;
/* Services only respond to full PRIVMSG client@services.server.name messages */
bool UseStrictPrivMsg;
/* Dump a core file if we crash */
bool DumpCore;
/* Log users connecting/existing/changing nicks */
bool LogUsers;
/* Number of seconds between consecutive uses of the REGISTER command
* Not to be confused with NSRegDelay */
unsigned NickRegDelay;
/* Max number if news items allowed in the list */
unsigned NewsCount;
/* Default mlock modes */
std::string MLock;
/* Default botmodes on channels, defaults to ao */
std::string BotModes;
/* How many times to try and reconnect to the uplink before giving up */
unsigned MaxRetries;
/* How long to wait between connection attempts */
int RetryWait;
/* Services can use email */
bool UseMail;
/* Path to the sendmail executable */
char *SendMailPath;
/* Address to send from */
char *SendFrom;
/* Only opers can have services send mail */
bool RestrictMail;
/* Delay between sending mail */
time_t MailDelay;
/* Don't quote the To: address */
bool DontQuoteAddresses;
/* Prefix of guest nicks when a user gets forced off of a nick */
char *NSGuestNickPrefix;
/* Allow users to set kill immed on */
bool NSAllowKillImmed;
/* Don't allow nicks to use /ns group to regroup nicks */
bool NSNoGroupChange;
/* Default flags for newly registered nicks */
Flags<NickCoreFlag> NSDefFlags;
/* Default language used by services */
unsigned NSDefLanguage;
/* Users must be connected this long before they can register
* Not to be confused with NickRegDelay */
time_t NSRegDelay;
/* Time before the registering mail will be resent */
time_t NSResendDelay;
/* How long before nicks expir */
time_t NSExpire;
/* Time before NickRequests expire */
time_t NSRExpire;
/* Force email when registering */
bool NSForceEmail;
/* Max number of nicks in a group */
int NSMaxAliases;
/* Max number of allowed strings on the access list */
unsigned NSAccessMax;
/* Enforcer client user name */
char *NSEnforcerUser;
/* Enforcer client hostname */
char *NSEnforcerHost;
/* How long before recovered nicks are released */
time_t NSReleaseTimeout;
/* /nickserv list is oper only */
bool NSListOpersOnly;
/* Max number of entries that can be returned from the list command */
unsigned NSListMax;
/* Only allow usermode +a etc on real services admins */
bool NSSecureAdmins;
/* Services opers must be /operd on the ircd aswell */
bool NSStrictPrivileges;
/* Use email to verify new users registering */
bool NSEmailReg;
/* Set the proper channel modes on users when they identify */
bool NSModeOnID;
/* Add the users hostnask their access list when they register */
bool NSAddAccessOnReg;
/* Default flags for newly registered channels */
Flags<ChannelInfoFlag> CSDefFlags;
/* Max number of channels a user can own */
unsigned CSMaxReg;
/* Time before a channel expires */
time_t CSExpire;
/* Default ban type to use for channels */
int CSDefBantype;
/* Max number of entries allowed on channel access lists */
unsigned CSAccessMax;
/* Max number of entries allowed on autokick lists */
unsigned CSAutokickMax;
/* Default autokick reason */
char *CSAutokickReason;
/* Time ChanServ should stay in the channel to hold it to keep users from getting in */
time_t CSInhabit;
/* ChanServ's LIST command is oper only */
bool CSListOpersOnly;
/* Max number of entries allowed to be returned from the LIST command */
unsigned CSListMax;
/* true to make ChanServ oper only */
bool CSOpersOnly;
/* Max number of memos allowed */
unsigned MSMaxMemos;
/* Time you must wait between sending memos */
time_t MSSendDelay;
/* Notify all of the aliases of the core the memo was sent to */
bool MSNotifyAll;
/* Who can use memos reciepts */
unsigned MSMemoReceipt;
/* Defai;t BotServ flags */
Flags<BotServFlag> BSDefFlags;
/* How long before botserv forgets a user. This is used for flood kickers etc */
time_t BSKeepData;
/* Min number of users to have in the channel before the service bot joins */
unsigned BSMinUsers;
/* Max number of words allowed on the badwordslist */
unsigned BSBadWordsMax;
/* BotServ bot only joins if it would normally allowed to, abides by bans etc */
bool BSSmartJoin;
/* Dont tell users what badword they used */
bool BSGentleBWReason;
/* Case sensitive badwords matching */
bool BSCaseSensitive;
/* Char to use for the fantasy char, eg ! */
char *BSFantasyCharacter;
/* Only show /stats o to opers */
bool HideStatsO;
/* Send out a global when services shut down or restart */
bool GlobalOnCycle;
/* Don't include the opers name in globals */
bool AnonymousGlobal;
/* Dont allow users to register nicks with oper names in them */
bool RestrictOperNicks;
/* Message to send when shutting down */
char *GlobalOnCycleMessage;
/* Message to send when starting up */
char *GlobalOnCycleUP;
/* Super admin is allowed */
bool SuperAdmin;
/* Log things said through ACT/SAY */
bool LogBot;
/* Log when new user max is reached */
bool LogMaxUsers;
/* Default expiry time for akills */
time_t AutokillExpiry;
/* Default expiry time for chan kills */
time_t ChankillExpiry;
/* Default expiry time for SGLine Expire */
time_t SGLineExpiry;
/* Default expiry time for SQLines */
time_t SQLineExpiry;
/* Default expiry time for SZLine */
time_t SZLineExpiry;
/* Actually akill the user when the akill is added */
bool AkillOnAdd;
/* Kill users on SGline */
bool KillonSGline;
/* Kill users on SQline */
bool KillonSQline;
/* Send a WALLOPS/GLOBOPS when a user opers */
bool WallOper;
/* Send a WALLOPS/GLOBOPS when a nonoper tries to use OperServ */
bool WallBadOS;
/* Send a WALLOPS/GLOBOPS when someone uses the GLOBAL command */
bool WallOSGlobal;
/* Send a WALLOPS/GLOBOPS when someone uses the MODE command */
bool WallOSMode;
/* Send a WALLOPS/GLOBOPS when someone uses the CLEARMODES command */
bool WallOSClearmodes;
/* Send a WALLOPS/GLOBOPS when someone uses the KICK command */
bool WallOSKick;
/* Send a WALLOPS/GLOBOPS when someone uses the AKILL command */
bool WallOSAkill;
/* Send a WALLOPS/GLOBOPS when someone uses the SGLINE command */
bool WallOSSGLine;
/* Send a WALLOPS/GLOBOPS when someone uses the SQLINE command */
bool WallOSSQLine;
/* Send a WALLOPS/GLOBOPS when someone uses the SZLINE command */
bool WallOSSZLine;
/* Send a WALLOPS/GLOBOPS when someone uses the NOOP command */
bool WallOSNoOp;
/* Send a WALLOPS/GLOBOPS when when someone uses the JUPE command */
bool WallOSJupe;
/* Send a WALLOPS/GLOBOPS when an akill expires */
bool WallAkillExpire;
/* Send a WALLOPS/GLOBOPS when SGLines expire */
bool WallSGLineExpire;
/* Send a WALLOPS/GLOBOPS when SQLines expire */
bool WallSQLineExpire;
/* Send a WALLOPS/GLOBOPS when SZLines expire */
bool WallSZLineExpire;
/* Send a WALLOPS/GLOBOPS when exceptions expire */
bool WallExceptionExpire;
/* Send a WALLOPS/GLOBOPS when DROP is used */
bool WallDrop;
/* Send a WALLOPS/GLOBOPS when FORBID is used */
bool WallForbid;
/* Send a WALLOPS/GLOBOPS when GETPASS is used */
bool WallGetpass;
/* Send a WALLOPS/GLOBOPS when SETPASS is used */
bool WallSetpass;
/* Add the akillers nick to the akill reason */
bool AddAkiller;
/* Limit sessions */
bool LimitSessions;
/* The default session limit */
unsigned DefSessionLimit;
/* How long before exceptions expire */
time_t ExceptionExpiry;
/* How many times to kill before adding an KILL */
int MaxSessionKill;
/* Max limit that can be used for exceptions */
unsigned MaxSessionLimit;
/* How long session akills should last */
time_t SessionAutoKillExpiry;
/* Reason to use for session kills */
char *SessionLimitExceeded;
/* Optional second reason */
char *SessionLimitDetailsLoc;
/* OperServ requires you to be an operator */
bool OSOpersOnly;
/* List of modules to autoload */
std::list<std::string> ModulesAutoLoad;
/* Encryption modules */
std::list<std::string> EncModuleList;
/* Database modules */
std::list<std::string> DBModuleList;
/* HostServ Core Modules */
std::list<std::string> HostServCoreModules;
/* MemoServ Core Modules */
std::list<std::string> MemoServCoreModules;
/* BotServ Core Modules */
std::list<std::string> BotServCoreModules;
/* OperServ Core Modules */
std::list<std::string> OperServCoreModules;
/* NickServ Core Modules */
std::list<std::string> NickServCoreModules;
/* ChanServ Core Modules */
std::list<std::string> ChanServCoreModules;
/* Default defcon level */
int DefConLevel;
/* Timeout before defcon is reset */
time_t DefConTimeOut;
/* Session limiit to use when using defcon */
int DefConSessionLimit;
/* How long to add akills for defcon */
time_t DefConAKILL;
/* Chan modes for defcon */
char *DefConChanModes;
/* Should we global on defcon */
bool GlobalOnDefcon;
/* Should we send DefconMessage aswell? */
bool GlobalOnDefconMore;
/* Message to send when defcon is off */
char *DefConOffMessage;
/* Message to send when defcon is on*/
char *DefconMessage;
/* Reason to akill clients for defcon */
char *DefConAkillReason;
/* User keys to use for generating random hashes for pass codes etc */
long unsigned int UserKey1;
long unsigned int UserKey2;
long unsigned int UserKey3;
/* Numeric */
char *Numeric;
/* Array of ulined servers */
char **Ulines;
/* Number of ulines */
int NumUlines;
/* List of available opertypes */
std::list<OperType *> MyOperTypes;
/* List of pairs of opers and their opertype from the config */
std::list<std::pair<std::string, std::string> > Opers;
};
/** This class can be used on its own to represent an exception, or derived to represent a module-specific exception.
@@ -391,7 +776,7 @@ class ConfigException : public CoreException
* Actually no, it does nothing. Never mind.
* @throws Nothing!
*/
virtual ~ConfigException() throw() { };
virtual ~ConfigException() throw() { }
};
#define CONF_NO_ERROR 0x000000
@@ -435,7 +820,7 @@ class CoreExport ConfigReader
/** Overloaded constructor.
* This constructor initialises the ConfigReader class to read a user-specified config file
*/
ConfigReader(const std::string &);
ConfigReader(const std::string &);
/** Default destructor.
* This method destroys the ConfigReader class.
*/
-71
View File
@@ -1,71 +0,0 @@
/* Database file descriptor structure and file handling routine prototypes.
*
* (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.
*
* $Id$
*
*/
#ifndef DATAFILES_H
#define DATAFILES_H
#ifndef _WIN32
#include <sys/param.h>
#endif
/*************************************************************************/
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 */
};
/*************************************************************************/
/* Prototypes and macros: */
E void check_file_version(dbFILE *f);
E int get_file_version(dbFILE *f);
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();
#define read_db(f,buf,len) (fread((buf),1,(len),(f)->fp))
#define write_db(f,buf,len) (fwrite((buf),1,(len),(f)->fp))
#define getc_db(f) (fgetc((f)->fp))
E int read_int16(uint16 *ret, dbFILE *f);
E int write_int16(uint16 val, dbFILE *f);
E int read_int32(uint32 *ret, dbFILE *f);
E int write_int32(uint32 val, dbFILE *f);
E int read_ptr(void **ret, dbFILE *f);
E int write_ptr(const void *ptr, dbFILE *f);
E int read_string(char **ret, dbFILE *f);
E int write_string(const char *s, dbFILE *f);
#define read_int8(ret,f) ((*(ret)=fgetc((f)->fp))==EOF ? -1 : 0)
#define write_int8(val,f) (fputc((val),(f)->fp)==EOF ? -1 : 0)
#define read_buffer(buf,f) (read_db((f),(buf),sizeof(buf)) == sizeof(buf))
#define write_buffer(buf,f) (write_db((f),(buf),sizeof(buf)) == sizeof(buf))
#define read_buflen(buf,len,f) (read_db((f),(buf),(len)) == (len))
#define write_buflen(buf,len,f) (write_db((f),(buf),(len)) == (len))
#define read_variable(var,f) (read_db((f),&(var),sizeof(var)) == sizeof(var))
#define write_variable(var,f) (write_db((f),&(var),sizeof(var)) == sizeof(var))
/*************************************************************************/
#endif /* DATAFILES_H */
+1 -1
View File
@@ -1,6 +1,6 @@
/* Set default values for any constants that should be in include files but
*
* (C) 2003-2009 Anope Team
* (C) 2003-2010 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for furhter details.
-22
View File
@@ -1,22 +0,0 @@
/* Include file for high-level encryption routines.
*
* (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.
*
* $Id$
*
*/
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);
} Encryption;
-64
View File
@@ -1,64 +0,0 @@
/* Prototypes and external variable declarations.
*
* (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.
*
* $Id$
*
*/
#define EVENT_START "start"
#define EVENT_STOP "stop"
#define EVENT_DB_SAVING "db_saving"
#define EVENT_DB_BACKUP "db_backup"
#define EVENT_NEWNICK "newnick"
#define EVENT_BOT_UNASSIGN "bot_unassign"
#define EVENT_BOT_JOIN "bot_join"
#define EVENT_BOT_CREATE "bot_create"
#define EVENT_BOT_CHANGE "bot_change"
#define EVENT_BOT_FANTASY "bot_command"
#define EVENT_BOT_FANTASY_NO_ACCESS "bot_command_no_access"
#define EVENT_BOT_DEL "bot_del"
#define EVENT_BOT_ASSIGN "bot_assign"
#define EVENT_BOT_KICK "bot_kick"
#define EVENT_BOT_BAN "bot_ban"
#define EVENT_TOPIC_UPDATED "chan_topic_updated"
#define EVENT_CHAN_EXPIRE "chan_expire"
#define EVENT_CHAN_REGISTERED "chan_registered"
#define EVENT_CHAN_DROP "chan_dropped"
#define EVENT_CHAN_FORBIDDEN "chan_forbidden"
#define EVENT_CHAN_SUSPENDED "chan_suspended"
#define EVENT_CHAN_UNSUSPEND "chan_unsuspend"
#define EVENT_CONNECT "connect"
#define EVENT_DB_EXPIRE "db_expire"
#define EVENT_RESTART "restart"
#define EVENT_RELOAD "reload"
#define EVENT_SHUTDOWN "shutdown"
#define EVENT_SIGNAL "signal"
#define EVENT_NICK_REGISTERED "nick_registered"
#define EVENT_NICK_DROPPED "nick_dropped"
#define EVENT_NICK_FORBIDDEN "nick_forbidden"
#define EVENT_NICK_EXPIRE "nick_expire"
#define EVENT_CHANGE_NICK "change_nick"
#define EVENT_USER_LOGOFF "user_logoff"
#define EVENT_GROUP "nick_group"
#define EVENT_NICK_IDENTIFY "nick_id"
#define EVENT_SERVER_SQUIT "server_squit"
#define EVENT_SERVER_CONNECT "server_connect"
#define EVENT_DEFCON_LEVEL "defcon_level"
#define EVENT_NICK_SUSPENDED "nick_suspended"
#define EVENT_NICK_UNSUSPEND "nick_unsuspend"
#define EVENT_JOIN_CHANNEL "join_channel"
#define EVENT_PART_CHANNEL "part_channel"
#define EVENT_ACCESS_ADD "access_add"
#define EVENT_ACCESS_CHANGE "access_change"
#define EVENT_ACCESS_DEL "access_del"
#define EVENT_ACCESS_CLEAR "access_clear"
#define EVENT_NICK_LOGOUT "nick_logout"
#define EVENT_CHAN_KICK "chan_kick"
+232
View File
@@ -0,0 +1,232 @@
/*
*
* Copyright (C) 2008-2010 Anope Team <team@anope.org>
*
* Please read COPYING and README for further details.
*
*
* $Id$
*
*/
/** Dummy base class we use to cast everything to/from
*/
class ExtensibleItemBase
{
public:
ExtensibleItemBase() { }
virtual ~ExtensibleItemBase() { }
};
/** Class used to represent an extensible item that doesn't hold a pointer
*/
template<typename T> class ExtensibleItemRegular : public ExtensibleItemBase
{
protected:
T Item;
public:
ExtensibleItemRegular(T item) : Item(item) { }
virtual ~ExtensibleItemRegular() { }
T GetItem() const { return Item; }
};
/** Class used to represent an extensible item that holds a pointer
*/
template<typename T> class ExtensibleItemPointer : public ExtensibleItemBase
{
protected:
T *Item;
public:
ExtensibleItemPointer(T *item) : Item(item) { }
virtual ~ExtensibleItemPointer() { delete Item; }
T *GetItem() const { return Item; }
};
/** Class used to represent an extensible item that holds a pointer to an arrray
*/
template<typename T> class ExtensibleItemPointerArray : public ExtensibleItemBase
{
protected:
T *Item;
public:
ExtensibleItemPointerArray(T *item) : Item(item) { }
virtual ~ExtensibleItemPointerArray() { delete [] Item; }
T *GetItem() const { return Item; }
};
class CoreExport Extensible
{
private:
std::map<std::string, ExtensibleItemBase *> Extension_Items;
public:
/** Default constructor, does nothing
*/
Extensible() { }
/** Default destructor, deletes all of the extensible items in this object
* then clears the map
*/
virtual ~Extensible()
{
for (std::map<std::string, ExtensibleItemBase *>::iterator it = Extension_Items.begin(); it != Extension_Items.end(); ++it)
{
delete it->second;
}
Extension_Items.clear();
}
/** Extend an Extensible class.
*
* @param key The key parameter is an arbitary string which identifies the extension data
* @param p This parameter is a pointer to an ExtensibleItem or ExtensibleItemBase derived class
*
* You must provide a key to store the data as via the parameter 'key'.
* The data will be inserted into the map. If the data already exists, you may not insert it
* twice, Extensible::Extend will return false in this case.
*
* @return Returns true on success, false if otherwise
*/
bool Extend(const std::string &key, ExtensibleItemBase *p)
{
bool Ret = this->Extension_Items.insert(std::make_pair(key, p)).second;
if (!Ret)
delete p;
return Ret;
}
/** Extend an Extensible class.
*
* @param key The key parameter is an arbitary string which identifies the extension data
*
* You must provide a key to store the data as via the parameter 'key', this single-parameter
* version takes no 'data' parameter, this is used purely for boolean values.
* The key will be inserted into the map with a NULL 'data' pointer. If the key already exists
* then you may not insert it twice, Extensible::Extend will return false in this case.
*
* @return Returns true on success, false if otherwise
*/
bool Extend(const std::string &key)
{
/* This will only add an item if it doesnt already exist,
* the return value is a std::pair of an iterator to the
* element, and a bool saying if it was actually inserted.
*/
return this->Extend(key, new ExtensibleItemRegular<char *>(NULL));
}
/** Shrink an Extensible class.
*
* @param key The key parameter is an arbitary string which identifies the extension data
*
* You must provide a key name. The given key name will be removed from the classes data. If
* you provide a nonexistent key (case is important) then the function will return false.
* @return Returns true on success.
*/
bool Shrink(const std::string &key)
{
std::map<std::string, ExtensibleItemBase *>::iterator it = this->Extension_Items.find(key);
if (it != this->Extension_Items.end())
{
delete it->second;
/* map::size_type map::erase( const key_type& key );
* returns the number of elements removed, std::map
* is single-associative so this should only be 0 or 1
*/
return this->Extension_Items.erase(key);
}
return false;
}
/** Get an extension item that is not a pointer.
*
* @param key The key parameter is an arbitary string which identifies the extension data
* @param p If you provide a non-existent key, this value will be 0. Otherwise a copy to the item you requested will be placed in this templated parameter.
* @return Returns true if the item was found and false if it was nor, regardless of wether 'p' is NULL. This allows you to store NULL values in Extensible.
*/
template<typename T> bool GetExtRegular(const std::string &key, T &p)
{
std::map<std::string, ExtensibleItemBase *>::iterator it = this->Extension_Items.find(key);
if (it != this->Extension_Items.end())
{
p = dynamic_cast<ExtensibleItemRegular<T> *>(it->second)->GetItem();
return true;
}
return false;
}
/** Get an extension item that is a pointer.
*
* @param key The key parameter is an arbitary string which identifies the extension data
* * @param p If you provide a non-existent key, this value will be NULL. Otherwise a pointer to the item you requested will be placed in this templated parameter.
* @return Returns true if the item was found and false if it was nor, regardless of wether 'p' is NULL. This allows you to store NULL values in Extensible.
*/
template<typename T> bool GetExtPointer(const std::string &key, T *&p)
{
std::map<std::string, ExtensibleItemBase *>::iterator it = this->Extension_Items.find(key);
if (it != this->Extension_Items.end())
{
p = dynamic_cast<ExtensibleItemPointer<T> *>(it->second)->GetItem();
return true;
}
p = NULL;
return false;
}
/** Get an extension item that is a pointer to an array
*
* @param key The key parameter is an arbitary string which identifies the extension data
* @param p If you provide a non-existent key, this value will be NULL. Otherwise a pointer to the item you requested will be placed in this templated parameter.
* @return Returns true if the item was found and false if it was nor, regardless of wether 'p' is NULL. This allows you to store NULL values in Extensible.
*/
template<typename T> bool GetExtArray(const std::string &key, T *&p)
{
std::map<std::string, ExtensibleItemBase *>::iterator it = this->Extension_Items.find(key);
if (it != this->Extension_Items.end())
{
p = dynamic_cast<ExtensibleItemPointerArray<T> *>(it->second)->GetItem();
return true;
}
p = NULL;
return false;
}
/** Get an extension item.
*
* @param key The key parameter is an arbitary string which identifies the extension data
* @return Returns true if the item was found and false if it was not.
*
* This single-parameter version only checks if the key exists, it does nothing with
* the 'data' field and is probably only useful in conjunction with the single-parameter
* version of Extend().
*/
bool GetExt(const std::string &key)
{
return (this->Extension_Items.find(key) != this->Extension_Items.end());
}
/** Get a list of all extension items names.
* @param list A deque of strings to receive the list
* @return This function writes a list of all extension items stored
* in this object by name into the given deque and returns void.
*/
void GetExtList(std::deque<std::string> &list)
{
for (std::map<std::string, ExtensibleItemBase *>::iterator i = Extension_Items.begin(); i != Extension_Items.end(); ++i)
{
list.push_back(i->first);
}
}
};
+114 -542
View File
@@ -1,6 +1,6 @@
/* Prototypes and external variable declarations.
*
* (C) 2003-2009 Anope Team
* (C) 2003-2010 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for furhter details.
@@ -19,6 +19,7 @@
#define EI extern DllExport
#include "slist.h"
#include "hashcomp.h"
E void ModuleRunTimeDirCleanUp();
@@ -28,26 +29,15 @@ E char *uplink;
/* IRC Variables */
E IRCDVar *ircd;
E IRCDCAPAB *ircdcap;
E char *flood_mode_char_set;
E char *flood_mode_char_remove;
E int UseTSMODE; /* hack to get around bahamut clones that don't send TSMODE */
EI unsigned long umodes[128];
E char csmodes[128];
E CMMode cmmodes[128];
E CBMode cbmodes[128];
E CBModeInfo *cbmodeinfos;
E CUMode cumodes[128];
E char *IRCDModule;
E IRCDProto *ircdproto;
/**** actions.c ****/
E void kill_user(const char *source, const char *user, const char *reason);
E void bad_password(User * u);
E void sqline(char *mask, char *reason);
E void common_unban(ChannelInfo * ci, char *nick);
E void common_svsmode(User * u, const char *modes, const char *arg);
E void kill_user(const std::string &source, const std::string &user, const std::string &reason);
E bool bad_password(User *u);
E void sqline(const std::string &mask, const std::string &reason);
E void common_unban(ChannelInfo *ci, const std::string &nick);
/**** botserv.c ****/
@@ -58,15 +48,12 @@ E void bs_init();
E void botserv(User *u, char *buf);
E void botmsgs(User *u, BotInfo *bi, char *buf);
E void botchanmsgs(User *u, ChannelInfo *ci, char *buf);
E void load_bs_dbase();
E void save_bs_dbase();
E BotInfo *findbot(const char *nick);
E BotInfo *findbot(const std::string &nick);
/** Finds a pseudoclient, given a UID. Useful for TS6 protocol modules.
* @param uid The UID to search for
* @return The pseudoclient structure, or NULL if one could not be found
*/
E BotInfo *findbot_byuid(const char *uid);
E void bot_join(ChannelInfo *ci);
E char *normalizeBuffer(const char *);
E void insert_bot(BotInfo * bi);
@@ -79,56 +66,26 @@ E void bot_raw_mode(User * requester, ChannelInfo * ci, const char *mode, char *
E Channel *chanlist[1024];
E void add_ban(Channel * chan, const char *mask);
E void chan_adduser2(User * user, Channel * c);
E void add_invite(Channel * chan, const char *mask);
E void chan_delete(Channel * c);
E void del_ban(Channel * chan, const char *mask);
E void chan_set_key(Channel * chan, const char *value);
E void set_limit(Channel * chan, const char *value);
E void del_invite(Channel * chan, const char *mask);
E char *get_key(Channel * chan);
E char *get_limit(Channel * chan);
E Channel *chan_create(const char *chan, time_t ts);
E Channel *join_user_update(User * user, Channel * chan, const char *name, time_t chants);
E void add_exception(Channel * chan, const char *mask);
E void del_exception(Channel * chan, const char *mask);
E char *get_flood(Channel * chan);
E void set_flood(Channel * chan, const char *value);
E char *get_redirect(Channel * chan);
E void set_redirect(Channel * chan, const char *value);
E void get_channel_stats(long *nrec, long *memuse);
E Channel *findchan(const char *chan);
E Channel *firstchan();
E Channel *nextchan();
E void chan_deluser(User * user, Channel * c);
E void ChanSetInternalModes(Channel *c, int ac, const char **av);
E int is_on_chan(Channel * c, User * u);
E User *nc_on_chan(Channel * c, NickCore * nc);
E char *chan_get_modes(Channel * chan, int complete, int plus);
E void chan_set_modes(const char *source, Channel * chan, int ac,
const char **av, int check);
E int chan_get_user_status(Channel * chan, User * user);
E int chan_has_user_status(Channel * chan, User * user, int16 status);
E void chan_remove_user_status(Channel * chan, User * user, int16 status);
E void chan_set_user_status(Channel * chan, User * user, int16 status);
E int get_access_level(ChannelInfo * ci, NickAlias * na);
E const char *get_xop_level(int level);
E void do_cmode(const char *source, int ac, const char **av);
E void do_join(const char *source, int ac, const char **av);
E void do_kick(const char *source, int ac, const char **av);
E void do_kick(const std::string &source, int ac, const char **av);
E void do_part(const char *source, int ac, const char **av);
E void do_sjoin(const char *source, int ac, const char **av);
E void do_topic(const char *source, int ac, const char **av);
E void do_mass_mode(char *modes);
E void MassChannelModes(BotInfo *bi, const std::string &modes);
E void chan_set_correct_modes(User * user, Channel * c, int give_modes);
E void restore_unsynced_topics();
@@ -137,37 +94,31 @@ E Entry *entry_create(char *mask);
E Entry *entry_add(EList *list, const char *mask);
E void entry_delete(EList *list, Entry *e);
E EList *list_create();
E int entry_match(Entry *e, char *nick, char *user, char *host, uint32 ip);
E int entry_match_mask(Entry *e, char *mask, uint32 ip);
E Entry *elist_match(EList *list, char *nick, char *user, char *host, uint32 ip);
E Entry *elist_match_mask(EList *list, char *mask, uint32 ip);
E int entry_match(Entry *e, const ci::string &nick, const ci::string &user, const ci::string &host, uint32 ip);
E int entry_match_mask(Entry *e, const char *mask, uint32 ip);
E Entry *elist_match(EList *list, const char *nick, const char *user, const char *host, uint32 ip);
E Entry *elist_match_mask(EList *list, const char *mask, uint32 ip);
E Entry *elist_match_user(EList *list, User *u);
E Entry *elist_find_mask(EList *list, const char *mask);
E long get_memuse(EList *list);
#define whosends(ci) ((!(ci) || !((ci)->botflags & BS_SYMBIOSIS) || !(ci)->bi || !(ci)->c || (ci)->c->usercount < BSMinUsers) ? findbot(s_ChanServ) : (ci)->bi)
#define whosends(ci) ((!(ci) || !((ci)->botflags.HasFlag(BS_SYMBIOSIS)) || !(ci)->bi || !(ci)->c || (ci)->c->users.size() < Config.BSMinUsers) ? findbot(Config.s_ChanServ) : (ci)->bi)
/**** chanserv.c ****/
E ChannelInfo *chanlists[256];
E CSModeUtil csmodeutils[];
E LevelInfo levelinfo[];
E void get_chanserv_stats(long *nrec, long *memuse);
E int delchan(ChannelInfo * ci);
E void alpha_insert_chan(ChannelInfo * ci);
E void reset_levels(ChannelInfo * ci);
E void cs_init();
E void chanserv(User * u, char *buf);
E void load_cs_dbase();
E void save_cs_dbase();
E void expire_chans();
E void cs_remove_nick(const NickCore * nc);
E int is_real_founder(User * user, ChannelInfo * ci);
E void check_modes(Channel * c);
E int check_valid_admin(User * user, Channel * chan, int servermode);
E int check_valid_op(User * user, Channel * chan, int servermode);
@@ -176,33 +127,22 @@ E int check_should_voice(User * user, char *chan);
E int check_should_halfop(User * user, char *chan);
E int check_should_owner(User * user, char *chan);
E int check_should_protect(User * user, char *chan);
E int check_kick(User * user, const char *chan, time_t chants);
E void record_topic(const char *chan);
E void restore_topic(const char *chan);
E int check_topiclock(Channel * c, time_t topic_time);
E ChannelInfo *cs_findchan(const char *chan);
E ChannelInfo *cs_findchan(const std::string &chan);
E int check_access(User * user, ChannelInfo * ci, int what);
E int is_founder(User * user, ChannelInfo * ci);
E int get_access(User * user, ChannelInfo * ci);
E ChanAccess *get_access_entry(NickCore * nc, ChannelInfo * ci);
E bool IsFounder(User *user, ChannelInfo *ci);
E bool IsRealFounder(User *user, ChannelInfo *ci);
E int get_access(User *user, ChannelInfo *ci);
E void update_cs_lastseen(User * user, ChannelInfo * ci);
E int get_idealban(ChannelInfo * ci, User * u, char *ret, int retlen);
E AutoKick *is_stuck(ChannelInfo * ci, const char *mask);
E void stick_mask(ChannelInfo * ci, AutoKick * akick);
E void stick_all(ChannelInfo * ci);
E char *cs_get_flood(ChannelInfo * ci);
E void cs_set_flood(ChannelInfo * ci, const char *value);
E char *cs_get_key(ChannelInfo * ci);
E void cs_set_key(ChannelInfo * ci, const char *value);
E char *cs_get_limit(ChannelInfo * ci);
E void cs_set_limit(ChannelInfo * ci, const char *value);
E char *cs_get_redirect(ChannelInfo * ci);
E void cs_set_redirect(ChannelInfo * ci, const char *value);
E int levelinfo_maxwidth;
E ChannelInfo *makechan(const char *chan);
E int is_identified(User * user, ChannelInfo * ci);
E char *get_mlock_modes(ChannelInfo * ci, int complete);
/**** compat.c ****/
@@ -217,282 +157,30 @@ char *sockstrerror(int error);
/**** config.c ****/
E ServerConfig serverConfig;
E std::list<Uplink *> Uplinks;
E char *LocalHost;
E unsigned LocalPort;
E char *ServerName;
E char *ServerDesc;
E char *ServiceUser;
E char *ServiceHost;
E char *HelpChannel;
E char *LogChannel;
E char *NetworkName;
E unsigned NickLen;
E char *s_NickServ;
E char *s_ChanServ;
E char *s_MemoServ;
E char *s_BotServ;
E char *s_HelpServ;
E char *s_OperServ;
E char *s_GlobalNoticer;
E char *desc_NickServ;
E char *desc_ChanServ;
E char *desc_MemoServ;
E char *desc_BotServ;
E char *desc_HelpServ;
E char *desc_OperServ;
E char *desc_GlobalNoticer;
E char *HostDBName;
E char *desc_HostServ;
E char *s_HostServ;
E void load_hs_dbase();
E void save_hs_dbase();
E int do_on_id(User * u);
E void delHostCore(char *nick);
E void hostserv(User * u, char *buf);
E char *PIDFilename;
E char *MOTDFilename;
E char *NickDBName;
E char *PreNickDBName;
E char *ChanDBName;
E char *BotDBName;
E char *OperDBName;
E char *NewsDBName;
E bool NoBackupOkay;
E bool StrictPasswords;
E unsigned BadPassLimit;
E time_t BadPassTimeout;
E time_t UpdateTimeout;
E time_t ExpireTimeout;
E time_t ReadTimeout;
E time_t WarningTimeout;
E time_t TimeoutCheck;
E int KeepLogs;
E int KeepBackups;
E bool ForceForbidReason;
E bool UsePrivmsg;
E bool UseStrictPrivMsg;
E bool DumpCore;
E bool LogUsers;
E unsigned NickRegDelay;
E bool RestrictOperNicks;
E unsigned NewsCount;
E char *Numeric;
E char **HostSetters;
E int HostNumber;
E bool UseMail;
E char *SendMailPath;
E char *SendFrom;
E bool RestrictMail;
E time_t MailDelay;
E bool DontQuoteAddresses;
E int NSDefFlags;
E unsigned NSDefLanguage;
E time_t NSRegDelay;
E time_t NSResendDelay;
E time_t NSExpire;
E time_t NSRExpire;
E bool NSForceEmail;
E int NSMaxAliases;
E unsigned NSAccessMax;
E char *NSEnforcerUser;
E char *NSEnforcerHost;
E time_t NSReleaseTimeout;
E bool NSAllowKillImmed;
E bool NSNoGroupChange;
E bool NSListOpersOnly;
E unsigned NSListMax;
E char *NSGuestNickPrefix;
E bool NSSecureAdmins;
E bool NSStrictPrivileges;
E bool NSEmailReg;
E bool NSModeOnID;
E bool NSRestrictGetPass;
E bool NSNickTracking;
E bool NSAddAccessOnReg;
E int CSDefFlags;
E unsigned CSMaxReg;
E time_t CSExpire;
E int CSDefBantype;
E unsigned CSAccessMax;
E unsigned CSAutokickMax;
E char *CSAutokickReason;
E time_t CSInhabit;
E bool CSListOpersOnly;
E unsigned CSListMax;
E bool CSRestrictGetPass;
E bool CSOpersOnly;
E unsigned MSMaxMemos;
E time_t MSSendDelay;
E bool MSNotifyAll;
E unsigned MSMemoReceipt;
E int BSDefFlags;
E time_t BSKeepData;
E unsigned BSMinUsers;
E unsigned BSBadWordsMax;
E bool BSSmartJoin;
E bool BSGentleBWReason;
E bool BSCaseSensitive;
E char *BSFantasyCharacter;
E bool HideStatsO;
E bool GlobalOnCycle;
E bool AnonymousGlobal;
E char *GlobalOnCycleMessage;
E char *GlobalOnCycleUP;
E char **ServicesRoots;
E int RootNumber;
E bool LogMaxUsers;
E bool SuperAdmin;
E bool LogBot;
E time_t AutokillExpiry;
E time_t ChankillExpiry;
E time_t SGLineExpiry;
E time_t SQLineExpiry;
E time_t SZLineExpiry;
E bool AkillOnAdd;
E bool KillonSGline;
E bool KillonSQline;
E bool DisableRaw;
E bool WallOper;
E bool WallBadOS;
E bool WallOSGlobal;
E bool WallOSMode;
E bool WallOSClearmodes;
E bool WallOSKick;
E bool WallOSAkill;
E bool WallOSSGLine;
E bool WallOSSQLine;
E bool WallOSSZLine;
E bool WallOSNoOp;
E bool WallOSJupe;
E bool WallOSRaw;
E bool WallAkillExpire;
E bool WallSGLineExpire;
E bool WallSQLineExpire;
E bool WallSZLineExpire;
E bool WallExceptionExpire;
E bool WallDrop;
E bool WallForbid;
E bool WallGetpass;
E bool WallSetpass;
E bool AddAkiller;
/**
* Modules Stuff
**/
E char **ModulesAutoload;
E int ModulesNumber;
E char **ModulesDelayedAutoload;
E int ModulesDelayedNumber;
E char **HostServCoreModules;
E int HostServCoreNumber;
E char **HelpServCoreModules;
E int HelpServCoreNumber;
E char **MemoServCoreModules;
E int MemoServCoreNumber;
E char **BotServCoreModules;
E int BotServCoreNumber;
E char **OperServCoreModules;
E int OperServCoreNumber;
E char **NickServCoreModules;
E int NickServCoreNumber;
E char **ChanServCoreModules;
E int ChanServCoreNumber;
E bool LimitSessions;
E unsigned DefSessionLimit;
E time_t ExceptionExpiry;
E int MaxSessionKill;
E unsigned MaxSessionLimit;
E time_t SessionAutoKillExpiry;
E char *ExceptionDBName;
E char *SessionLimitDetailsLoc;
E char *SessionLimitExceeded;
E char **Ulines;
E int NumUlines;
E std::string services_conf;
E ServerConfig Config;
E int read_config(int reload);
E int DefConLevel;
E int DefCon[6];
E int checkDefCon(int level);
E void resetDefCon(int level);
E int DefConSessionLimit;
E time_t DefConTimeOut;
E time_t DefConAKILL;
E char *DefConChanModes;
E bool GlobalOnDefcon;
E bool GlobalOnDefconMore;
E char *DefconMessage;
E char *DefConAkillReason;
E char *DefConOffMessage;
E long unsigned int UserKey1;
E long unsigned int UserKey2;
E long unsigned int UserKey3;
/**** converter.c ****/
E int convert_ircservices_44();
/* hostserv.c */
E void do_on_id(User *u);
E void hostserv(User *u, char *buf);
E void HostServSyncVhosts(NickAlias *na);
/**** encrypt.c ****/
E char *EncModule;
E void initEncryption();
E int enc_encrypt(const char *src, int len, char *dest, int size);
E int enc_encrypt_in_place(char *buf, int size);
E int enc_encrypt_check_len(int passlen, int bufsize);
E int enc_decrypt(const char *src, char *dest, int size);
E int enc_check_password(const char *plaintext, const char *password);
E void encmodule_encrypt(int (*func)(const char *src, int len, char *dest, int size));
E void encmodule_encrypt_in_place(int (*func)(char *buf, int size));
E void encmodule_encrypt_check_len(int (*func)(int passlen, int bufsize));
E void encmodule_decrypt(int (*func)(const char *src, char *dest, int size));
E void encmodule_check_password(int (*func)(const char *plaintext, const char *password));
/**** helpserv.c ****/
E void helpserv(User * u, char *buf);
E void helpserv_init();
E int enc_encrypt(const std::string &src, std::string &dest);
E int enc_encrypt_in_place(std::string &buf);
E int enc_decrypt(const std::string &src, std::string &dest);
E int enc_check_password(std::string &plaintext, std::string &password);
/**** hostserv.c ****/
E void get_hostserv_stats(long *nrec, long *memuse);
E void hostserv_init();
E void addHostCore(char *nick, char *vIdent, char *vhost, const char *creator, int32 tmp_time);
E char *getvIdent(char *nick);
E char *getvHost(char *nick);
E int is_host_remover(User * u);
E int is_host_setter(User *u);
E HostCore *hostCoreListHead();
E HostCore *findHostCore(HostCore * head, char *nick, bool *found);
E HostCore *createHostCorelist(HostCore * next, char *nick, char *vIdent, char *vHost, const char *creator, int32 tmp_time);
E HostCore *insertHostCore(HostCore * head, HostCore * prev, char *nick, char *vIdent, char *vHost, const char *creator, int32 tmp_time);
E HostCore *deleteHostCore(HostCore * head, HostCore * prev);
E void set_lastmask(User * u);
/**** init.c ****/
E void introduce_user(const char *user);
E void introduce_user(const std::string &user);
E bool GetCommandLineArgument(const std::string &name, char shortname = 0);
E bool GetCommandLineArgument(const std::string &name, char shortname, std::string &param);
E int init_primary(int ac, char **av);
E int init_secondary(int ac, char **av);
E Uplink *uplink_server;
@@ -500,31 +188,8 @@ E Uplink *uplink_server;
/**** ircd.c ****/
E void pmodule_ircd_proto(IRCDProto *);
E void pmodule_ircd_var(IRCDVar * ircdvar);
E void pmodule_ircd_cap(IRCDCAPAB * cap);
E void pmodule_ircd_version(const char *version);
E void pmodule_ircd_cbmodeinfos(CBModeInfo * modeinfos);
E void pmodule_ircd_cumodes(CUMode modes[128]);
E void pmodule_ircd_flood_mode_char_set(const char *mode);
E void pmodule_ircd_flood_mode_char_remove(const char *mode);
E void pmodule_ircd_cbmodes(CBMode modes[128]);
E void pmodule_ircd_cmmodes(CMMode modes[128]);
E void pmodule_ircd_csmodes(char mode[128]);
E void pmodule_ircd_useTSMode(int use);
E void pmodule_invis_umode(int mode);
E void pmodule_oper_umode(int mode);
E void pmodule_invite_cmode(int mode);
E void pmodule_secret_cmode(int mode);
E void pmodule_private_cmode(int mode);
E void pmodule_key_mode(int mode);
E void pmodule_limit_mode(int mode);
E int anope_get_secret_mode();
E int anope_get_invite_mode();
E int anope_get_key_mode();
E int anope_get_limit_mode();
E int anope_get_private_mode();
E int anope_get_invis_mode();
E int anope_get_oper_mode();
/**** language.c ****/
@@ -533,21 +198,18 @@ E char *langnames[NUM_LANGS];
E int langlist[NUM_LANGS];
E void lang_init();
#define getstring(na,index) \
(langtexts[((na) && (static_cast<NickAlias *>(na))->nc && !((static_cast<NickAlias *>(na))->status & NS_VERBOTEN) ? (static_cast<NickAlias *>(na))->nc->language : NSDefLanguage)][(index)])
#define getstring2(nc,index) \
(langtexts[((nc) ? (static_cast<NickCore *>(nc))->language : NSDefLanguage)][(index)])
E int strftime_lang(char *buf, int size, User * u, int format,
struct tm *tm);
E void syntax_error(char *service, User * u, const char *command,
int msgnum);
E int strftime_lang(char *buf, int size, User * u, int format, struct tm *tm);
E void syntax_error(char *service, User * u, const char *command, int msgnum);
E const char *getstring(NickAlias *na, int index);
E const char *getstring(NickCore *nc, int index);
E const char *getstring(User *nc, int index);
E const char *getstring(int index);
/**** log.c ****/
E int open_log();
E void close_log();
E void alog(const char *fmt, ...) FORMAT(printf,1,2);
E void log_perror(const char *fmt, ...) FORMAT(printf,1,2);
E void fatal(const char *fmt, ...) FORMAT(printf,1,2);
E void fatal_perror(const char *fmt, ...) FORMAT(printf,1,2);
@@ -570,10 +232,10 @@ E char *version_protocol;
E const char version_flags[];
E std::string services_dir;
E const char *log_filename;
E std::string log_filename;
E int debug;
E int readonly;
E int logchan;
E bool LogChan;
E int nofork;
E int forceload;
E int nothird;
@@ -582,17 +244,16 @@ E int protocoldebug;
E int is44;
E int quitting;
E int delayed_quit;
E int shutting_down;
E const char *quitmsg;
E char inbuf[BUFSIZE];
E int servsock;
E int save_data;
E int got_alarm;
E time_t start_time;
E Socket *UplinkSock;
E void save_databases();
E void expire_all();
E void do_backtrace(int show_segheader);
E void sighandler(int signum);
E void do_restart_services();
@@ -610,16 +271,16 @@ E void ms_init();
E void memoserv(User * u, char *buf);
E void check_memos(User * u);
E MemoInfo *getmemoinfo(const char *name, int *ischan, int *isforbid);
E void memo_send(User * u, char *name, char *text, int z);
E void memo_send(User * u, const char *name, const char *text, int z);
E int delmemo(MemoInfo * mi, int num);
/**** messages.c ****/
E int m_nickcoll(const char *user);
E int m_away(const char *source, const char *msg);
E int m_kill(const char *nick, const char *msg);
E int m_kill(const std::string &nick, const char *msg);
E int m_motd(const char *source);
E int m_privmsg(const char *source, const char *receiver, const char *msg);
E int m_privmsg(const char *source, const std::string &receiver, const char *msg);
E int m_stats(const char *source, int ac, const char **av);
E int m_whois(const char *source, const char *who);
E int m_time(const char *source, int ac, const char **av);
@@ -637,15 +298,14 @@ E size_t strlcpy(char *, const char *, size_t);
#ifndef HAVE_STRLCAT
E size_t strlcat(char *, const char *, size_t);
#endif
E char *stristr(char *s1, char *s2);
E const char *stristr(const char *s1, const char *s2);
E char *strnrepl(char *s, int32 size, const char *old, const char *nstr);
E const char *merge_args(int argc, char **argv);
E const char *merge_args(int argc, const char **argv);
E int match_wild(const char *pattern, const char *str);
E int match_wild_nocase(const char *pattern, const char *str);
E int dotime(const char *s);
E char *duration(NickAlias * na, char *buf, int bufsize, time_t seconds);
E char *expire_left(NickAlias * na, char *buf, int len, time_t expires);
E time_t dotime(const char *s);
E const char *duration(NickCore *nc, char *buf, int bufsize, time_t seconds);
E const char *expire_left(NickCore *nc, char *buf, int len, time_t expires);
E int doValidHost(const char *host, int type);
typedef int (*range_callback_t) (User * u, int num, va_list args);
@@ -664,7 +324,7 @@ E char *myStrGetTokenRemainder(const char *str, const char dilim,
E char *stripModePrefix(const char *str);
E int myNumToken(const char *str, const char dilim);
E void doCleanBuffer(char *str);
E void EnforceQlinedNick(const char *nick, const char *killer);
E void EnforceQlinedNick(const std::string &nick, const char *killer);
E int nickIsServices(const char *nick, int bot);
E void add_entropy_userkeys();
@@ -677,7 +337,10 @@ E char *str_signed(unsigned char *str);
E void ntoa(struct in_addr addr, char *ipaddr, int len);
E char **buildStringList(const std::string &src, int *number);
E std::list<std::string> BuildStringList(const std::string &);
E std::list<ci::string> BuildStringList(const ci::string &);
E std::vector<std::string> BuildStringVector(const std::string &);
E void binary_to_hex(unsigned char *bin, char *hex, int length);
E uint32 cidr_to_netmask(uint16 cidr);
@@ -689,23 +352,18 @@ E int str_is_pure_wildcard(const char *str);
E uint32 str_is_ip(char *str);
E int str_is_cidr(char *str, uint32 * ip, uint32 * mask, char **host);
/**** modes.cpp ****/
/* Number of generic modes we support */
E unsigned GenericChannelModes, GenericUserModes;
E std::bitset<128> DefMLockOn;
E std::bitset<128> DefMLockOff;
E std::map<ChannelModeName, std::string> DefMLockParams;
/* Modes to set on bots when they join the channel */
E std::list<ChannelModeStatus *> BotModes;
E void SetDefaultMLock();
/**** modules.c ****/
E void modules_unload_all(bool fini, bool unload_proto); /* Read warnings near function source */
E void ModuleDatabaseBackup(const char *dbname);
E void ModuleRemoveBackups(const char *dbname);
/**** news.c ****/
E int32 nnews, news_size;
E NewsItem *news;
E void get_news_stats(long *nrec, long *memuse);
E void load_news();
E void save_news();
E void display_news(User * u, int16 type);
E int do_logonnews(User * u);
E int do_opernews(User * u);
E int do_randomnews(User * u);
E void modules_unload_all(bool unload_proto); /* Read warnings near function source */
/**** nickserv.c ****/
@@ -713,94 +371,68 @@ E NickAlias *nalists[1024];
E NickCore *nclists[1024];
E NickRequest *nrlists[1024];
E NickRequest *findrequestnick(const char *nick);
E int delnickrequest(NickRequest * nr);
E unsigned int guestnum;
E void insert_requestnick(NickRequest * nr);
E void alpha_insert_alias(NickAlias * na);
E void insert_core(NickCore * nc);
E void get_aliases_stats(long *nrec, long *memuse);
E void get_core_stats(long *nrec, long *memuse);
E void collide(NickAlias * na, int from_timeout);
E void del_ns_timeout(NickAlias * na, int type);
E void change_core_display(NickCore * nc, char *newdisplay);
E void release(NickAlias * na, int from_timeout);
E void change_core_display(NickCore * nc);
E void change_core_display(NickCore * nc, const char *newdisplay);
E int do_setmodes(User * u);
E int should_mode_change(int16 status, int16 mode);
E void ns_init();
E void nickserv(User * u, char *buf);
E void load_ns_dbase();
E void load_ns_req_db();
E void save_ns_dbase();
E void save_ns_req_dbase();
E int validate_user(User * u);
E void cancel_user(User * u);
E int nick_identified(User * u);
E int nick_recognized(User * u);
E void expire_nicks();
E void expire_requests();
EI int ns_do_register(User * u);
E int delnick(NickAlias * na);
E NickAlias *findnick(const char *nick);
E NickAlias *findnick(const std::string &nick);
E NickCore *findcore(const char *nick);
E void clean_ns_timeouts(NickAlias * na);
E void nsStartNickTracking(User * u);
E void nsStopNickTracking(User * u);
E int nsCheckNickTracking(User *u);
E int group_identified(User * u, NickCore * nc);
E int is_on_access(User * u, NickCore * nc);
E bool is_on_access(User *u, NickCore *nc);
/**** operserv.c ****/
E SList akills, sglines, sqlines, szlines;
E SList servadmins;
E SList servopers;
E int DefConModesSet;
E uint32 DefConModesOn;
E uint32 DefConModesOff;
E ChannelInfo DefConModesCI;
E Flags<ChannelModeName> DefConModesOn;
E Flags<ChannelModeName> DefConModesOff;
E std::map<ChannelModeName, std::string> DefConModesOnParams;
E bool SetDefConParam(ChannelModeName, std::string &);
E bool GetDefConParam(ChannelModeName, std::string *);
E void UnsetDefConParam(ChannelModeName);
E void operserv(User *u, char *buf);
E void os_init();
E void load_os_dbase();
E void save_os_dbase();
E void os_remove_nick(NickCore *nc);
E int is_services_root(User *u);
E int is_services_admin(User *u);
E int is_services_oper(User *u);
E int nick_is_services_root(NickCore * nc);
E int nick_is_services_admin(NickCore *nc);
E int nick_is_services_oper(NickCore *nc);
E int add_akill(User *u, char *mask, const char *by, const time_t expires, const char *reason);
E int add_akill(User *u, const char *mask, const char *by, const time_t expires, const char *reason);
E int check_akill(const char *nick, const char *username, const char *host, const char *vhost, const char *ip);
E void expire_akills();
E void oper_global(char *nick, const char *fmt, ...);
E int add_sgline(User *u, char *mask, const char *by, const time_t expires, const char *reason);
E int add_sgline(User *u, const char *mask, const char *by, time_t expires, const char *reason);
E int check_sgline(const char *nick, const char *realname);
E void expire_sglines();
E int add_sqline(User *u, char *mask, const char *by, const time_t expires, const char *reason);
E int add_sqline(User *u, const char *mask, const char *by, time_t expires, const char *reason);
E int check_sqline(const char *nick, int nick_change);
E void expire_sqlines();
E int check_chan_sqline(const char *chan);
E int add_szline(User * u, char *mask, const char *by,
const time_t expires, const char *reason);
E int add_szline(User * u, const char *mask, const char *by,
time_t expires, const char *reason);
E void expire_szlines();
E int check_szline(const char *nick, char *ip);
E Server *server_global(Server * s, char *msg);
E bool OSOpersOnly;
E time_t DefContimer;
E void runDefCon();
E int defconParseModeString(const char *str);
E std::vector<NewsItem *> News;
E bool CheckDefCon(DefconLevel Level);
E bool CheckDefCon(int level, DefconLevel Level);
E void AddDefCon(int level, DefconLevel Level);
E void DelDefCon(int level, DefconLevel Level);
E std::vector<std::bitset<32> > DefCon;
/**** process.c ****/
@@ -813,7 +445,7 @@ E int delete_ignore(const char *nick);
E int clear_ignores();
E int split_buf(char *buf, const char ***argv, int colon_special);
E void process();
E void process(const std::string &buf);
/**** send.c ****/
@@ -822,11 +454,9 @@ E void send_cmd(const std::string &source, const char *fmt, ...) FORMAT(printf,2
E void notice_server(char *source, Server * s, const char *fmt, ...)
FORMAT(printf,3,4);
E void notice_user(char *source, User *u, const char *fmt, ...)
FORMAT(printf,3,4);
E void notice_list(const char *source, const char *dest, char **text); // MARK_DEPRECATED;
E void notice_lang(const char *source, User *dest, int message, ...); // MARK_DEPRECATED;
E void notice_lang(const std::string &source, User *dest, int message, ...); // MARK_DEPRECATED;
E void notice_help(const char *source, User *dest, int message, ...); // MARK_DEPRECATED;
@@ -835,23 +465,22 @@ E void notice_help(const char *source, User *dest, int message, ...); // MARK_DE
E Server *servlist;
E Server *me_server;
E Server *serv_uplink;
E uint32 uplink_capab;
E CapabInfo capab_info[];
E Flags<CapabType> Capab;
E CapabInfo Capab_Info[];
E Server *first_server(int flags);
E Server *next_server(int flags);
E Server *first_server(ServerFlag flag);
E Server *next_server(ServerFlag flag);
E void CapabParse(int ac, const char **av);
E int is_ulined(const char *server);
E int is_sync(Server *server);
E Server *new_server(Server * uplink, const char *name, const char *desc,
uint16 flags, const char *suid);
E Server *new_server(Server * uplink, const char *name, const char *desc, ServerFlag flag, const std::string &suid);
E Server *findserver(Server *s, const char *name);
E void do_server(const char *source, const char *servername, const char *hops, const char *descript, const char *numeric);
E void do_server(const char *source, const char *servername, const char *hops, const char *descript, const std::string &numeric);
E void do_squit(const char *source, int ac, const char **av);
E void capab_parse(int ac, const char **av);
E int anope_check_sync(const char *name);
E void finish_sync(Server *serv, int sync_links);
@@ -860,6 +489,8 @@ E void ts6_uid_init();
E void ts6_uid_increment(unsigned int slot);
E const char *ts6_uid_retrieve();
E const char *ts6_sid_retrieve();
/**** sessions.c ****/
E Exception *exceptions;
@@ -871,13 +502,9 @@ E int32 nsessions;
E void get_session_stats(long *nrec, long *memuse);
E void get_exception_stats(long *nrec, long *memuse);
E int do_session(User *u);
E int add_session(const char *nick, const char *host, char *hostip);
E void del_session(const char *host);
E void load_exceptions();
E void save_exceptions();
E int do_exception(User *u);
E void expire_exceptions();
E Session *findsession(const char *host);
@@ -892,8 +519,8 @@ E int exception_add(User * u, const char *mask, const int limit,
E int slist_add(SList *slist, void *item);
E void slist_clear(SList *slist, int free);
E int slist_delete(SList *slist, int index);
E int slist_delete_range(SList *slist, char *range, slist_delcheckcb_t cb, ...);
E int slist_enum(SList *slist, char *range, slist_enumcb_t cb, ...);
E int slist_delete_range(SList *slist, const char *range, slist_delcheckcb_t cb, ...);
E int slist_enum(SList *slist, const char *range, slist_enumcb_t cb, ...);
E int slist_full(SList *slist);
E int slist_indexof(SList *slist, void *item);
E void slist_init(SList *slist);
@@ -901,20 +528,10 @@ E void slist_pack(SList *slist);
E int slist_remove(SList *slist, void *item);
E int slist_setcapacity(SList *slist, int16 capacity);
/**** sockutil.c ****/
E int32 total_read, total_written;
E int32 read_buffer_len();
E int32 write_buffer_len();
E int sgetc(ano_socket_t s);
E char *sgets(char *buf, int len, ano_socket_t s);
E char *sgets2(char *buf, int len, ano_socket_t s);
E int sread(ano_socket_t s, char *buf, int len);
E int sputs(char *str, ano_socket_t s);
E int sockprintf(ano_socket_t s, const char *fmt, ...);
E int conn(const char *host, int port, const char *lhost, int lport);
E void disconn(ano_socket_t s);
/**** sockets.cpp ****/
E SocketEngine socketEngine;
E int32 TotalRead;
E int32 TotalWritten;
/**** users.c ****/
@@ -925,92 +542,47 @@ E uint32 maxusercnt, usercnt;
E time_t maxusertime;
E void get_user_stats(long *nusers, long *memuse);
E User *finduser(const char *nick);
E User *finduser(const std::string &nick);
E User *firstuser();
E User *nextuser();
E User *find_byuid(const char *uid);
E User *find_byuid(const std::string &uid);
E User *first_uid();
E User *next_uid();
E Server *findserver_uid(Server * s, const char *name);
E char *TS6SID;
E char *TS6UPLINK;
E void update_host(User * user);
E User *do_nick(const char *source, const char *nick, const char *username, const char *host,
const char *server, const char *realname, time_t ts, uint32 svid, uint32 ip, const char *vhost, const char *uid);
const char *server, const char *realname, time_t ts, uint32 ip, const char *vhost, const char *uid);
E void do_umode(const char *source, int ac, const char **av);
E void do_umode2(const char *source, int ac, const char **av);
E void do_quit(const char *source, int ac, const char **av);
E void do_kill(const char *source, const char *reason);
E void do_kill(const std::string &source, const std::string &reason);
E int is_oper(User * user);
E int is_protected(User * user);
E int is_excepted(ChannelInfo * ci, User * user);
E int is_excepted_mask(ChannelInfo * ci, char *mask);
E int is_excepted_mask(ChannelInfo * ci, const char *mask);
E int match_usermask(const char *mask, User * user);
E int match_userip(const char *mask, User * user, char *host);
E void split_usermask(const char *mask, char **nick, char **user,
char **host);
E char *create_mask(User * u);
#ifdef USE_MYSQL
/**** mysql.c ****/
E MYSQL *mysql;
E MYSQL_RES *mysql_res;
E MYSQL_FIELD *mysql_fields;
E MYSQL_ROW mysql_row;
E int db_mysql_init();
E int db_mysql_open();
E int db_mysql_close();
E int db_mysql_query(char *sql);
E char *db_mysql_quote(char *sql);
E char *db_mysql_quote_buffer(char *sql, int size);
E int db_mysql_try(const char *fmt, ...);
E int db_mysql_save_ns_core(NickCore * nc);
E int db_mysql_save_ns_alias(NickAlias * na);
E int db_mysql_save_ns_req(NickRequest * nr);
E int db_mysql_save_cs_info(ChannelInfo * ci);
E int db_mysql_save_os_db(unsigned int maxucnt, unsigned int maxutime,
SList * ak, SList * sgl, SList * sql,
SList * szl);
E int db_mysql_save_news(NewsItem * ni);
E int db_mysql_save_exceptions(Exception * e);
E int db_mysql_save_hs_core(HostCore * hc);
E int db_mysql_save_bs_core(BotInfo * bi);
E int db_mysql_load_bs_dbase();
E int db_mysql_load_hs_dbase();
E int db_mysql_load_ns_dbase();
E int db_mysql_load_ns_req_dbase();
E int db_mysql_load_cs_dbase();
E int db_mysql_load_os_dbase();
E int db_mysql_load_exceptions();
E int db_mysql_load_news();
E unsigned int mysql_rand();
#endif
E void UserSetInternalModes(User *user, int ac, const char **av);
/******************************************************************************/
E char *common_get_vident(User *u);
E char *common_get_vhost(User *u);
E const char* base64enc(long i);
E long base64dec(char *b64);
E const char *base64enc(long i);
E long base64dec(const char *b64);
E long base64dects(const char *ts);
E int b64_encode(char *src, size_t srclength, char *target, size_t targsize);
E int b64_encode(const char *src, size_t srclength, char *target, size_t targsize);
E int b64_decode(const char *src, char *target, size_t targsize);
E const char* encode_ip(unsigned char *ip);
E const char *encode_ip(unsigned char *ip);
E int decode_ip(const char *buf);
E char *host_resolve(char *host);
E void event_process_hook(const char *name, int argc, char **argv);
E void send_event(const char *name, int argc, ...);
#ifdef _WIN32
E char *GetWindowsVersion() ;
E int SupportedWindowsVersion();
+395 -3
View File
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2002-2009 InspIRCd Development Team
* Copyright (C) 2009 Anope Team <team@anope.org>
* Copyright (C) 2002-2010 InspIRCd Development Team
* Copyright (C) 2009-2010 Anope Team <team@anope.org>
*
* Please read COPYING and README for further details.
*
@@ -16,12 +16,397 @@
#include <string>
/*******************************************************
* This file contains classes and templates that deal
* with the comparison and hashing of 'irc strings'.
* An 'irc string' is a string which compares in a
* case insensitive manner, and as per RFC 1459 will
* treat [ identical to {, ] identical to }, and \
* as identical to |.
*
* Our hashing functions are designed to accept
* std::string and compare/hash them as type irc::string
* by converting them internally. This makes them
* backwards compatible with other code which is not
* aware of irc::string.
*******************************************************/
#ifndef LOWERMAP
#define LOWERMAP
/** A mapping of uppercase to lowercase, including scandinavian
* 'oddities' as specified by RFC1459, e.g. { -> [, and | -> \
*/
unsigned const char rfc_case_insensitive_map[256] = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, /* 0-19 */
20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, /* 20-39 */
40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, /* 40-59 */
60, 61, 62, 63, 64, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, /* 60-79 */
112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 94, 95, 96, 97, 98, 99, /* 80-99 */
100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, /* 100-119 */
120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, /* 120-139 */
140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, /* 140-159 */
160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, /* 160-179 */
180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, /* 180-199 */
200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, /* 200-219 */
220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, /* 220-239 */
240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255 /* 240-255 */
};
/** Case insensitive map, ASCII rules.
* That is;
* [ != {, but A == a.
*/
unsigned const char ascii_case_insensitive_map[256] = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, /* 0-19 */
20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, /* 20-39 */
40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, /* 40-59 */
60, 61, 62, 63, 64, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, /* 60-79 */
112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 91, 92, 93, 94, 95, 96, 97, 98, 99, /* 80-99 */
100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, /* 100-119 */
120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, /* 120-139 */
140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, /* 140-159 */
160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, /* 160-179 */
180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, /* 180-199 */
200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, /* 200-219 */
220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, /* 220-239 */
240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255 /* 240-255 */
};
#endif
/** The irc namespace contains a number of helper classes.
*/
namespace irc
{
/** The irc_char_traits class is used for RFC-style comparison of strings.
* This class is used to implement irc::string, a case-insensitive, RFC-
* comparing string class.
*/
struct irc_char_traits : std::char_traits<char>
{
/** Check if two chars match.
* @param c1st First character
* @param c2nd Second character
* @return true if the characters are equal
*/
static bool eq(char c1st, char c2nd);
/** Check if two chars do NOT match.
* @param c1st First character
* @param c2nd Second character
* @return true if the characters are unequal
*/
static bool ne(char c1st, char c2nd);
/** Check if one char is less than another.
* @param c1st First character
* @param c2nd Second character
* @return true if c1st is less than c2nd
*/
static bool lt(char c1st, char c2nd);
/** Compare two strings of size n.
* @param str1 First string
* @param str2 Second string
* @param n Length to compare to
* @return similar to strcmp, zero for equal, less than zero for str1
* being less and greater than zero for str1 being greater than str2.
*/
static int compare(const char *str1, const char *str2, size_t n);
/** Find a char within a string up to position n.
* @param s1 String to find in
* @param n Position to search up to
* @param c Character to search for
* @return Pointer to the first occurance of c in s1
*/
static const char *find(const char *s1, int n, char c);
};
/** This typedef declares irc::string based upon irc_char_traits.
*/
typedef std::basic_string<char, irc_char_traits, std::allocator<char> > string;
}
/** The ci namespace contains a number of helper classes.
*/
namespace ci
{
/** The ci_char_traits class is used for ASCII-style comparison of strings.
* This class is used to implement ci::string, a case-insensitive, ASCII-
* comparing string class.
*/
struct CoreExport ci_char_traits : std::char_traits<char>
{
/** Check if two chars match.
* @param c1st First character
* @param c2nd Second character
* @return true if the characters are equal
*/
static bool eq(char c1st, char c2nd);
/** Check if two chars do NOT match.
* @param c1st First character
* @param c2nd Second character
* @return true if the characters are unequal
*/
static bool ne(char c1st, char c2nd);
/** Check if one char is less than another.
* @param c1st First character
* @param c2nd Second character
* @return true if c1st is less than c2nd
*/
static bool lt(char c1st, char c2nd);
/** Compare two strings of size n.
* @param str1 First string
* @param str2 Second string
* @param n Length to compare to
* @return similar to strcmp, zero for equal, less than zero for str1
* being less and greater than zero for str1 being greater than str2.
*/
static int compare(const char *str1, const char *str2, size_t n);
/** Find a char within a string up to position n.
* @param s1 String to find in
* @param n Position to search up to
* @param c Character to search for
* @return Pointer to the first occurance of c in s1
*/
static const char *find(const char *s1, int n, char c);
};
/** This typedef declares ci::string based upon ci_char_traits.
*/
typedef std::basic_string<char, ci_char_traits, std::allocator<char> > string;
}
/* Define operators for using >> and << with irc::string to an ostream on an istream. */
/* This was endless fun. No. Really. */
/* It was also the first core change Ommeh made, if anyone cares */
/** Operator << for irc::string
*/
inline std::ostream &operator<<(std::ostream &os, const irc::string &str) { return os << std::string(str.c_str()); }
/** Operator >> for irc::string
*/
inline std::istream &operator>>(std::istream &is, irc::string &str)
{
std::string tmp;
is >> tmp;
str = tmp.c_str();
return is;
}
/** Operator << for ci::string
*/
inline std::ostream &operator<<(std::ostream &os, const ci::string &str) { return os << std::string(str.c_str()); }
/** Operator >> for ci::string
*/
inline std::istream &operator>>(std::istream &is, ci::string &str)
{
std::string tmp;
is >> tmp;
str = tmp.c_str();
return is;
}
/* Define operators for + and == with irc::string to std::string for easy assignment
* and comparison
*
* Operator +
*/
inline std::string operator+(std::string &leftval, irc::string &rightval)
{
return leftval + std::string(rightval.c_str());
}
/* Define operators for + and == with irc::string to std::string for easy assignment
* and comparison
*
* Operator +
*/
inline irc::string operator+(irc::string &leftval, std::string &rightval)
{
return leftval + irc::string(rightval.c_str());
}
/* Define operators for + and == with ci::string to std::string for easy assignment
* and comparison
*
* Operator +
*/
inline std::string operator+(std::string &leftval, ci::string &rightval)
{
return leftval + std::string(rightval.c_str());
}
/* Define operators for + and == with ci::string to std::string for easy assignment
* and comparison
*
* Operator +
*/
inline ci::string operator+(ci::string &leftval, std::string &rightval)
{
return leftval + ci::string(rightval.c_str());
}
/* Define operators for + and == with irc::string to ci::string for easy assignment
* and comparison
*
* Operator +
*/
inline irc::string operator+(irc::string &leftval, ci::string &rightval)
{
return leftval + irc::string(rightval.c_str());
}
/* Define operators for + and == with irc::string to ci::string for easy assignment
* and comparison
*
* Operator +
*/
inline ci::string operator+(ci::string &leftval, irc::string &rightval)
{
return leftval + ci::string(rightval.c_str());
}
/* Define operators for + and == with irc::string to std::string for easy assignment
* and comparison
*
* Operator ==
*/
inline bool operator==(const std::string &leftval, const irc::string &rightval)
{
return leftval.c_str() == rightval;
}
/* Define operators for + and == with irc::string to std::string for easy assignment
* and comparison
*
* Operator ==
*/
inline bool operator==(const irc::string &leftval, const std::string &rightval)
{
return leftval == rightval.c_str();
}
/* Define operators for + and == with ci::string to std::string for easy assignment
* and comparison
*
* Operator ==
*/
inline bool operator==(const std::string &leftval, const ci::string &rightval)
{
return leftval.c_str() == rightval;
}
/* Define operators for + and == with ci::string to std::string for easy assignment
* and comparison
*
* Operator ==
*/
inline bool operator==(const ci::string &leftval, const std::string &rightval)
{
return leftval == rightval.c_str();
}
/* Define operators for + and == with irc::string to ci::string for easy assignment
* and comparison
*
* Operator ==
*/
inline bool operator==(const ci::string &leftval, const irc::string &rightval)
{
return leftval.c_str() == rightval;
}
/* Define operators for + and == with irc::string to ci::string for easy assignment
* and comparison
*
* Operator ==
*/
inline bool operator==(const irc::string &leftval, const ci::string &rightval)
{
return leftval == rightval.c_str();
}
/* Define operators != for irc::string to std::string for easy comparison
*/
inline bool operator!=(const irc::string &leftval, const std::string &rightval)
{
return !(leftval == rightval.c_str());
}
/* Define operators != for std::string to irc::string for easy comparison
*/
inline bool operator!=(const std::string &leftval, const irc::string &rightval)
{
return !(leftval.c_str() == rightval);
}
/* Define operators != for ci::string to std::string for easy comparison
*/
inline bool operator!=(const ci::string &leftval, const std::string &rightval)
{
return !(leftval == rightval.c_str());
}
/* Define operators != for ci::string to irc::string for easy comparison
*/
inline bool operator!=(const std::string &leftval, const ci::string &rightval)
{
return !(leftval.c_str() == rightval);
}
/* Define operators != for irc::string to ci::string for easy comparison
*/
inline bool operator!=(const irc::string &leftval, const ci::string &rightval)
{
return !(leftval == rightval.c_str());
}
/* Define operators != for irc::string to ci::string for easy comparison
*/
inline bool operator!=(const ci::string &leftval, const irc::string &rightval)
{
return !(leftval.c_str() == rightval);
}
/** Assign an irc::string to a std::string.
*/
//inline std::string assign(const irc::string &other) { return other.c_str(); }
/** Assign a std::string to an irc::string.
*/
//inline irc::string assign(const std::string &other) { return other.c_str(); }
/** Assign an ci::string to a std::string.
*/
//inline std::string assign(const ci::string &other) { return other.c_str(); }
/** Assign a std::string to an ci::string.
*/
//inline ci::string assign(const std::string &other) { return other.c_str(); }
/** Assign an irc::string to a ci::string.
*/
//inline ci::string assign(const irc::string &other) { return other.c_str(); }
/** Assign a ci::string to an irc::string.
*/
//inline irc::string assign(const ci::string &other) { return other.c_str(); }
/** 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
class CoreExport sepstream
{
private:
/** Original string.
@@ -40,6 +425,8 @@ class sepstream
/** Create a sepstream and fill it with the provided data
*/
sepstream(const std::string &source, char seperator);
sepstream(const ci::string &source, char seperator);
sepstream(const char *source, char seperator);
virtual ~sepstream() { }
/** Fetch the next token from the stream
@@ -47,6 +434,7 @@ class sepstream
* @return True if tokens still remain, false if there are none left
*/
virtual bool GetToken(std::string &token);
virtual bool GetToken(ci::string &token);
/** Fetch the entire remaining stream, without tokenizing
* @return The remaining part of the stream
@@ -67,6 +455,8 @@ class commasepstream : public sepstream
/** Initialize with comma seperator
*/
commasepstream(const std::string &source) : sepstream(source, ',') { }
commasepstream(const ci::string &source) : sepstream(source, ',') { }
commasepstream(const char *source) : sepstream(source, ',') { }
};
/** A derived form of sepstream, which seperates on spaces
@@ -77,6 +467,8 @@ class spacesepstream : public sepstream
/** Initialize with space seperator
*/
spacesepstream(const std::string &source) : sepstream(source, ' ') { }
spacesepstream(const ci::string &source) : sepstream(source, ' ') { }
spacesepstream(const char *source) : sepstream(source, ' ') { }
};
#endif
+1 -1
View File
@@ -1,6 +1,6 @@
/* Declarations of IRC message structures, variables, and functions.
*
* (C) 2003-2009 Anope Team
* (C) 2003-2010 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for furhter details.
+531
View File
@@ -0,0 +1,531 @@
/* Mode support
*
* Copyright (C) 2008-2010 Adam <Adam@anope.org>
* Copyright (C) 2008-2010 Anope Team <team@anope.org>
*
* Please read COPYING and README for further details.
*
*
* $Id$
*
*/
/** All of the valid user mode names
*/
enum UserModeName
{
UMODE_BEGIN,
UMODE_SERV_ADMIN, UMODE_BOT, UMODE_CO_ADMIN, UMODE_FILTER, UMODE_HIDEOPER, UMODE_NETADMIN,
UMODE_REGPRIV, UMODE_PROTECTED, UMODE_NO_CTCP, UMODE_WEBTV, UMODE_WHOIS, UMODE_ADMIN, UMODE_DEAF,
UMODE_GLOBOPS, UMODE_HELPOP, UMODE_INVIS, UMODE_OPER, UMODE_PRIV, UMODE_GOD, UMODE_REGISTERED,
UMODE_SNOMASK, UMODE_VHOST, UMODE_WALLOPS, UMODE_CLOAK, UMODE_SSL, UMODE_CALLERID, UMODE_COMMONCHANS,
UMODE_HIDDEN, UMODE_STRIPCOLOR,
UMODE_END
};
/** All of the valid channel mode names
*/
enum ChannelModeName
{
CMODE_BEGIN,
/* Channel modes */
CMODE_BLOCKCOLOR, CMODE_FLOOD, CMODE_INVITE, CMODE_KEY, CMODE_LIMIT, CMODE_MODERATED, CMODE_NOEXTERNAL,
CMODE_PRIVATE, CMODE_REGISTERED, CMODE_SECRET, CMODE_TOPIC, CMODE_AUDITORIUM, CMODE_SSL, CMODE_ADMINONLY,
CMODE_NOCTCP, CMODE_FILTER, CMODE_NOKNOCK, CMODE_REDIRECT, CMODE_REGMODERATED, CMODE_NONICK, CMODE_OPERONLY,
CMODE_NOKICK, CMODE_REGISTEREDONLY, CMODE_STRIPCOLOR, CMODE_NONOTICE, CMODE_NOINVITE, CMODE_ALLINVITE,
CMODE_BLOCKCAPS, CMODE_PERM, CMODE_NICKFLOOD, CMODE_JOINFLOOD, CMODE_DELAYEDJOIN, CMODE_NOREJOIN,
/* b/e/I */
CMODE_BAN, CMODE_EXCEPT,
CMODE_INVITEOVERRIDE,
/* v/h/o/a/q */
CMODE_VOICE, CMODE_HALFOP, CMODE_OP,
CMODE_PROTECT, CMODE_OWNER,
CMODE_END
};
/** The different types of modes
*/
enum ModeType
{
/* Regular mode */
MODE_REGULAR,
/* b/e/I */
MODE_LIST,
/* k/l etc */
MODE_PARAM,
/* v/h/o/a/q */
MODE_STATUS
};
/* Classes of modes, Channel modes and User modes
*/
enum ModeClass
{
/* Channel mode */
MC_CHANNEL,
/* User mode */
MC_USER
};
/** This class is the basis of all modes in Anope
*/
class CoreExport Mode
{
public:
/* Class of mode this is */
ModeClass Class;
/* Mode char for this */
char ModeChar;
/* Type of mode this is */
ModeType Type;
/** Default constructor
* @param mClass The type of mode this is
* @param modeChar The mode char
* @param type The mode type
*/
Mode(ModeClass mClass, char modeChar, ModeType type);
/** Default destructor
*/
virtual ~Mode();
};
/** This class is a user mode, all user modes use this/inherit from this
*/
class CoreExport UserMode : public Mode
{
public:
/* Mode name */
UserModeName Name;
/** Default constructor
* @param nName The mode name
* @param modeChar The mode char
*/
UserMode(UserModeName mName, char modeChar);
/** Default destructor
*/
virtual ~UserMode();
};
class UserModeParam : public UserMode
{
public:
/** Default constructor
* @param mName The mode name
* @param modeChar The mode char
*/
UserModeParam(UserModeName mName, char modeChar);
/** Check if the param is valid
* @param value The param
* @return true or false
*/
virtual bool IsValid(const std::string &value) { return true; }
};
/** This class is a channel mode, all channel modes use this/inherit from this
*/
class CoreExport ChannelMode : public Mode
{
public:
/* Mode name */
ChannelModeName Name;
/** Default constructor
* @param mName The mode name
* @param modeChar The mode char
*/
ChannelMode(ChannelModeName mName, char modeChar);
/** Default destructor
*/
virtual ~ChannelMode();
/** Can a user set this mode, used for mlock
* NOTE: User CAN be NULL, this is for checking if it can be locked with defcon
* @param u The user, or NULL
*/
virtual bool CanSet(User *u) { return true; }
};
/** This is a mode for lists, eg b/e/I. These modes should inherit from this
*/
class CoreExport ChannelModeList : public ChannelMode
{
public:
/** Default constructor
* @param mName The mode name
* @param modeChar The mode char
*/
ChannelModeList(ChannelModeName mName, char modeChar);
/** Default destructor
*/
virtual ~ChannelModeList();
/** Is the mask valid
* @param mask The mask
* @return true for yes, false for no
*/
virtual bool IsValid(const std::string &mask) { return true; }
/** Add the mask to the channel, this should be overridden
* @param chan The channel
* @param mask The mask
*/
virtual void AddMask(Channel *chan, const char *mask) { }
/** Delete the mask from the channel, this should be overridden
* @param chan The channel
* @param mask The mask
*/
virtual void DelMask(Channel *chan, const char *mask) { }
};
/** This is a mode with a paramater, eg +k/l. These modes should use/inherit from this
*/
class CoreExport ChannelModeParam : public ChannelMode
{
public:
/** Default constructor
* @param mName The mode name
* @param modeChar The mode char
* @param MinusArg true if this mode sends no arg when unsetting
*/
ChannelModeParam(ChannelModeName mName, char modeChar, bool MinusArg = false);
/** Default destructor
*/
virtual ~ChannelModeParam();
/* Should we send an arg when unsetting this mode? */
bool MinusNoArg;
/** Is the param valid
* @param value The param
* @return true for yes, false for no
*/
virtual bool IsValid(const std::string &value) { return true; }
};
/** This is a mode that is a channel status, eg +v/h/o/a/q.
*/
class CoreExport ChannelModeStatus : public ChannelMode
{
public:
/* The symbol, eg @ % + */
char Symbol;
/** Default constructor
* @param mName The mode name
* @param modeChar The mode char
* @param mSymbol The symbol for the mode, eg @ % +
*/
ChannelModeStatus(ChannelModeName mName, char modeChar, char mSymbol);
/** Default destructor
*/
virtual ~ChannelModeStatus();
};
/** Channel mode +b
*/
class CoreExport ChannelModeBan : public ChannelModeList
{
public:
ChannelModeBan(char modeChar) : ChannelModeList(CMODE_BAN, modeChar) { }
void AddMask(Channel *chan, const char *mask);
void DelMask(Channel *chan, const char *mask);
};
/** Channel mode +e
*/
class CoreExport ChannelModeExcept : public ChannelModeList
{
public:
ChannelModeExcept(char modeChar) : ChannelModeList(CMODE_EXCEPT, modeChar) { }
void AddMask(Channel *chan, const char *mask);
void DelMask(Channel *chan, const char *mask);
};
/** Channel mode +I
*/
class CoreExport ChannelModeInvite : public ChannelModeList
{
public:
ChannelModeInvite(char modeChar) : ChannelModeList(CMODE_INVITEOVERRIDE, modeChar) { }
void AddMask(Channel *chan, const char *mask);
void DelMask(Channel *chan, const char *mask);
};
/** Channel mode +k (key)
*/
class CoreExport ChannelModeKey : public ChannelModeParam
{
public:
ChannelModeKey(char modeChar) : ChannelModeParam(CMODE_KEY, modeChar) { }
bool IsValid(const std::string &value);
};
/** Channel mode +f (flood)
*/
class ChannelModeFlood : public ChannelModeParam
{
public:
ChannelModeFlood(char modeChar, bool minusNoArg = false) : ChannelModeParam(CMODE_FLOOD, modeChar, minusNoArg) { }
bool IsValid(const std::string &value);
};
/** This class is used for channel mode +A (Admin only)
* Only opers can mlock it
*/
class CoreExport ChannelModeAdmin : public ChannelMode
{
public:
ChannelModeAdmin(char modeChar) : ChannelMode(CMODE_ADMINONLY, modeChar) { }
/* Opers only */
bool CanSet(User *u);
};
/** This class is used for channel mode +O (Opers only)
* Only opers can mlock it
*/
class CoreExport ChannelModeOper : public ChannelMode
{
public:
ChannelModeOper(char modeChar) : ChannelMode(CMODE_OPERONLY, modeChar) { }
/* Opers only */
bool CanSet(User *u);
};
/** This class is used for channel mode +r (registered channel)
* No one may mlock r
*/
class CoreExport ChannelModeRegistered : public ChannelMode
{
public:
ChannelModeRegistered(char modeChar) : ChannelMode(CMODE_REGISTERED, modeChar) { }
/* No one mlocks +r */
bool CanSet(User *u);
};
enum StackerType
{
ST_CHANNEL,
ST_USER
};
class StackerInfo
{
public:
/* Modes to be added */
std::list<std::pair<void *, std::string> > AddModes;
/* Modes to be deleted */
std::list<std::pair<void *, std::string> > DelModes;
/* The type of object this stacker info is for */
StackerType Type;
/* Bot this is sent from */
BotInfo *bi;
/** Add a mode to this object
* @param Mode The mode
* @param Set true if setting, false if unsetting
* @param Param The param for the mode
*/
void AddMode(void *Mode, bool Set, const std::string &Param);
};
/** This is mode manager
* It contains functions for adding modes to Anope so Anope can track them
* and do things such as MLOCK.
* This also contains a mode stacker that will combine multiple modes and set
* them on a channel all at once
*/
class CoreExport ModeManager
{
protected:
/* List of pairs of user/channels and their stacker info */
static std::list<std::pair<void *, StackerInfo *> > StackerObjects;
/** Get the stacker info for an item, if one doesnt exist it is created
* @param Item The user/channel etc
* @return The stacker info
*/
static StackerInfo *GetInfo(void *Item);
/** Build a list of mode strings to send to the IRCd from the mode stacker
* @param info The stacker info for a channel or user
* @return a list of strings
*/
static std::list<std::string> BuildModeStrings(StackerInfo *info);
/** Add a mode to the stacker, internal use only
* @param bi The client to set the modes from
* @param u The user
* @param um The user mode
* @param Set Adding or removing?
* @param Param A param, if there is one
*/
static void StackerAddInternal(BotInfo *bi, User *u, UserMode *um, bool Set, const std::string &Param);
/** Add a mode to the stacker, internal use only
* @param bi The client to set the modes from
* @param c The channel
* @param cm The channel mode
* @param Set Adding or removing?
* @param Param A param, if there is one
*/
static void StackerAddInternal(BotInfo *bi, Channel *c, ChannelMode *cm, bool Set, const std::string &Param);
/** Really add a mode to the stacker, internal use only
* @param bi The client to set the modes from
* @param Object The object, user/channel
* @param Mode The mode
* @param Set Adding or removing?
* @param Param A param, if there is one
* @param Type The type this is, user or channel
*/
static void StackerAddInternal(BotInfo *bi, void *Object, void *Mode, bool Set, const std::string &Param, StackerType Type);
public:
/* User modes */
static std::map<char, UserMode *> UserModesByChar;
static std::map<UserModeName, UserMode *> UserModesByName;
/* Channel modes */
static std::map<char, ChannelMode *> ChannelModesByChar;
static std::map<ChannelModeName, ChannelMode *> ChannelModesByName;
/* Although there are two different maps for UserModes and ChannelModes
* the pointers in each are the same. This is used to increase
* efficiency.
*/
/* List of all modes Anope knows about */
static std::list<Mode *> Modes;
/** Add a user mode to Anope
* @param um A UserMode or UserMode derived class
* @return true on success, false on error
*/
static bool AddUserMode(UserMode *um);
/** Add a channel mode to Anope
* @param cm A ChannelMode or ChannelMode derived class
* @return true on success, false on error
*/
static bool AddChannelMode(ChannelMode *cm);
/** Find a channel mode
* @param Mode The mode
* @return The mode class
*/
static ChannelMode *FindChannelModeByChar(char Mode);
/** Find a user mode
* @param Mode The mode
* @return The mode class
*/
static UserMode *FindUserModeByChar(char Mode);
/** Find a channel mode
* @param Mode The modename
* @return The mode class
*/
static ChannelMode *FindChannelModeByName(ChannelModeName Name);
/** Find a user mode
* @param Mode The modename
* @return The mode class
*/
static UserMode *FindUserModeByName(UserModeName Name);
/** Gets the channel mode char for a symbol (eg + returns v)
* @param Value The symbol
* @return The char
*/
static char GetStatusChar(char Value);
/** Add a mode to the stacker to be set on a channel
* @param bi The client to set the modes from
* @param c The channel
* @param cm The channel mode
* @param Set true for setting, false for removing
* @param Param The param, if there is one
*/
static void StackerAdd(BotInfo *bi, Channel *c, ChannelMode *cm, bool Set, const std::string &Param = "");
/** Add a mode to the stacker to be set on a channel
* @param bi The client to set the modes from
* @param c The channel
* @param Name The channel mode name
* @param Set true for setting, false for removing
* @param Param The param, if there is one
*/
static void StackerAdd(BotInfo *bi, Channel *c, ChannelModeName Name, bool Set, const std::string &Param = "");
/** Add a mode to the stacker to be set on a channel
* @param bi The client to set the modes from
* @param c The channel
* @param Mode The mode char
* @param Set true for setting, false for removing
* @param Param The param, if there is one
*/
static void StackerAdd(BotInfo *bi, Channel *c, const char Mode, bool Set, const std::string &Param = "");
/** Add a mode to the stacker to be set on a user
* @param bi The client to set the modes from
* @param u The user
* @param um The user mode
* @param Set true for setting, false for removing
* @param param The param, if there is one
*/
static void StackerAdd(BotInfo *bi, User *u, UserMode *um, bool Set, const std::string &Param = "");
/** Add a mode to the stacker to be set on a user
* @param bi The client to set the modes from
* @param u The user
* @param Name The user mode name
* @param Set true for setting, false for removing
* @param Param The param, if there is one
*/
static void StackerAdd(BotInfo *bi, User *u, UserModeName Name, bool Set, const std::string &Param = "");
/** Add a mode to the stacker to be set on a user
* @param bi The client to set the modes from
* @param u The user
* @param Mode The mode to be set
* @param Set true for setting, false for removing
* @param Param The param, if there is one
*/
static void StackerAdd(BotInfo *bi, User *u, const char Mode, bool Set, const std::string &Param = "");
/** Process all of the modes in the stacker and send them to the IRCd to be set on channels/users
*/
static void ProcessModes();
};
-4
View File
@@ -7,9 +7,5 @@
#include "modules.h"
#include "version.h"
#define MOD_UNIQUE 0
#define MOD_HEAD 1
#define MOD_TAIL 2
#endif
+1057 -214
View File
File diff suppressed because it is too large Load Diff
+66
View File
@@ -0,0 +1,66 @@
/*
* Copyright (C) 2008-2010 Robin Burchell <w00t@inspircd.org>
* Copyright (C) 2008-2010 Anope Team <team@anope.org>
*
* Please read COPYING and README for further details.
*
*
* $Id$
*
*/
#include "hashcomp.h"
class CoreExport OperType
{
private:
/** The name of this opertype, e.g. "sra".
*/
ci::string name;
/** Privs that this opertype may use, e.g. 'users/auspex'.
* This *must* be std::list, see commands comment for details.
*/
std::list<std::string> privs;
/** Commands this user may execute, e.g:
* botserv/set/ *, botserv/set/private, botserv/ *
* et cetera.
*
* This *must* be std::list, not std::map, because
* we support full globbing here. This shouldn't be a problem
* as we don't invoke it often.
*/
std::list<std::string> commands;
public:
/** Create a new opertype of the given name.
* @param nname The opertype name, e.g. "sra".
*/
OperType(const ci::string &nname);
/** Check whether this opertype has access to run the given command string.
* @param cmdstr The string to check, e.g. botserv/set/private.
* @return True if this opertype may run the specified command, false otherwise.
*/
bool HasCommand(const std::string &cmdstr) const;
/** Check whether this opertype has access to the given special permission.
* @param privstr The priv to check for, e.g. users/auspex.
* @return True if this opertype has the specified priv, false otherwise.
*/
bool HasPriv(const std::string &privstr) const;
/** Add the specified command to this opertype.
* @param cmdstr The command mask to grant this opertype access to, e.g: nickserv/ *, chanserv/set/ *, botserv/set/private.
*/
void AddCommand(const std::string &cmdstr);
/** Add the specified priv mask to this opertype.
* @param privstr The specified mask of privs to grant this opertype access to, e.g. users/auspex, users/ *, etc.
*/
void AddPriv(const std::string &privstr);
/** Returns the name of this opertype.
*/
const ci::string &GetName() const;
};
+2 -4
View File
@@ -1,6 +1,6 @@
/* Include extra includes needed by most/all pseudo-clients.
*
* (C) 2003-2009 Anope Team
* (C) 2003-2010 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for furhter details.
@@ -14,7 +14,5 @@
#include "commands.h"
#include "language.h"
#include "timeout.h"
#include "encrypt.h"
#include "datafiles.h"
#include "timers.h"
#include "slist.h"
+255 -48
View File
@@ -1,6 +1,6 @@
/* Modular support
*
* (C) 2008-2009 Anope Team
* (C) 2008-2010 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -8,41 +8,82 @@
* $Id$
*
*/
class ChannelInfo : public Extensible
/** Flags used for the ChannelInfo class
*/
enum ChannelInfoFlag
{
CI_BEGIN,
/* ChanServ is currently holding the channel */
CI_INHABIT,
/* Retain the topic even after the channel is emptied */
CI_KEEPTOPIC,
/* Don't allow non-authorized users to be opped */
CI_SECUREOPS,
/* Hide channel from ChanServ LIST command */
CI_PRIVATE,
/* Topic can only be changed by SET TOPIC */
CI_TOPICLOCK,
/* Only users on the access list may join */
CI_RESTRICTED,
/* Don't allow ChanServ and BotServ commands to do bad things to users with higher access levels */
CI_PEACE,
/* Don't allow any privileges unless a user is IDENTIFIED with NickServ */
CI_SECURE,
/* Don't allow the channel to be registered or used */
CI_FORBIDDEN,
/* Channel does not expire */
CI_NO_EXPIRE,
/* Channel memo limit may not be changed */
CI_MEMO_HARDMAX,
/* Send notice to channel on use of OP/DEOP */
CI_OPNOTICE,
/* Stricter control of channel founder status */
CI_SECUREFOUNDER,
/* Sign kicks with the user who did the kick */
CI_SIGNKICK,
/* Sign kicks if level is < than the one defined by the SIGNKIGK level */
CI_SIGNKICK_LEVEL,
/* Uses XOP */
CI_XOP,
/* Channel is suspended */
CI_SUSPENDED,
/* Channel still exists when emptied, this can be caused by setting a perm
* channel mode (+P on InspIRCd) or /cs set #chan persist on.
* This keeps the service bot in the channel regardless if a +P type mode
* is set or not
*/
CI_PERSIST,
CI_END
};
class CoreExport ChannelInfo : public Extensible, public Flags<ChannelInfoFlag>
{
private:
std::map<ChannelModeName, std::string> Params; /* Map of parameters by mode name for mlock */
std::vector<ChanAccess *> access; /* List of authorized users */
std::vector<AutoKick *> akick; /* List of users to kickban */
std::vector<BadWord *> badwords; /* List of badwords */
std::bitset<128> mlock_on; /* Modes mlocked on */
std::bitset<128> mlock_off; /* Modes mlocked off */
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;
}
/** Default constructor
* @param chname The channel name
*/
ChannelInfo(const std::string &chname);
/** Default destructor
*/
~ChannelInfo();
ChannelInfo *next, *prev;
char name[CHANMAX];
std::string name; /* Channel name */
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;
@@ -50,44 +91,210 @@ class ChannelInfo : public Extensible
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 */
std::string last_topic_setter; /* 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 *c; /* Pointer to channel record (if *
* channel is currently in use) */
/* For BotServ */
BotInfo *bi; /* Bot used on this channel */
uint32 botflags; /* BS_* below */
Flags<BotServFlag> botflags;
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 */
};
/** Add an entry to the channel access list
*
* @param nc The NickCore of the user that the access entry should be tied to
* @param level The channel access level the user has on the channel
* @param creator The user who added the access
* @param last_seen When the user was last seen within the channel
*
* Creates a new access list entry and inserts it into the access list.
*/
void AddAccess(NickCore *nc, int16 level, const std::string &creator, int32 last_seen = 0);
/** Get an entry from the channel access list by index
*
* @param index The index in the access list vector
* @return A ChanAccess struct corresponding to the index given, or NULL if outside the bounds
*
* Retrieves an entry from the access list that matches the given index.
*/
ChanAccess *GetAccess(unsigned index);
/** Get an entry from the channel access list by NickCore
*
* @param nc The NickCore to find within the access list vector
* @param level Optional channel access level to compare the access entries to
* @return A ChanAccess struct corresponding to the NickCore, or NULL if not found
*
* Retrieves an entry from the access list that matches the given NickCore, optionally also matching a certain level.
*/
ChanAccess *GetAccess(NickCore *nc, int16 level = 0);
/** Get the size of the accss vector for this channel
* @return The access vector size
*/
const unsigned GetAccessCount() const;
/** Erase an entry from the channel access list
*
* @param index The index in the access list vector
*
* Clears the memory used by the given access entry and removes it from the vector.
*/
void EraseAccess(unsigned index);
/** Cleans the channel access list
*
* Cleans up the access list so it no longer contains entries no longer in use.
*/
void CleanAccess();
/** Clear the entire channel access list
*
* Clears the entire access list by deleting every item and then clearing the vector.
*/
void ClearAccess();
/** Add an akick entry to the channel by NickCore
* @param user The user who added the akick
* @param akicknc The nickcore being akicked
* @param reason The reason for the akick
* @param t The time the akick was added, defaults to now
* @param lu The time the akick was last used, defaults to never
*/
AutoKick *AddAkick(const std::string &user, NickCore *akicknc, const std::string &reason, time_t t = time(NULL), time_t lu = 0);
/** Add an akick entry to the channel by reason
* @param user The user who added the akick
* @param mask The mask of the akick
* @param reason The reason for the akick
* @param t The time the akick was added, defaults to now
* @param lu The time the akick was last used, defaults to never
*/
AutoKick *AddAkick(const std::string &user, const std::string &mask, const std::string &reason, time_t t = time(NULL), time_t lu = 0);
/** Get an entry from the channel akick list
* @param index The index in the akick vector
* @return The akick structure, or NULL if not found
*/
AutoKick *GetAkick(unsigned index);
/** Get the size of the akick vector for this channel
* @return The akick vector size
*/
const unsigned GetAkickCount() const;
/** Erase an entry from the channel akick list
* @param akick The akick
*/
void EraseAkick(AutoKick *akick);
/** Clear the whole akick list
*/
void ClearAkick();
/** Clean all of the nonused entries from the akick list
*/
void CleanAkick();
/** Add a badword to the badword list
* @param word The badword
* @param type The type (SINGLE START END)
* @return The badword
*/
BadWord *AddBadWord(const std::string &word, BadWordType type);
/** Get a badword structure by index
* @param index The index
* @return The badword
*/
BadWord *GetBadWord(unsigned index);
/** Get how many badwords are on this channel
* @return The number of badwords in the vector
*/
const unsigned GetBadWordCount() const;
/** Remove a badword
* @param badword The badword
*/
void EraseBadWord(BadWord *badword);
/** Clear all badwords from the channel
*/
void ClearBadWords();
/** Clean all of the nonused entries from the badwords list
*/
void CleanBadWords();
/** Check if a mode is mlocked
* @param Name The mode
* @param status True to check mlock on, false for mlock off
* @return true on success, false on fail
*/
const bool HasMLock(ChannelModeName Name, bool status);
/** Set a mlock
* @param Name The mode
* @param status True for mlock on, false for mlock off
* @param param An optional param arg for + mlocked modes
* @return true on success, false on failure (module blocking)
*/
bool SetMLock(ChannelModeName Name, bool status, const std::string param = "");
/** Remove a mlock
* @param Name The mode
* @return true on success, false on failure (module blcoking)
*/
bool RemoveMLock(ChannelModeName Name);
/** Clear all mlocks on the channel
*/
void ClearMLock();
/** Get the number of mlocked modes for this channel
* @param status true for mlock on, false for mlock off
* @return The number of mlocked modes
*/
const size_t GetMLockCount(bool status) const;
/** Get a param from the channel
* @param Name The mode
* @param Target a string to put the param into
* @return true on success
*/
const bool GetParam(ChannelModeName Name, std::string &Target);
/** Check if a mode is set and has a param
* @param Name The mode
*/
const bool HasParam(ChannelModeName Name);
/** Clear all the params from the channel
*/
void ClearParams();
/** Check whether a user is permitted to be on this channel
* @param u The user
* @return true if they are allowed, false if they aren't and were kicked
*/
bool CheckKick(User *user);
};
+606 -919
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,6 +1,6 @@
/* Header for Services list handler.
*
* (C) 2003-2009 Anope Team
* (C) 2003-2010 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for furhter details.
+165 -28
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2004-2009 Anope Team
* (C) 2004-2010 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for furhter details.
@@ -15,34 +15,171 @@
#define SOCKETS_H
#ifdef _WIN32
typedef SOCKET ano_socket_t;
#define ano_sockread(fd, buf, len) recv(fd, buf, len, 0)
#define ano_sockwrite(fd, buf, len) send(fd, buf, len, 0)
#define ano_sockclose(fd) closesocket(fd)
#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
#define SOCKERR_EINTR WSAEINTR
#define SOCKERR_EINVAL WSAEINVAL
#define SOCKERR_EINPROGRESS WSAEINPROGRESS
#define CloseSocket closesocket
#else
typedef int ano_socket_t;
#define ano_sockread(fd, buf, len) read(fd, buf, len)
#define ano_sockwrite(fd, buf, len) write(fd, buf, len)
#define ano_sockclose(fd) close(fd)
#define ano_sockgeterr() errno
#define ano_sockseterr(err) errno = err
#define ano_sockstrerror(err) strerror(err)
#define ano_socksetnonb(fd) fcntl(fd, F_SETFL, O_NONBLOCK)
#define ano_sockerrnonb(err) (err == EINPROGRESS)
#define SOCKERR_EBADF EBADF
#define SOCKERR_EINTR EINTR
#define SOCKERR_EINVAL EINVAL
#define SOCKERR_EINPROGRESS EINPROGRESS
#define CloseSocket close
#endif
class SocketException : public CoreException
{
public:
/** Default constructor for socket exceptions
* @param message Error message
*/
SocketException(const std::string &message) : CoreException(message) { }
/** Default destructor
* @throws Nothing
*/
virtual ~SocketException() throw() { }
};
class CoreExport Socket
{
private:
/** Read from the socket
* @param buf Buffer to read to
* @param sz How much to read
* @return Number of bytes recieved
*/
virtual int RecvInternal(char *buf, size_t sz) const;
/** Write to the socket
* @param buf What to write
* @return Number of bytes sent, -1 on error
*/
virtual int SendInternal(const std::string &buf) const;
protected:
/* Socket FD */
int Sock;
/* Host this socket is connected to */
std::string TargetHost;
/* Port we're connected to */
int Port;
/* IP this socket is bound to */
std::string BindHost;
/* Is this an IPv6 socket? */
bool IPv6;
/* Messages to be written to the socket */
std::string WriteBuffer;
/* Part of a message not totally yet recieved */
std::string extrabuf;
/* How much data was recieved from the socket */
size_t RecvLen;
public:
/** Default constructor
* @param nTargetHost Hostname to connect to
* @param nPort Port to connect to
* @param nBindHos Host to bind to when connecting
* @param nIPv6 true to use IPv6
*/
Socket(const std::string &nTargetHost, int nPort, const std::string &nBindHost = "", bool nIPv6 = false);
/** Default destructor
*/
virtual ~Socket();
/** Get the socket FD for this socket
* @return The fd
*/
virtual int GetSock() const;
/** Check if this socket is IPv6
* @return true or false
*/
bool IsIPv6() const;
/** Called when there is something to be read from thie socket
* @return true on success, false to kill this socket
*/
virtual bool ProcessRead();
/** Called when this socket becomes writeable
* @return true on success, false to drop this socket
*/
virtual bool ProcessWrite();
/** Called when there is an error on this socket
*/
virtual void ProcessError();
/** Called with a message recieved from the socket
* @param buf The message
* @return true on success, false to kill this socket
*/
virtual bool Read(const std::string &buf);
/** Write to the socket
* @param message The message to write
*/
void Write(const char *message, ...);
void Write(std::string &message);
/** Get the length of the read buffer
* @return The length of the read buffer
*/
size_t ReadBufferLen() const;
/** Get the length of the write buffer
* @return The length of the write buffer
*/
size_t WriteBufferLen() const;
};
class CoreExport SocketEngine
{
private:
/* List of sockets that need to be deleted */
std::set<Socket *> OldSockets;
/* FDs to read */
fd_set ReadFDs;
/* FDs that want writing */
fd_set WriteFDs;
/* Max FD */
int MaxFD;
/** Unmark a socket as writeable
* @param s The socket
*/
void ClearWriteable(Socket *s);
public:
/* Set of sockets */
std::set<Socket *> Sockets;
/** Constructor
*/
SocketEngine();
/** Destructor
*/
virtual ~SocketEngine();
/** Add a socket to the socket engine
* @param s The socket
*/
void AddSocket(Socket *s);
/** Delete a socket from the socket engine
* @param s The socket
*/
void DelSocket(Socket *s);
/** Mark a socket as wanting to be written to
* @param s The socket
*/
void MarkWriteable(Socket *s);
/** Called to iterate through each socket and check for activity
*/
void Process();
/** Get the last socket error
* @return The error
*/
const std::string GetError() const;
};
#endif
-45
View File
@@ -1,45 +0,0 @@
/* Time-delay routine include stuff.
*
* (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.
*
* $Id$
*
*/
#ifndef TIMEOUT_H
#define TIMEOUT_H
#include <time.h>
/* 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 */
};
/* Check the timeout list for any pending actions. */
extern void check_timeouts();
/* 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
* that run through the timeout list.
*/
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);
#endif /* TIMEOUT_H */
+116
View File
@@ -0,0 +1,116 @@
/* Timer include stuff.
*
* (C) 2003-2010 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.
*
* $Id$
*
*/
#ifndef TIMERS_H
#define TIMERS_H
#include "services.h"
#include <time.h>
#include <algorithm>
#include <stdio.h>
#include <stdlib.h>
class CoreExport Timer : public Extensible
{
private:
/** The time this was created
*/
time_t settime;
/** The triggering time
*/
time_t trigger;
/** Numer of seconds between triggers
*/
long secs;
/** True if this is a repeating timer
*/
bool repeat;
public:
/** Default constructor, initializes the triggering time
* @param time_from_now The number of seconds from now to trigger the timer
* @param now The time now
* @param repeating Repeat this timer every time_from_now if this is true
*/
Timer(long time_from_now, time_t now = time(NULL), bool repeating = false);
/** Default destructor, removes the timer from the list
*/
virtual ~Timer();
/** Set the trigger time to a new value
* @param t The new time
*/
void SetTimer(time_t t);
/** Retrieve the triggering time
* @return The trigger time
*/
const time_t GetTimer();
/** Returns true if the timer is set to repeat
* @return Returns true if the timer is set to repeat
*/
const bool GetRepeat();
/** Returns the interval between ticks
* @return The interval
*/
const long GetSecs();
/** Returns the time this timer was created
* @return The time this timer was created
*/
const time_t GetSetTime();
/** Called when the timer ticks
* This should be overridden with something useful
*/
virtual void Tick(time_t ctime) = 0;
};
/** This class manages sets of Timers, and triggers them at their defined times.
* This will ensure timers are not missed, as well as removing timers that have
* expired and allowing the addition of new ones.
*/
class CoreExport TimerManager : public Extensible
{
protected:
/** A list of timers
*/
static std::vector<Timer *> Timers;
public:
/** Add a timer to the list
* @param T A Timer derived class to add
*/
static void AddTimer(Timer *T);
/** Deletes a timer
* @param T A Timer derived class to delete
*/
static void DelTimer(Timer *T);
/** Tick all pending timers
* @param ctime The current time
*/
static void TickTimers(time_t ctime = time(NULL));
/** Compares two timers
*/
static bool TimerComparison(Timer *one, Timer *two);
};
#endif
+188 -26
View File
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2008-2009 Robin Burchell <w00t@inspircd.org>
* Copyright (C) 2008-2009 Anope Team <team@anope.org>
* Copyright (C) 2008-2010 Robin Burchell <w00t@inspircd.org>
* Copyright (C) 2008-2010 Anope Team <team@anope.org>
*
* Please read COPYING and README for further details.
*
@@ -8,46 +8,48 @@
* $Id$
*
*/
struct u_chanlist {
struct u_chanlist *next, *prev;
struct ChannelContainer
{
Channel *chan;
int16 status; /* Associated flags; see CSTATUS_* below. */
Flags<ChannelModeName> *Status;
ChannelContainer(Channel *c) : chan(c) { }
virtual ~ChannelContainer() { }
};
struct u_chaninfolist {
struct u_chaninfolist *next, *prev;
ChannelInfo *chan;
};
typedef std::list<ChannelContainer *> UChannelList;
/* Online user and channel data. */
class CoreExport User : public Extensible
{
protected:
std::string vident;
std::string ident;
std::string uid;
bool OnAccess; /* If the user is on the access list of the nick theyre on */
std::bitset<128> modes; /* Bitset of mode names the user has set on them */
std::map<UserModeName, std::string> Params; /* Map of user modes and the params this user has */
NickCore *nc; /* NickCore account the user is currently loggged in as */
public: // XXX: exposing a tiny bit too much
User *next, *prev;
char nick[NICKMAX];
std::string nick; /* User's current nick */
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 */
/* Channels the user is in */
UChannelList chans;
unsigned short invalid_pw_count; /* # of invalid password attempts */
time_t invalid_pw_time; /* Time of last invalid password */
@@ -62,9 +64,10 @@ class CoreExport User : public Extensible
/** Create a new user object, initialising necessary fields and
* adds it to the hash
*
* @parameter nick The nickname of the user account.
* @param nick The nickname of the user.
* @param uid The unique identifier of the user.
*/
User(const std::string &nick);
User(const std::string &nick, const std::string &uid);
/** Destroy a user.
*/
@@ -73,17 +76,61 @@ class CoreExport User : public Extensible
/** Update the nickname of a user record accordingly, should be
* called from ircd protocol.
*/
void SetNewNick(const std::string &newnick);
virtual void SetNewNick(const std::string &newnick);
/** Update the displayed (vhost) of a user record.
* This is used (if set) instead of real host.
* @param host The new displayed host to give the user.
*/
void SetDisplayedHost(const std::string &host);
/** Get the displayed vhost of a user record.
* @return The displayed vhost of the user, where ircd-supported, or the user's real host.
*/
const std::string GetDisplayedHost() const;
/** Update the cloaked host of a user
* @param host The cloaked host
*/
void SetCloakedHost(const std::string &newhost);
/** Get the cloaked host of a user
* @return The cloaked host
*/
const std::string &GetCloakedHost() const;
/** Retrieves the UID of the user, where applicable, if set.
* This is not used on some IRCds, but is for a lot e.g. P10, TS6 protocols.
* @return The UID of the user.
*/
const std::string &GetUID() const;
/** Update the displayed ident (username) of a user record.
* @param ident The new ident to give this user.
*/
void SetVIdent(const std::string &ident);
/** Get the displayed ident (username) of this user.
* @return The displayed ident of this user.
*/
const std::string &GetVIdent() const;
/** Update the real ident (username) of a user record.
* @param ident The new ident to give this user.
* NOTE: Where possible, you should use the Get/SetVIdent() equivilants.
*/
void SetIdent(const std::string &ident);
/** Get the real ident (username) of this user.
* @return The displayed ident of this user.
* NOTE: Where possible, you should use the Get/SetVIdent() equivilants.
*/
const std::string &GetIdent() const;
/** Get the full mask ( nick!ident@realhost ) of a user
*/
const std::string GetMask();
/** Updates the realname of the user record.
*/
void SetRealname(const std::string &realname);
@@ -93,9 +140,124 @@ class CoreExport User : public Extensible
* @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);
virtual void SendMessage(const std::string &source, const char *fmt, ...);
virtual void SendMessage(const std::string &source, const std::string &msg);
/** Collide a nick
* See the comment in users.cpp
* @param na The nick
*/
void Collide(NickAlias *na);
/** Check if the user should become identified because
* their svid matches the one stored in their nickcore
* @param svid Services id
*/
void CheckAuthenticationToken(const char *svid);
/** Auto identify the user to the given accountname.
* @param account Display nick of account
*/
void AutoID(const std::string &account);
/** Login the user to a NickCore
* @param core The account the user is useing
*/
void Login(NickCore *core);
/** Logout the user
*/
void Logout();
/** Get the account the user is logged in using
* @reurn The account or NULL
*/
virtual NickCore *Account() const;
/** Check if the user is identified for their nick
* @param CheckNick True to check if the user is identified to the nickname they are on too
* @return true or false
*/
virtual const bool IsIdentified(bool CheckNick = false) const;
/** Check if the user is recognized for their nick (on the nicks access list)
* @return true or false
*/
virtual const bool IsRecognized() const;
/** Update the last usermask stored for a user, and check to see if they are recognized
*/
void UpdateHost();
/** Check if the user has a mode
* @param Name Mode name
* @return true or false
*/
const bool HasMode(UserModeName Name) const;
/** Set a mode internally on the user, the IRCd is not informed
* @param um The user mode
* @param Param The param, if there is one
*/
void SetModeInternal(UserMode *um, const std::string &Param = "");
/** Remove a mode internally on the user, the IRCd is not informed
* @param um The user mode
*/
void RemoveModeInternal(UserMode *um);
/** Set a mode on the user
* @param bi The client setting the mode
* @param um The user mode
* @param Param Optional param for the mode
*/
void SetMode(BotInfo *bi, UserMode *um, const std::string &Param = "");
/** Set a mode on the user
* @param bi The client setting the mode
* @param Name The mode name
* @param Param Optional param for the mode
*/
void SetMode(BotInfo *bi, UserModeName Name, const std::string &Param = "");
/* Set a mode on the user
* @param bi The client setting the mode
* @param ModeChar The mode char
* @param param Optional param for the mode
*/
void SetMode(BotInfo *bi, char ModeChar, const std::string &Param = "");
/** Remove a mode on the user
* @param bi The client setting the mode
* @param um The user mode
*/
void RemoveMode(BotInfo *bi, UserMode *um);
/** Remove a mode from the user
* @param bi The client setting the mode
* @param Name The mode name
*/
void RemoveMode(BotInfo *bi, UserModeName Name);
/** Remove a mode from the user
* @param bi The client setting the mode
* @param ModeChar The mode char
*/
void RemoveMode(BotInfo *bi, char ModeChar);
/** Set a string of modes on a user
* @param bi The client setting the mode
* @param modes The modes
*/
void SetModes(BotInfo *bi, const char *modes, ...);
/** Find the channel container for Channel c that the user is on
* This is preferred over using FindUser in Channel, as there are usually more users in a channel
* than channels a user is in
* @param c The channel
* @return The channel container, or NULL
*/
ChannelContainer *FindChannel(Channel *c);
};
+4 -16
View File
@@ -32,21 +32,21 @@ fi
cat >$VERSIONH <<EOF
/* Version information for Services.
*
* (C) 2003-2008 Anope Team
* (C) 2003-2010 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and CREDITS 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.
*
* This file is auto-generated by version.sh
*
*/
#ifndef VERSION_H
#define VERSION_H
#define VERSION_MAJOR $VERSION_MAJOR
#define VERSION_MINOR $VERSION_MINOR
#define VERSION_PATCH $VERSION_PATCH
@@ -67,18 +67,6 @@ cat >$VERSIONH <<EOF
# define VER_OS
#endif
#if defined(USE_MYSQL)
# define VER_MYSQL "Q"
#else
# define VER_MYSQL
#endif
#if defined(USE_MODULES)
# define VER_MODULE "M"
#else
# define VER_MODULE
#endif
#endif
EOF
+1 -1
View File
@@ -1,6 +1,6 @@
/* version file handler for win32.
*
* (C) 2003-2009 Anope Team
* (C) 2003-2010 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for furhter details.
+85 -53
View File
@@ -1,7 +1,7 @@
//
// install.js - Windows Configuration
//
// (C) 2003-2008 Anope Team
// (C) 2003-2010 Anope Team
// Contact us at team@anope.org
//
// This program is free but copyrighted software; see the file COPYING for
@@ -26,25 +26,27 @@ var installerQuestions = [
'short' : 'Install directory:',
'default_answer' : '',
'store_answer' : function(answer) {
if (!answer) {
if (!answer)
{
WScript.Echo("You must give a directory!\n");
return false;
}
if (!fso.FolderExists(answer)) {
if (fso.FileExists(answer)) {
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) {
if (!inputValue)
inputValue = 'yes';
}
if (inputValue != 'no') {
if (inputValue != 'no')
fso.CreateFolder(answer);
}
}
else if (fso.FileExists(answer + '\\include\\services.h')) {
else if (fso.FileExists(answer + '\\include\\services.h'))
{
WScript.Echo("You cannot use the Anope source directory as a target directory.\n");
return false;
}
@@ -52,7 +54,7 @@ var installerQuestions = [
return true;
},
'cmake_argument' : function() {
return '-DINSTDIR:STRING=' + installerResponses['Install Directory'];
return '-DINSTDIR:STRING="' + installerResponses['Install Directory'] + '"';
}
},
{
@@ -75,8 +77,10 @@ var installerQuestions = [
return true;
},
'cmake_argument' : function() {
if (installerResponses['Use NMake'] == 'yes') return '-G"NMake Makefiles"';
else return '';
if (installerResponses['Use NMake'] == 'yes')
return '-G"NMake Makefiles"';
else
return '';
}
},
{
@@ -94,9 +98,12 @@ var installerQuestions = [
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';
if (installerResponses['Debug'] == 'msvc')
return '';
else if (installerResponses['Debug'] == 'yes')
return '-DCMAKE_BUILD_TYPE:STRING=DEBUG';
else
return '-DCMAKE_BUILD_TYPE:STRING=RELEASE';
}
},
{
@@ -115,8 +122,10 @@ var installerQuestions = [
return true;
},
'cmake_argument' : function() {
if (installerResponses['Visual Studio 2008'] == 'yes') return '-G"Visual Studio 9 2008"';
else return '';
if (installerResponses['Visual Studio 2008'] == 'yes')
return '-G"Visual Studio 9 2008"';
else
return '';
}
},
];
@@ -137,71 +146,78 @@ var ScriptPath = WScript.ScriptFullName.substr(0, WScript.ScriptFullName.length
var fso = WScript.CreateObject('Scripting.FileSystemObject');
var x, y, z;
if (fso.FileExists(ScriptPath + '.BANNER')) {
if (fso.FileExists(ScriptPath + '.BANNER'))
{
var bannerStream = fso.OpenTextFile(ScriptPath + '.BANNER');
var bannerText = bannerStream.ReadAll();
bannerStream.close();
for (x in bannerReplacements) {
for (x in bannerReplacements)
{
var thisReplacement = bannerReplacements[x];
bannerText = bannerText.replace(thisReplacement['findtext'], thisReplacement['replacement']);
}
WScript.Echo(bannerText + "\n");
}
else {
else
WScript.Echo("ERROR: Cannot find banner file!\n");
}
WScript.Echo('Press Enter to Begin...');
InstallerInput();
WScript.Echo('');
for (x in installerQuestions) {
for (x in installerQuestions)
{
var thisQuestion = installerQuestions[x];
var validResponse = false;
var validOpts = new Array();
if (thisQuestion.short == 'Build debug?' && installerResponses['Use NMake'] == 'no') {
if (thisQuestion.short == 'Build debug?' && installerResponses['Use NMake'] == 'no')
{
installerResponses['Debug'] = 'msvc';
continue;
}
if (thisQuestion.short == 'Using Visual Studio 2008?' && installerResponses['Debug'] != 'msvc') {
if (thisQuestion.short == 'Using Visual Studio 2008?' && installerResponses['Debug'] != 'msvc')
{
installerResponses['Visual Studio 2008'] = 'no';
continue;
}
while (!validResponse) {
for (y in thisQuestion.question) {
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) {
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");
if (thisQuestion.default_answer)
WScript.Echo('Default Answer: ' + thisQuestion.default_answer + "\n");
WScript.Echo(thisQuestion.short);
var inputValue = InstallerInput().toLowerCase();
if (!inputValue) {
if (!inputValue)
inputValue = thisQuestion.default_answer;
}
if (choiceLine && !validOpts[inputValue]) {
if (choiceLine && !validOpts[inputValue])
WScript.Echo("ERROR: Invalid option '" + inputValue + "'\n");
}
else if (thisQuestion.store_answer(inputValue)) {
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) {
for (x in installerResponses)
{
var thisResponse = installerResponses[x];
WScript.Echo("\t" + x + ":\t\t[" + thisResponse.toUpperCase() + "]");
}
@@ -210,59 +226,75 @@ WScript.Echo("\nTo continue, please press Enter...");
InstallerInput();
var cmake = 'cmake';
for (x in installerQuestions) {
for (x in installerQuestions)
{
var thisQuestion = installerQuestions[x];
cmake += ' ' + thisQuestion.cmake_argument();
}
cmake += ' "' + ScriptPath + '"';
var fixedScriptPath = ScriptPath.replace(/\\/g, '/');
cmake += ' "' + fixedScriptPath + '"';
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);
while (!cmake_shell.Status)
{
if (!cmake_shell.StdOut.AtEndOfStream)
WScript.Echo(cmake_shell.StdOut.ReadLine());
else if (!cmake_shell.StdErr.AtEndOfStream)
WScript.Echo(cmake_shell.StdErr.ReadLine());
}
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");
if (cmake_shell.ExitCode == 0)
{
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");
}
else
WScript.Echo("\nThere was an error attempting to run CMake! Check the above error message,\nand contact the Anope team if you are unsure how to proceed.\n");
// -----------------------------------------------------------------
// Functions
function FindAnopeVersion() {
if (!fso.FileExists(ScriptPath + 'version.log')) {
if (!fso.FileExists(ScriptPath + 'version.log'))
{
anopeVersion = 'Unknown';
return;
}
var versionLog = fso.OpenTextFile(ScriptPath + 'version.log');
while (!versionLog.atEndOfStream) {
while (!versionLog.atEndOfStream)
{
var versionLine = versionLog.readline();
var thisMatch = versionLine.replace('\n', '');
while (thisMatch.match(/\"/g)) {
while (thisMatch.match(/\"/g))
thisMatch = thisMatch.replace('"', '');
}
versionLine = thisMatch;
if (versionLine.match(/VERSION_MAJOR=/g)) {
if (versionLine.match(/VERSION_MAJOR=/g))
{
vMaj = versionLine.replace('VERSION_MAJOR=', '');
continue;
}
if (versionLine.match(/VERSION_MINOR=/g)) {
if (versionLine.match(/VERSION_MINOR=/g))
{
vMin = versionLine.replace('VERSION_MINOR=', '');
continue;
}
if (versionLine.match(/VERSION_PATCH=/g)) {
if (versionLine.match(/VERSION_PATCH=/g))
{
vPat = versionLine.replace('VERSION_PATCH=', '');
continue;
}
if (versionLine.match(/VERSION_EXTRA=/g)) {
if (versionLine.match(/VERSION_EXTRA=/g))
{
vExtra = versionLine.replace('VERSION_EXTRA=', '');
continue;
}
if (versionLine.match(/VERSION_BUILD=/g)) {
if (versionLine.match(/VERSION_BUILD=/g))
{
vBuild = versionLine.replace('VERSION_BUILD=', '');
continue;
}
+1 -3
View File
@@ -53,9 +53,7 @@ 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)
sort_list(LANG_SRCS)
# Iterate through the language files
foreach(LANG_L ${LANG_SRCS})
+1 -1
View File
@@ -71,7 +71,7 @@ tr: tr.l langcomp index
@./langcomp $@.l $@
langcomp: langcomp.c
@$(MAKEBIN) $(CC) $(CFLAGS) langcomp.c -o $@
$(MAKEBIN) $(CC) $(CFLAGS) langcomp.c -o $@
language.h: index Makefile
+364 -610
View File
File diff suppressed because it is too large Load Diff
+361 -578
View File
File diff suppressed because it is too large Load Diff
+366 -546
View File
File diff suppressed because it is too large Load Diff
+360 -605
View File
File diff suppressed because it is too large Load Diff
+1178 -1463
View File
File diff suppressed because it is too large Load Diff
+398 -645
View File
File diff suppressed because it is too large Load Diff
+355 -598
View File
File diff suppressed because it is too large Load Diff
+402 -728
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -1,6 +1,6 @@
/* Compiler for language definition files.
*
* (C) 2003-2009 Anope Team
* (C) 2003-2010 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -213,7 +213,7 @@ int main(int ac, char **av)
fprintf(stderr, "%s:%d: Out of memory!\n", filename, linenum);
return 2;
}
sprintf(strings[curstring] + i, "%s\n", line);
snprintf(strings[curstring] + i, strlen(line) + 2, "%s\n", line);
}
} else {
if ((curstring = stringnum(line)) < 0) {
+76 -76
View File
@@ -1,76 +1,76 @@
/* 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);
}
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;
}
/* Language stuff generator for win32.
*
* (C) 2003-2010 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);
}
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;
}
+380 -579
View File
File diff suppressed because it is too large Load Diff
+364 -634
View File
File diff suppressed because it is too large Load Diff
+348 -664
View File
File diff suppressed because it is too large Load Diff
+350 -548
View File
File diff suppressed because it is too large Load Diff
+358 -599
View File
File diff suppressed because it is too large Load Diff
+3 -1
View File
@@ -92,7 +92,8 @@ my @msgfilters = (
$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;
$msg =~ s/std::basic_string\<char\, .*?irc_char_traits, std::allocator\<char\> \>(\s+|)/irc::string/g;
$msg =~ s/std::basic_string\<char\, .*?ci_char_traits, std::allocator\<char\> \>(\s+|)/ci::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;
@@ -103,6 +104,7 @@ my @msgfilters = (
$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;
$msg =~ s/__gnu_cxx::__normal_iterator\<char\*, ci::string\>/ci::string::iterator/g;
return $msg;
} ],
);
+29 -11
View File
@@ -2,26 +2,35 @@
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)
# Don't include win32_memory.cpp, it's only required by Visual Studio to override it's override of the new/delete operators
remove_item_from_list(SRC_SRCS win32_memory.cpp)
# If not using Windows, don't include windows.cpp, as it's Windows-specific
if(NOT WIN32)
list(REMOVE_ITEM SRC_SRCS windows.cpp)
remove_item_from_list(SRC_SRCS windows.cpp)
endif(NOT WIN32)
if(CMAKE244_OR_BETTER)
list(SORT SRC_SRCS)
endif(CMAKE244_OR_BETTER)
sort_list(SRC_SRCS)
# 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}")
# Create an empty list to store extra include directories
set(EXTRA_INCLUDES)
# Iterate through all the source files
foreach(SRC ${SRC_SRCS})
# Temporary variable for the current source's include directories
set(TEMP_INCLUDES)
# Calculate the header file dependencies for the given source file
calculate_depends(${SRC})
calculate_depends(${SRC} TEMP_INCLUDES)
# If there were some extra include directories, add them to the list
if(TEMP_INCLUDES)
append_to_list(EXTRA_INCLUDES ${TEMP_INCLUDES})
endif(TEMP_INCLUDES)
endforeach(SRC)
# If there were extra include directories, remove the duplicates and add the directories to the include path
if(EXTRA_INCLUDES)
remove_list_duplicates(EXTRA_INCLUDES)
include_directories(${EXTRA_INCLUDES})
endif(EXTRA_INCLUDES)
# Under Windows, we also include a resource file to the build
if(WIN32)
@@ -43,12 +52,21 @@ if(WIN32)
endif(MINGW)
endif(WIN32)
# If compiling with Visual Studio, create a static library out of win32_memory.cpp to be included with everything else, needed to override it's override of new/delete operators
if(MSVC)
set_source_files_properties(win32_memory.cpp PROPERTIES LANGUAGE CXX COMPILE_FLAGS "${CXXFLAGS}")
add_library(win32_memory STATIC win32_memory.cpp)
set(WIN32_MEMORY win32_memory)
else(MSVC)
set(WIN32_MEMORY)
endif(MSVC)
# 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
# On Windows, also link Anope to the wsock32 and Ws2_32 library, as well as set the version
if(WIN32)
target_link_libraries(${PROGRAM_NAME} wsock32)
target_link_libraries(${PROGRAM_NAME} wsock32 Ws2_32 ${WIN32_MEMORY})
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
+24 -22
View File
@@ -1,12 +1,13 @@
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 \
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
OBJS = actions.o base64.o bots.o botserv.o channels.o chanserv.o command.o commands.o compat.o \
config.o encrypt.o hashcomp.o hostserv.o init.o ircd.o language.o log.o mail.o main.o \
memory.o memoserv.o messages.o misc.o modules.o nickserv.o operserv.o \
process.o protocol.o send.o servers.o sessions.o slist.o sockets.o opertype.o users.o module.o modulemanager.o configreader.o \
wildcard.o nickcore.o nickalias.o timers.o modes.o regchannel.o
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/messages.h ../include/services.h \
../include/timers.h ../include/extern.h \
../include/modules.h ../include/slist.h ../include/hashcomp.h
MAKEARGS = 'CFLAGS=${CFLAGS}' 'CC=${CC}' 'ANOPELIBS=${ANOPELIBS}' \
@@ -15,38 +16,40 @@ MAKEARGS = 'CFLAGS=${CFLAGS}' 'CC=${CC}' 'ANOPELIBS=${ANOPELIBS}' \
'TOUCH=${TOUCH}' 'SHELL=${SHELL}' \
'RUNGROUP=${RUNGROUP}' \
'SHARED=${SHARED}' 'MODULEFLAGS=${MODULEFLAGS}' \
'MAKEBIN=${MAKEBIN}'
'MAKEBIN=${MAKEBIN}' 'MYSQLDIR=${MYSQLDIR}'
.c.o:
@$(MAKEBIN) $(CC) $(CFLAGS) -I../include/ -c $<
$(MAKEBIN) $(CC) $(CFLAGS) -I../include/ -c $<
.cpp.o:
@$(MAKEBIN) $(CC) $(CFLAGS) -I../include/ -c $<
$(MAKEBIN) $(CC) $(CFLAGS) -I../include/ -c $<
all: services
distclean: spotless
distclean_modules: clean_modules spotless
services: $(OBJS) mod_version
@$(MAKEBIN) $(CC) $(CFLAGS) $(OBJS) $(ANOPELIBS) $(MLIBS) -o $@ $(LDFLAGS)
services: $(OBJS)
$(MAKEBIN) $(CC) $(CFLAGS) $(OBJS) $(ANOPELIBS) $(MLIBS) -o $@ $(LDFLAGS)
$(OBJS): Makefile
modes.o: modes.cpp $(INCLUDES)
timers.o: timers.cpp $(INCLUDES)
nickcore.o: nickcore.cpp $(INCLUDES)
nickalias.o: nickalias.cpp $(INCLUDES)
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)
command.o: command.cpp $(INCLUDES)
commands.o: commands.c $(INCLUDES)
compat.o: compat.c $(INCLUDES)
config.o: config.c $(INCLUDES)
datafiles.o: datafiles.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)
log.o: log.c $(INCLUDES)
@@ -59,21 +62,20 @@ 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)
operserv.o: operserv.c $(INCLUDES)
process.o: process.c $(INCLUDES)
protocol.o: protocol.cpp $(INCLUDES)
regchannel.o: regchannel.cpp $(INCLUDES)
send.o: send.c $(INCLUDES)
servers.o: servers.c $(INCLUDES)
sessions.o: sessions.c $(INCLUDES)
slist.o: slist.c $(INCLUDES)
sockutil.o: sockutil.c $(INCLUDES)
timeout.o: timeout.c $(INCLUDES)
sockets.o: sockets.cpp $(INCLUDES)
opertype.o: opertype.cpp $(INCLUDES)
users.o: users.c $(INCLUDES)
vsnprintf.o: vsnprintf.c $(INCLUDES)
mod_version: mod_version.c $(INCLUDES)
@$(MAKEBIN) $(CC) $(CDEFS) $(CFLAGS) $(MODULEFLAGS) -I../include/ -c mod_version.c
wildcard.o: wildcard.cpp $(INCLUDES)
modules: DUMMY
@modules/configure modules
@@ -114,8 +116,8 @@ install: services
$(INSTALL) bin/anoperc $(INSTDIR)/bin/anoperc
test -d ${INSTDIR}/data || mkdir ${INSTDIR}/data
(cd ../lang ; $(MAKE) install)
$(CP) ../data/* $(INSTDIR)/data
$(INSTALL) bin/mydbgen $(INSTDIR)/data/mydbgen
$(CP) ../data/*.* $(INSTDIR)/data
$(INSTALL) bin/mydbgen $(INSTDIR)/bin/mydbgen
test -d $(INSTDIR)/data/backups || mkdir $(INSTDIR)/data/backups
test -d $(INSTDIR)/data/logs || mkdir $(INSTDIR)/data/logs
@if [ "$(INSTDIR)/data/modules" ] ; then \
+65 -159
View File
@@ -1,6 +1,6 @@
/* Various routines to perform simple actions.
*
* (C) 2003-2009 Anope Team
* (C) 2003-2010 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -20,24 +20,26 @@
* Note a bad password attempt for the given user. If they've used up
* their limit, toss them off.
* @param u the User to check
* @return void
* @return true if the user was killed, otherwise false
*/
void bad_password(User * u)
bool bad_password(User *u)
{
time_t now = time(NULL);
if (!u || !BadPassLimit) {
return;
if (!u || !Config.BadPassLimit)
return false;
if (Config.BadPassTimeout > 0 && u->invalid_pw_time > 0 && u->invalid_pw_time < now - Config.BadPassTimeout)
u->invalid_pw_count = 0;
++u->invalid_pw_count;
u->invalid_pw_time = now;
if (u->invalid_pw_count >= Config.BadPassLimit)
{
kill_user("", u->nick, "Too many invalid passwords");
return true;
}
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");
}
return false;
}
/*************************************************************************/
@@ -49,27 +51,21 @@ 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(const std::string &source, const std::string &user, const std::string &reason)
{
char buf[BUFSIZE];
if (!user || !*user) {
if (user.empty())
return;
}
if (!source || !*source) {
source = ServerName;
}
if (!reason) {
reason = "";
}
snprintf(buf, sizeof(buf), "%s (%s)", source, reason);
std::string real_source = source.empty() ? Config.ServerName : source;
ircdproto->SendSVSKill(source, user, buf);
snprintf(buf, sizeof(buf), "%s (%s)", source.c_str(), reason.c_str());
if (!ircd->quitonkill && finduser(user)) {
ircdproto->SendSVSKill(findbot(source), finduser(user), buf);
if (!ircd->quitonkill && finduser(user))
do_kill(user, buf);
}
}
/*************************************************************************/
@@ -80,44 +76,42 @@ void kill_user(const char *source, const char *user, const char *reason)
* @param reason for the sqline
* @return void
*/
void sqline(char *mask, char *reason)
void sqline(const std::string &mask, const std::string &reason)
{
int i;
Channel *c, *next;
const char *av[3];
struct c_userlist *cu, *cunext;
if (ircd->chansqline) {
if (*mask == '#') {
if (ircd->chansqline)
{
if (mask[0] == '#')
{
ircdproto->SendSQLine(mask, reason);
for (i = 0; i < 1024; i++) {
for (c = chanlist[i]; c; 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)) {
if (!Anope::Match(c->name, mask, false))
continue;
}
for (cu = c->users; cu; cu = cunext) {
cunext = cu->next;
if (is_oper(cu->user)) {
for (CUserList::iterator it = c->users.begin(); it != c->users.end();)
{
UserContainer *uc = *it;
++it;
if (is_oper(uc->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);
c->Kick(NULL, uc->user, "%s", reason.c_str());
}
}
}
} else {
ircdproto->SendSQLine(mask, reason);
}
} else {
ircdproto->SendSQLine(mask, reason);
else
ircdproto->SendSQLine(mask, reason);
}
else
ircdproto->SendSQLine(mask, reason);
}
/*************************************************************************/
@@ -128,138 +122,50 @@ void sqline(char *mask, char *reason)
* @param nick to remove the ban for
* @return void
*/
void common_unban(ChannelInfo * ci, char *nick)
void common_unban(ChannelInfo *ci, const std::string &nick)
{
const 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 (!(u = finduser(nick))) {
return;
}
if (!ci->c->bans || (ci->c->bans->count == 0))
if (!ci || !ci->c || nick.empty())
return;
if (u->hostip == NULL) {
if (!(u = finduser(nick)))
return;
if (!ci->c->bans || !ci->c->bans->count)
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) {
if (host)
u->hostip = sstrdup(host);
}
} else {
host = sstrdup(u->hostip);
}
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;
}
for (ban = ci->c->bans->entries; ban; ban = next) {
if (ircd->svsmode_unban)
ircdproto->SendBanDel(ci->c, nick);
else
{
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;
do_cmode(whosends(ci)->nick, ac, av);
}
if (entry_match(ban, u->nick.c_str(), u->GetIdent().c_str(), u->host, ip) || entry_match(ban, u->nick.c_str(), u->GetIdent().c_str(), u->GetDisplayedHost().c_str(), ip))
ci->c->RemoveMode(NULL, CMODE_BAN, ban->mask);
}
}
/* host_resolve() sstrdup us this info so we gotta free it */
if (host) {
if (host)
delete [] host;
}
}
/*************************************************************************/
/**
* Prepare to set SVSMODE and update internal user modes
* @param u user to apply modes to
* @param modes the modes to set on the user
* @param arg the arguments for the user modes
* @return void
*/
void common_svsmode(User * u, const char *modes, const char *arg)
{
int ac = 1;
const char *av[2];
av[0] = modes;
if (arg) {
av[1] = arg;
ac++;
}
ircdproto->SendSVSMode(u, ac, av);
ircdproto->ProcessUsermodes(u, ac, av);
}
/*************************************************************************/
/**
* Get the vhost for the user, if set else return the host, on ircds without
* vhost this returns the host
* @param u user to get the vhost for
* @return vhost
*/
char *common_get_vhost(User * u)
{
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;
}
/*************************************************************************/
/**
* Get the vident for the user, if set else return the ident, on ircds without
* vident this returns the ident
* @param u user to get info the vident for
* @return vident
*/
char *common_get_vident(User * u)
{
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;
}
+125 -119
View File
@@ -1,6 +1,6 @@
/* base64 routines.
*
* (C) 2003-2009 Anope Team
* (C) 2003-2010 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -18,16 +18,16 @@
#include "services.h"
static char *int_to_base64(long);
static long base64_to_int(char *);
static long base64_to_int(const char *);
const char* base64enc(long i)
const char *base64enc(long i)
{
if (i < 0)
return ("0");
return "0";
return int_to_base64(i);
}
long base64dec(char* b64)
long base64dec(const char *b64)
{
if (b64)
return base64_to_int(b64);
@@ -35,7 +35,6 @@ long base64dec(char* b64)
return 0;
}
static const char Base64[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
static const char Pad64 = '=';
@@ -103,14 +102,15 @@ static const char Pad64 = '=';
characters followed by one "=" padding character.
*/
int b64_encode(char *src, size_t srclength, char *target, size_t targsize)
int b64_encode(const 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;
while (2 < srclength) {
while (2 < srclength)
{
input[0] = *src++;
input[1] = *src++;
input[2] = *src++;
@@ -122,7 +122,7 @@ int b64_encode(char *src, size_t srclength, char *target, size_t targsize)
output[3] = input[2] & 0x3f;
if (datalength + 4 > targsize)
return (-1);
return -1;
target[datalength++] = Base64[output[0]];
target[datalength++] = Base64[output[1]];
target[datalength++] = Base64[output[2]];
@@ -130,10 +130,11 @@ int b64_encode(char *src, size_t srclength, char *target, size_t targsize)
}
/* Now we worry about padding. */
if (0 != srclength) {
if (srclength)
{
/* Get what's left. */
input[0] = input[1] = input[2] = '\0';
for (i = 0; i < srclength; i++)
for (i = 0; i < srclength; ++i)
input[i] = *src++;
output[0] = input[0] >> 2;
@@ -141,7 +142,7 @@ int b64_encode(char *src, size_t srclength, char *target, size_t targsize)
output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);
if (datalength + 4 > targsize)
return (-1);
return -1;
target[datalength++] = Base64[output[0]];
target[datalength++] = Base64[output[1]];
if (srclength == 1)
@@ -151,9 +152,9 @@ int b64_encode(char *src, size_t srclength, char *target, size_t targsize)
target[datalength++] = Pad64;
}
if (datalength >= targsize)
return (-1);
target[datalength] = '\0'; /* Returned value doesn't count \0. */
return (datalength);
return -1;
target[datalength] = '\0'; /* Returned value doesn't count \0. */
return datalength;
}
/* skips all whitespace anywhere.
@@ -170,7 +171,8 @@ int b64_decode(const char *src, char *target, size_t targsize)
state = 0;
tarindex = 0;
while ((ch = *src++) != '\0') {
while ((ch = *src++) != '\0')
{
if (isspace(ch)) /* Skip whitespace anywhere. */
continue;
@@ -178,51 +180,54 @@ int b64_decode(const char *src, char *target, size_t targsize)
break;
pos = const_cast<char *>(strchr(Base64, ch));
if (pos == 0) /* A non-base64 character. */
return (-1);
if (!pos) /* 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 (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();
}
}
@@ -231,53 +236,57 @@ int b64_decode(const char *src, char *target, size_t targsize)
* on a byte boundary, and/or with erroneous trailing characters.
*/
if (ch == Pad64) { /* We got a pad char. */
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);
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 (; 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 (; 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);
/*
* 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])
return -1;
}
} else {
}
else
{
/*
* We ended by seeing the end of the string. Make sure we
* have no partial bytes lying around.
*/
if (state != 0)
return (-1);
if (state)
return -1;
}
return (tarindex);
return tarindex;
}
const char* encode_ip(unsigned char *ip)
@@ -290,13 +299,14 @@ const char* encode_ip(unsigned char *ip)
if (!ip)
return "*";
if (strchr(reinterpret_cast<char *>(ip), ':')) {
if (strchr(reinterpret_cast<char *>(ip), ':'))
return NULL;
} else {
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);
b64_encode(reinterpret_cast<const char *>(&cp), sizeof(struct in_addr), buf, 25);
}
return buf;
}
@@ -309,9 +319,9 @@ int decode_ip(const char *buf)
b64_decode(buf, targ, 25);
ia = *reinterpret_cast<struct in_addr *>(targ);
if (len == 24) { /* IPv6 */
if (len == 24) /* IPv6 */
return 0;
} else if (len == 8) /* IPv4 */
else if (len == 8) /* IPv4 */
return ia.s_addr;
else /* Error?? */
return 0;
@@ -364,28 +374,28 @@ static char *int_to_base64(long val)
* if the value is then too large it can easily lead to
* a buffer underflow and thus to a crash. -- Syzop
*/
if (val > 2147483647L) {
if (val > 2147483647L)
abort();
}
do {
do
{
base64buf[--i] = int6_to_base64_map[val & 63];
}
while (val >>= 6);
} while (val >>= 6);
return base64buf + i;
}
static long base64_to_int(char *b64)
static long base64_to_int(const char *b64)
{
int v = base64_to_int6_map[static_cast<unsigned char>(*b64++)];
int v = base64_to_int6_map[static_cast<const unsigned char>(*b64++)];
if (!b64)
return 0;
while (*b64) {
while (*b64)
{
v <<= 6;
v += base64_to_int6_map[static_cast<unsigned char>(*b64++)];
v += base64_to_int6_map[static_cast<const unsigned char>(*b64++)];
}
return v;
@@ -393,18 +403,14 @@ static long base64_to_int(char *b64)
long base64dects(const char *ts)
{
char *token;
long value;
if (!ts) {
if (!ts)
return 0;
}
token = myStrGetToken(ts, '!', 1);
if (!token) {
char *token = myStrGetToken(ts, '!', 1);
if (!token)
return strtoul(ts, NULL, 10);
}
value = base64dec(token);
long value = base64dec(token);
delete [] token;
return value;
}
+2 -6
View File
@@ -1,12 +1,8 @@
# 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
install (PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/anoperc ${CMAKE_CURRENT_SOURCE_DIR}/mydbgen
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)
-499
View File
@@ -1,499 +0,0 @@
#!/usr/bin/env perl
# ====================================================================
# anomgr: Anope Manager. Used to manage anope revision on SubVersion.
#
# For usage, see the usage subroutine or run the script with no
# command line arguments.
#
# $Id$
#
# ====================================================================
require 5.6.0;
use strict;
use Getopt::Std;
use Net::FTP;
use Cwd;
######################################################################
# Configuration section.
my $myver="1.0";
my $svnrev="http://www.zero.org/anosvn.php";
my $fhint="version.log";
# Default values, change or use environment variables instead.
my $copy="anope";
my $svnuser="evil_closet_monkey";
my $svnpath="/usr/bin";
my $svnroot="svn://svn.anope.org/$copy";
my $editor="/usr/bin/mcedit";
# Environment variables SVNBINDIR and SVNROOT override the above
# hardcoded values.
$svnuser="$ENV{SVNUSER}" if ($ENV{SVNUSER});
$svnpath="$ENV{SVNBINDIR}" if ($ENV{SVNBINDIR});
$svnroot="$ENV{SVNROOT}" if ($ENV{SVNROOT});
$editor="$ENV{EDITOR}" if ($ENV{EDITOR});
# Svnlook path.
my $svnlook = "$svnpath/svnlook";
# Svn path.
my $svn = "$svnpath/svn";
# wget path. Need to change to a perl module instead...
my $wget = "$svnpath/wget";
my (
$rev,
$branch,
$proto,
$tag,
$ftp,
$dst,
$ver_major,
$ver_minor,
$ver_patch,
$ver_build,
$ver_revision,
$ver_comment,
$svn_comment,
$cver,
$nver,
$ctrlfile,
$tmpfile,
@source,
%opt
);
{
my $ok = 1;
foreach my $program ($svnlook, $svn, $editor)
{
if (-e $program)
{
unless (-x $program)
{
warn "$0: required program `$program' is not executable, ",
"edit $0.\n";
$ok = 0;
}
}
else
{
warn "$0: required program `$program' does not exist, edit $0.\n";
$ok = 0;
}
}
exit 1 unless $ok;
}
sub usage()
{
# More features to add:
# --diff N:M to produce a diff between revisions
# --bugs CLI method to add bug number to the commit message
# --mesg CLI methos to add the commit message
# --create-branch to create a branch
# --create-tag to create a tag
# --switch to switch between branches/tags
print "Usage: $0 <-g | -p | -f | -l> [-r revision | -b branch | -t tag | -P proto] <destination>\n";
print " Operations:\n";
print " -g Get Operation\n";
print " -p Put Operation\n";
print " -f[tar|diff] FTP Operation, retrieve latest tar or diff\n";
print " -l List Operation, for valid selector options\n";
print " Selector:\n";
print " -r revision Retrieve by revision number\n";
print " -b branch Retrieve by branch name\n";
print " -t tag Retrieve by tag name\n";
print " -P proto Retrieve by prototype name\n";
print " Destination:\n";
print " The working copy to perform the operation in or to. The script will \n";
print " try to guess where that is, unless you provide a specific path.\n";
exit;
}
sub banner() {
print "Anope Source Managemnt Utility - Version $myver\n\n";
}
sub getans {
my $ans;
while (! (($ans =~ /y/) || ($ans =~ /n/))) {
print "*** Ready to continue? (y/n): ";
$ans = <STDIN>;
chomp($ans);
$ans = lc($ans);
# $ans = &getans();
}
# return $ans;
return ($ans eq "y") ? 1 : 0
}
sub find_conflict() {
my $filename=shift;
my $retval=0;
open (IN2, "$filename") || die "Can't open $filename\n";
while (<IN2>) {
if (/^<<<<<<</) {
$retval=1;
}
}
close(IN2);
return $retval;
}
sub do_lst() {
my $out;
print "*** BRANCHES:\n";
print "trunk (DEFAULT)\n";
open (IN, "$svn list $svnroot/branches|");
while (<IN>) {
if (! /proto/) {
$out="$_";
$out =~ s/\/$//;
print "$out";
}
}
close(IN);
print "\n*** PROTOTYPES:\n";
open (IN, "$svn list $svnroot/branches/proto|");
while (<IN>) {
$out="$_";
$out =~ s/\/$//;
chomp($out);
if (/bahamut18/) {
$out .= "\t(OBSOLETE)";
} elsif (/capab/) {
$out .= "\t(OBSOLETE)";
}
print "$out\n";
}
close(IN);
print "\n*** TAGS:\n";
open (IN, "$svn list $svnroot/tags|");
while (<IN>) {
$out="$_";
$out =~ s/\/$//;
print "$out";
}
close(IN);
print "\n";
}
sub do_ftp() {
my $ftpc;
$ftpc = Net::FTP->new("ftp.zero.org");
$ftpc->login("ftp","-anonymou@");
$ftpc->cwd("/incoming");
if ( lc($ftp) eq "tar" ) {
print "Retrieving latest tar ball...\n";
$ftpc->get("anope.tgz");
} elsif ( lc($ftp) eq "diff" ) {
print "Retrieving latest patch file...\n";
$ftpc->get("anope.diff");
} else {
print "Unknown type $ftp, aborting...\n";
}
$ftpc->quit();
}
sub do_get() {
my $options = "" ; # Options to be passed to the svn command
my $selector = "" ; # Selector to be passed to the svn command
if ($rev) {
$options .= "-r $rev";
$selector = "trunk";
$copy = $copy . "-$rev";
} elsif ($tag) {
$selector = "tags/$tag";
$copy = "$tag";
} elsif ($branch) {
$selector = "branches/$branch";
$copy = $copy . "-$branch";
} elsif ($proto) {
$selector = "branches/proto/$proto";
$copy = "$proto";
} else {
$selector = "trunk";
}
if ($dst eq undef) {
my $cwd = &Cwd::cwd();
if (-f "$cwd/$fhint") {
system("$svn update $options $cwd");
} elsif (-f "$cwd/$copy/$fhint") {
system("$svn update $options $cwd/$copy");
} else {
system("$svn checkout $svnroot/$selector $options $cwd/$copy");
}
} else {
$dst = &Cwd::cwd() if ($dst eq "\.") ;
if (-f "$dst/$fhint") {
system("$svn update $options $dst");
} else {
system("$svn checkout $svnroot/$selector $options $dst");
}
}
}
sub do_put() {
if ($dst eq undef) {
my $cwd = &Cwd::cwd();
if (-f "$cwd/$fhint") {
$dst = "$cwd";
} elsif (-f "$cwd/$copy/$fhint") {
$dst .= "$cwd/$copy";
} else {
print "Error: Unable to determine your working copy location.\n";
exit;
}
} else {
$dst = &Cwd::cwd() if ($dst eq "\.") ;
if (! -f "$dst/$fhint") {
print "Error: Unable to determine your working copy location.\n";
exit;
}
}
# Check to see if we need to update our working copy first.
my $nupdate;
open (IN, "$svn status --show-updates --verbose $dst|");
while (<IN>) {
if (/\*/) {
$nupdate .= "$_";
}
}
close(IN);
if ($nupdate ne undef) {
print "*** Warning: There are files modified in the repository that need\n";
print "*** to be merged back to your working copy before the commit can\n";
print "*** take place. These files are:\n";
print $nupdate;
print "Please use: $0 -g $dst\n";
exit;
}
# Get a prelim diff of the changes...
my $dcount=0;
my $conflict;
# open (IN, "$svn diff $dst|");
open (IN, "$svn status $dst|");
while (<IN>) {
if (!/^\?/) {
$dcount++;
}
if (/^C/) {
$_ =~ s/^C\s+//;
chomp($_);
# I don't want to use grep. But my find_conflict sub
# does not seem to work :( Too bad
if (`grep "^<<<<<<<" $_`) {
$conflict .= "$_\n" ;
} else {
system("$svn resolved $_");
}
}
}
close(IN);
if ($dcount == 0) {
print "*** Warning: There are no modified files to be commited. Are you\n";
print "*** sure you are in the right working copy? Verify changes with:\n";
print "*** $svn diff $dst\n";
exit;
}
if ($conflict ne undef) {
print "*** Warning: There are merge conflicts to be resolved! Please take\n";
print "*** a look at the following files and resolve them manually:\n\n";
print "$conflict\n";
exit;
}
$ctrlfile = "$dst/$fhint";
# Grab the current revision number. Clunky way, I know!
# $ver_revision=`$wget -qO - $svnrev`;
$ver_revision=`svnversion . | sed "s/.*:\\\(.*\\\)/\\1/" | cut -d 'M' -f 1 | cut -d 'S' -f 1`;
chomp($ver_revision);
unless ($ver_revision =~ /^\d+/ and $ver_revision > 0)
{
print "*** Error: Got bogus result $ver_revision from $svnrev.\n";
exit;
}
$ver_revision++;
open (REV, "$ctrlfile") || die "Can't open $ctrlfile\n";
while (<REV>) {
push (@source, $_);
$ver_major = $_ if (/VERSION_MAJOR/);
$ver_minor = $_ if (/VERSION_MINOR/);
$ver_patch = $_ if (/VERSION_PATCH/);
$ver_build = $_ if (/VERSION_BUILD/);
}
close(REV);
my $junk;
($junk, $ver_major) = split('"', $ver_major);
($junk, $ver_minor) = split('"', $ver_minor);
($junk, $ver_patch) = split('"', $ver_patch);
($junk, $ver_build) = split('"', $ver_build);
$cver = "$ver_major.$ver_minor.$ver_patch ($ver_build)";
$nver = "$ver_major.$ver_minor.$ver_patch ($ver_revision)";
# Greet the developer
banner();
# Check to see if we need to update our working copy first.
my $svnrepo;
open (IN, "$svn info|");
while (<IN>) {
if (/URL/) {
$svnrepo = "$_";
$svnrepo =~ s/URL: //;
}
}
close(IN);
print "*** Repository : $svnroot \n";
print "*** Working copy : $dst \n" ;
print "*** Current ver. : $cver \n";
print "*** Updated ver. : $nver \n";
print "*** Files Changed: $dcount (before indent and version change)\n";
die ("Aborting...\n") unless &getans();
# Need to add a clause for -c "comment" and -b "buglist"
# Get developers input for commit
$tmpfile=".commit";
open (OUT, ">$tmpfile") or die ("*** Error! Unable to open $tmpfile file\n");
print OUT "# Anope commit utility. Please use this template for your commits.
# Add Bugzilla bugs separated by spaces. The note part is free form.
BUILD : $nver
BUGS :
NOTES : ";
close(OUT);
system("$editor $tmpfile");
my $tmp_comment="";
$ver_comment="#\n";
$svn_comment="";
open (IN, "$tmpfile") or die ("*** Error! Unable to open $tmpfile file\n");
while (<IN>) {
if ( !/^#/) {
$tmp_comment.="$_";
chomp($_);
$_ =~ s/\t/ /g;
$ver_comment.="# $_\n";
$svn_comment.="$_ ";
}
}
close(IN);
$svn_comment =~ s/\s\s+/ /g;
# Confirm the commit one last time...
print "*** Ready to commit, please verify:\n";
print "\n$tmp_comment\n";
die ("Aborting...\n") unless &getans();
print "*** Running Indent...\n";
my $prefix=".";
if (-d "src") {
$prefix="src";
}
system("indent -kr -nut $prefix/*.c");
system("rm -f $prefix/*~");
# if (-d "src/core") {
# system("indent -kr -nut src/core/*.c");
# system("rm -f src/core/*~");
# }
# if (-d "src/protocol") {
# system("indent -kr -nut src/protocol/*.c");
# system("rm -f src/protocol/*~");
# }
print "*** Bumping the revision number...\n";
# Re-write the control file
open(OUT, ">$ctrlfile") or die ("*** Error! Unable to open $ctrlfile ... aborting");
foreach (@source) {
if (/^VERSION_BUILD/) {
$_ =~ s/\"\d+\"/\"$ver_revision\"/;
} elsif (/# \$Log\$/) {
$_ .= "$ver_comment";
}
print OUT $_;
}
close(OUT);
print "*** Starting the upload...\n\n";
my $rval=system("$svn commit $dst --username='$svnuser' --message '$svn_comment'");
if ( $rval ) {
print "*** Error: Unable to complete commit. Rolling back....\n\n";
system("$svn revert $ctrlfile");
}
}
{
usage() if (! @ARGV);
my $opt = 'hgplf:r:b:t:P:';
getopts ("$opt", \%opt) or usage();
usage() if $opt{h};
usage() if ($opt{g} && $opt{p});
usage() if ($opt{g} && $opt{f});
usage() if ($opt{g} && $opt{l});
usage() if ($opt{p} && $opt{f});
usage() if ($opt{p} && $opt{l});
usage() if ($opt{f} && $opt{l});
usage() if ($opt{r} && $opt{b});
usage() if ($opt{r} && $opt{t});
usage() if ($opt{b} && $opt{t});
usage() if ($opt{b} && $opt{P});
$rev = $opt{r} ;
$branch = $opt{b} ;
$tag = $opt{t} ;
$ftp = $opt{f} ;
$proto = $opt{P} ;
$dst = shift;
if ($rev ne undef) {
unless ($rev =~ /^\d+/ and $rev > 0)
{
print "*** Error: Revision number '$rev' must be an integer > 0.\n";
exit;
}
}
do_lst() if $opt{l};
do_ftp() if $opt{f};
do_get() if $opt{g};
do_put() if $opt{p};
print "*** Done!\n";
}
+1 -1
View File
@@ -2,7 +2,7 @@
#
# Configuration script for Services
#
# (C) 2003-2008 Anope Team
# (C) 2003-2010 Anope Team
# Contact us at team@anope.org
#
# Please read COPYING and README for further details.
+10 -76
View File
@@ -19,13 +19,7 @@ else
n="-n"
fi
# Fix for bug 10
for try in HOME/services anope/data ../data data .. .
do
if [ -f "$try/$DBSQL" ]; then
DBFILE="$try/$DBSQL"
fi
done
DBFILE=../data/$DBSQL
if [ ! -f "./$DBFILE" ] ; then
echo "Error: Required file $DBSQL was not found!";
@@ -117,73 +111,11 @@ if test "$?" = "1" ; then
FAILED="$FAILED 'schema creation'"
fi
else
# Introduced on Anope 1.6.0 -> Table anope_info
$MYSQL -Bs -e "show tables like 'anope_info'" | grep -q anope_info
if test "$?" = "1" ; then
echo -n "Unable to find Anope info table, creating... "
echo "CREATE TABLE anope_info (version int, date datetime) TYPE=MyISAM" > $TFILE
mysql -h$SQLHOST -u$SQLUSER $SQLPASS_PREFIX$SQLPASS $SQLDB < $TFILE >/dev/null 2>&1
if test "$?" = "0" ; then
echo "done!"
else
echo "failed!"
FAILED="$FAILED 'anope_info table'"
fi
else
LVER="$($MYSQL -sB -e "select version from anope_info")"
if test "x$LVER" = "x" ; then
LVER=0
fi
fi
# Introduced on Anope 1.5.14.5 -> anope_cs_info.memomax
$MYSQL -Bs -e "describe anope_cs_info memomax" 2> /dev/null | grep -q memomax
if test "$?" = "1" ; then
echo -n "Unable to find anope_cs_info.memomax, altering... "
echo "ALTER TABLE anope_cs_info ADD memomax smallint unsigned NOT NULL default 0" > $TFILE
mysql -h$SQLHOST -u$SQLUSER $SQLPASS_PREFIX$SQLPASS $SQLDB < $TFILE >/dev/null 2>&1
if test "$?" = "0" ; then
echo "done!"
else
echo "failed!"
FAILED="$FAILED 'anope_cs_info.memomax alter'"
fi
fi
# Introduced on Anope 1.5.14.5 -> anope_cs_info.ttb
$MYSQL -Bs -e "describe anope_cs_info ttb" 2> /dev/null | grep -q ttb
if test "$?" = "1" ; then
echo -n "Unable to find anope_cs_info.ttb, altering... "
echo "ALTER TABLE anope_cs_info ADD ttb smallint NOT NULL default 0" > $TFILE
mysql -h$SQLHOST -u$SQLUSER $SQLPASS_PREFIX$SQLPASS $SQLDB < $TFILE >/dev/null 2>&1
if test "$?" = "0" ; then
echo "done!"
else
echo "failed!"
FAILED="$FAILED 'anope_cs_info.ttb alter'"
fi
fi
# Introduced on Anope 1.7.7 -> status smallint to inst unsigned.
echo "Blindly altering status for bigger capacity... "
echo "ALTER TABLE anope_ns_alias CHANGE status status int(11) unsigned NOT NULL default 0" > $TFILE
mysql -h$SQLHOST -u$SQLUSER $SQLPASS_PREFIX$SQLPASS $SQLDB < $TFILE >/dev/null 2>&1
# Introduced on Anope 1.7.8 (620) proxy scanner removed.
echo "Removing proxy scanner cache... "
echo "DROP TABLE IF EXISTS anope_os_cache" > $TFILE
mysql -h$SQLHOST -u$SQLUSER $SQLPASS_PREFIX$SQLPASS $SQLDB < $TFILE >/dev/null 2>&1
echo "done!"
fi
echo ""
# Insert initial version number. This will have to be redesigned for 1.7
if [ $LVER -ne $SVER ]; then
echo -n "Inserting initial version number... "
$MYSQL -Bs -e "delete from anope_info"
@@ -200,19 +132,21 @@ fi
rm -f $TFILE
if test "x$FAILED" = "x" ; then
# Try to find out more about this installation
SQLSOCK="$(mysql_config --socket 2> /dev/null)"
SQLPORT="$(mysql_config --port 2> /dev/null)"
echo ""
echo "Your MySQL setup is complete and your Anope schema is up to date. Make"
echo "sure you configure MySQL on your services.conf file prior to launching"
echo "Anope with MySQL support. Your configuration values are:"
echo ""
echo "MysqlHost \"$SQLHOST\""
echo "MysqlUser \"$SQLUSER\""
echo "MysqlPass \"$SQLPASS\""
echo "MysqlName \"$SQLDB\""
echo "MysqlSock \"$SQLSOCK\""
echo "MysqlPort \"$SQLPORT\""
echo "mysql"
echo "{"
echo " database = \"$SQLDB\""
echo " server = \"$SQLHOST\""
echo " username = \"$SQLUSER\""
echo " password = \"$SQLPASS\""
echo " port = \"$SQLPORT\""
echo " updatedelay = \"60\""
echo "}"
echo ""
else
echo "The following operations failed:"
+82 -49
View File
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2008-2009 Robin Burchell <w00t@inspircd.org>
* Copyright (C) 2008-2009 Anope Team <team@anope.org>
* Copyright (C) 2008-2010 Robin Burchell <w00t@inspircd.org>
* Copyright (C) 2008-2010 Anope Team <team@anope.org>
*
* Please read COPYING and README for further details.
*
@@ -10,28 +10,64 @@
*/
#include "services.h"
#include "modules.h"
BotInfo::BotInfo(const char *nnick)
BotInfo::BotInfo(const std::string &nnick, const std::string &nuser, const std::string &nhost, const std::string &nreal)
{
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->nick = nnick;
this->user = nuser;
this->host = nhost;
this->real = nreal;
this->lastmsg = this->created = time(NULL);
this->uid = ts6_uid_retrieve();
this->cmdTable = NULL;
}
++nbots;
this->chancount = 0;
ci::string ci_nick(nnick.c_str());
if (Config.s_ChanServ && ci_nick == Config.s_ChanServ)
{
this->cmdTable = CHANSERV;
this->SetFlag(BI_CHANSERV);
}
else if (Config.s_BotServ && ci_nick == Config.s_BotServ)
{
this->cmdTable = BOTSERV;
this->SetFlag(BI_BOTSERV);
}
else if (Config.s_HostServ && ci_nick == Config.s_HostServ)
{
this->cmdTable = HOSTSERV;
this->SetFlag(BI_HOSTSERV);
}
else if (Config.s_OperServ && ci_nick == Config.s_OperServ)
{
this->cmdTable = OPERSERV;
this->SetFlag(BI_OPERSERV);
}
else if (Config.s_MemoServ && ci_nick == Config.s_MemoServ)
{
this->cmdTable = MEMOSERV;
this->SetFlag(BI_MEMOSERV);
}
else if (Config.s_NickServ && ci_nick == Config.s_NickServ)
{
this->cmdTable = NICKSERV;
this->SetFlag(BI_NICKSERV);
}
else if (Config.s_GlobalNoticer && ci_nick == Config.s_GlobalNoticer)
{
this->SetFlag(BI_GLOBAL);
}
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;
// If we're synchronised with the uplink already, call introduce_user() for this bot.
if (serv_uplink && serv_uplink->sync == SSYNC_DONE)
{
ircdproto->SendClientIntroduction(this->nick, this->user, this->host, this->real, ircd->pseudoclient_mode, this->uid);
ircdproto->SendSQLine(this->nick, "Reserved for services");
}
}
BotInfo::~BotInfo()
@@ -39,7 +75,7 @@ BotInfo::~BotInfo()
int i;
ChannelInfo *ci;
for (i = 0; i < 256; i++)
for (i = 0; i < 256; ++i)
for (ci = chanlists[i]; ci; ci = ci->next)
if (ci->bi == this)
ci->bi = NULL;
@@ -49,14 +85,9 @@ BotInfo::~BotInfo()
if (this->prev)
this->prev->next = this->next;
else
botlists[tolower(*this->nick)] = this->next;
botlists[tolower(this->nick[0])] = this->next;
nbots--;
delete [] this->nick;
delete [] this->user;
delete [] this->host;
delete [] this->real;
--nbots;
}
@@ -67,11 +98,9 @@ void BotInfo::ChangeNick(const char *newnick)
if (this->prev)
this->prev->next = this->next;
else
botlists[tolower(*this->nick)] = this->next;
botlists[tolower(this->nick[0])] = this->next;
if (this->nick)
delete [] this->nick;
this->nick = sstrdup(newnick);
this->nick = newnick;
insert_bot(this);
}
@@ -81,39 +110,43 @@ void BotInfo::RejoinAll()
int i;
ChannelInfo *ci;
for (i = 0; i < 256; i++)
for (i = 0; i < 256; ++i)
for (ci = chanlists[i]; ci; ci = ci->next)
if (ci->bi == this && ci->c && (ci->c->usercount >= BSMinUsers))
if (ci->bi == this && ci->c && (ci->c->users.size() >= Config.BSMinUsers))
bot_join(ci);
}
void BotInfo::Assign(User *u, ChannelInfo *ci)
{
EventReturn MOD_RESULT = EVENT_CONTINUE;
FOREACH_RESULT(I_OnBotAssign, OnBotAssign(u, ci, this));
if (MOD_RESULT == EVENT_STOP)
return;
if (ci->bi)
{
if (u)
ci->bi->UnAssign(u, ci);
else
ci->bi->UnAssign(NULL, ci);
}
ci->bi->UnAssign(u, ci);
ci->bi = this;
this->chancount++;
if (ci->c && ci->c->usercount >= BSMinUsers)
++this->chancount;
if (ci->c && ci->c->users.size() >= Config.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);
EventReturn MOD_RESULT = EVENT_CONTINUE;
FOREACH_RESULT(I_OnBotUnAssign, OnBotUnAssign(u, ci));
if (MOD_RESULT == EVENT_STOP)
return;
if (u && ci->c && ci->c->usercount >= BSMinUsers)
ircdproto->SendPart(ci->bi, ci->name, "UNASSIGN from %s", u->nick);
if (ci->c && ci->c->users.size() >= Config.BSMinUsers)
{
if (u)
ircdproto->SendPart(ci->bi, ci->c, "UNASSIGN from %s", u->nick.c_str());
else
ircdproto->SendPart(ci->bi, ci->c, "");
}
ci->bi->chancount--;
--ci->bi->chancount;
ci->bi = NULL;
}
+211 -387
View File
@@ -1,6 +1,6 @@
/* BotServ functions
*
* (C) 2003-2009 Anope Team
* (C) 2003-2010 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -34,7 +34,7 @@ E void moduleAddBotServCmds();
/*************************************************************************/
/* *INDENT-OFF* */
void moduleAddBotServCmds() {
ModuleManager::LoadModuleList(BotServCoreNumber, BotServCoreModules);
ModuleManager::LoadModuleList(Config.BotServCoreModules);
}
/* *INDENT-ON* */
/*************************************************************************/
@@ -52,10 +52,10 @@ void get_botserv_stats(long *nrec, long *memuse)
for (bi = botlists[i]; bi; bi = bi->next) {
count++;
mem += sizeof(*bi);
mem += strlen(bi->nick) + 1;
mem += strlen(bi->user) + 1;
mem += strlen(bi->host) + 1;
mem += strlen(bi->real) + 1;
mem += bi->nick.size() + 1;
mem += bi->user.size() + 1;
mem += bi->host.size() + 1;
mem += bi->real.size() + 1;
}
}
@@ -70,7 +70,7 @@ void get_botserv_stats(long *nrec, long *memuse)
void bs_init()
{
if (s_BotServ) {
if (Config.s_BotServ) {
moduleAddBotServCmds();
}
}
@@ -91,9 +91,9 @@ void botserv(User * u, char *buf)
if (!(s = strtok(NULL, ""))) {
*s = 0;
}
ircdproto->SendCTCP(findbot(s_BotServ), u->nick, "PING %s", s);
ircdproto->SendCTCP(findbot(Config.s_BotServ), u->nick.c_str(), "PING %s", s);
} else {
mod_run_cmd(s_BotServ, u, BOTSERV, cmd);
mod_run_cmd(Config.s_BotServ, u, BOTSERV, cmd);
}
}
@@ -114,7 +114,7 @@ void botmsgs(User * u, BotInfo * bi, char *buf)
if (!(s = strtok(NULL, ""))) {
*s = 0;
}
ircdproto->SendCTCP(bi, u->nick, "PING %s", s);
ircdproto->SendCTCP(bi, u->nick.c_str(), "PING %s", s);
}
else if (cmd && bi->cmdTable)
{
@@ -132,17 +132,18 @@ void botmsgs(User * u, BotInfo * bi, char *buf)
void botchanmsgs(User * u, ChannelInfo * ci, char *buf)
{
int c;
int16 cstatus = 0;
char *cmd;
UserData *ud;
bool was_action = false;
Command *command;
std::string bbuf;
if (!u || !buf || !ci) {
if (!u || !buf || !ci || !ci->c)
return;
}
/* Answer to ping if needed, without breaking the buffer. */
if (!strnicmp(buf, "\1PING", 5)) {
ircdproto->SendCTCP(ci->bi, u->nick, "PING %s", buf);
ircdproto->SendCTCP(ci->bi, u->nick.c_str(), "PING %s", buf);
}
/* If it's a /me, cut the CTCP part at the beginning (not
@@ -150,7 +151,10 @@ void botchanmsgs(User * u, ChannelInfo * ci, char *buf)
* but the ACTION may create strange behaviours with the
* caps or badwords kickers */
if (!strnicmp(buf, "\1ACTION ", 8))
{
buf += 8;
was_action = true;
}
/* Now we can make kicker stuff. We try to order the checks
* from the fastest one to the slowest one, since there's
@@ -161,45 +165,46 @@ void botchanmsgs(User * u, ChannelInfo * ci, char *buf)
* way.
*/
/* We first retrieve the user status on the channel if needed */
if (ci->botflags & (BS_DONTKICKOPS | BS_DONTKICKVOICES))
cstatus = chan_get_user_status(ci->c, u);
bool Allow = false;
if (!ci->botflags.HasFlag(BS_DONTKICKOPS) && !ci->botflags.HasFlag(BS_DONTKICKVOICES))
Allow = true;
else if (ci->botflags.HasFlag(BS_DONTKICKOPS) && (ci->c->HasUserStatus(u, CMODE_HALFOP) || ci->c->HasUserStatus(u, CMODE_OP) || ci->c->HasUserStatus(u, CMODE_PROTECT) || ci->c->HasUserStatus(u, CMODE_OWNER)))
Allow = true;
else if (ci->botflags.HasFlag(BS_DONTKICKVOICES) && ci->c->HasUserStatus(u, CMODE_VOICE))
Allow = true;
if (buf && !check_access(u, ci, CA_NOKICK) &&
(!(ci->botflags & BS_DONTKICKOPS)
|| !(cstatus & (CUS_HALFOP | CUS_OP | CUS_OWNER | CUS_PROTECT)))
&& (!(ci->botflags & BS_DONTKICKVOICES) || !(cstatus & CUS_VOICE))) {
if (buf && !check_access(u, ci, CA_NOKICK) && Allow)
{
/* Bolds kicker */
if ((ci->botflags & BS_KICK_BOLDS) && strchr(buf, 2)) {
if (ci->botflags.HasFlag(BS_KICK_BOLDS) && strchr(buf, 2)) {
check_ban(ci, u, TTB_BOLDS);
bot_kick(ci, u, BOT_REASON_BOLD);
return;
}
/* Color kicker */
if ((ci->botflags & BS_KICK_COLORS) && strchr(buf, 3)) {
if (ci->botflags.HasFlag(BS_KICK_COLORS) && strchr(buf, 3)) {
check_ban(ci, u, TTB_COLORS);
bot_kick(ci, u, BOT_REASON_COLOR);
return;
}
/* Reverses kicker */
if ((ci->botflags & BS_KICK_REVERSES) && strchr(buf, 22)) {
if (ci->botflags.HasFlag(BS_KICK_REVERSES) && strchr(buf, 22)) {
check_ban(ci, u, TTB_REVERSES);
bot_kick(ci, u, BOT_REASON_REVERSE);
return;
}
/* Underlines kicker */
if ((ci->botflags & BS_KICK_UNDERLINES) && strchr(buf, 31)) {
if (ci->botflags.HasFlag(BS_KICK_UNDERLINES) && strchr(buf, 31)) {
check_ban(ci, u, TTB_UNDERLINES);
bot_kick(ci, u, BOT_REASON_UNDERLINE);
return;
}
/* Caps kicker */
if ((ci->botflags & BS_KICK_CAPS)
if (ci->botflags.HasFlag(BS_KICK_CAPS)
&& ((c = strlen(buf)) >= ci->capsmin)) {
int i = 0;
int l = 0;
@@ -217,7 +222,7 @@ void botchanmsgs(User * u, ChannelInfo * ci, char *buf)
* percentage of caps to kick for; the rest is ignored. -GD
*/
if (i >= ci->capsmin && i * 100 / (i + l) >= ci->capspercent) {
if (i && l && i >= ci->capsmin && i * 100 / (i + l) >= ci->capspercent) {
check_ban(ci, u, TTB_CAPS);
bot_kick(ci, u, BOT_REASON_CAPS);
return;
@@ -225,8 +230,7 @@ void botchanmsgs(User * u, ChannelInfo * ci, char *buf)
}
/* Bad words kicker */
if (ci->botflags & BS_KICK_BADWORDS) {
int i;
if (ci->botflags.HasFlag(BS_KICK_BADWORDS)) {
int mustkick = 0;
char *nbuf;
BadWord *bw;
@@ -234,39 +238,38 @@ void botchanmsgs(User * u, ChannelInfo * ci, char *buf)
/* Normalize the buffer */
nbuf = normalizeBuffer(buf);
for (i = 0, bw = ci->badwords; i < ci->bwcount; i++, bw++) {
if (!bw->in_use)
continue;
for (unsigned i = 0; i < ci->GetBadWordCount(); ++i)
{
bw = ci->GetBadWord(i);
if (bw->type == BW_ANY
&& ((BSCaseSensitive && strstr(nbuf, bw->word))
|| (!BSCaseSensitive && stristr(nbuf, bw->word)))) {
&& ((Config.BSCaseSensitive && strstr(nbuf, bw->word.c_str()))
|| (!Config.BSCaseSensitive && stristr(nbuf, bw->word.c_str())))) {
mustkick = 1;
} else if (bw->type == BW_SINGLE) {
int len = strlen(bw->word);
int len = bw->word.length();
if ((BSCaseSensitive && !strcmp(nbuf, bw->word))
|| (!BSCaseSensitive
&& (!stricmp(nbuf, bw->word)))) {
if ((Config.BSCaseSensitive && nbuf == bw->word)
|| (!Config.BSCaseSensitive
&& (!stricmp(nbuf, bw->word.c_str())))) {
mustkick = 1;
/* two next if are quite odd isn't it? =) */
} else if ((strchr(nbuf, ' ') == nbuf + len)
&&
((BSCaseSensitive
&& !strcmp(nbuf, bw->word))
|| (!BSCaseSensitive
&& (stristr(nbuf, bw->word) ==
((Config.BSCaseSensitive && nbuf == bw->word)
|| (!Config.BSCaseSensitive
&& (stristr(nbuf, bw->word.c_str()) ==
nbuf)))) {
mustkick = 1;
} else {
if ((strrchr(nbuf, ' ') ==
nbuf + strlen(nbuf) - len - 1)
&&
((BSCaseSensitive
&& (strstr(nbuf, bw->word) ==
((Config.BSCaseSensitive
&& (strstr(nbuf, bw->word.c_str()) ==
nbuf + strlen(nbuf) - len))
|| (!BSCaseSensitive
&& (stristr(nbuf, bw->word) ==
|| (!Config.BSCaseSensitive
&& (stristr(nbuf, bw->word.c_str()) ==
nbuf + strlen(nbuf) - len)))) {
mustkick = 1;
} else {
@@ -275,11 +278,11 @@ void botchanmsgs(User * u, ChannelInfo * ci, char *buf)
wordbuf[0] = ' ';
wordbuf[len + 1] = ' ';
wordbuf[len + 2] = '\0';
memcpy(wordbuf + 1, bw->word, len);
memcpy(wordbuf + 1, bw->word.c_str(), len);
if ((BSCaseSensitive
if ((Config.BSCaseSensitive
&& (strstr(nbuf, wordbuf)))
|| (!BSCaseSensitive
|| (!Config.BSCaseSensitive
&& (stristr(nbuf, wordbuf)))) {
mustkick = 1;
}
@@ -289,49 +292,49 @@ void botchanmsgs(User * u, ChannelInfo * ci, char *buf)
}
}
} else if (bw->type == BW_START) {
int len = strlen(bw->word);
int len = bw->word.length();
if ((BSCaseSensitive
&& (!strncmp(nbuf, bw->word, len)))
|| (!BSCaseSensitive
&& (!strnicmp(nbuf, bw->word, len)))) {
if ((Config.BSCaseSensitive
&& (!strncmp(nbuf, bw->word.c_str(), len)))
|| (!Config.BSCaseSensitive
&& (!strnicmp(nbuf, bw->word.c_str(), len)))) {
mustkick = 1;
} else {
char *wordbuf = new char[len + 2];
memcpy(wordbuf + 1, bw->word, len);
memcpy(wordbuf + 1, bw->word.c_str(), len);
wordbuf[0] = ' ';
wordbuf[len + 1] = '\0';
if ((BSCaseSensitive && (strstr(nbuf, wordbuf)))
|| (!BSCaseSensitive
if ((Config.BSCaseSensitive && (strstr(nbuf, wordbuf)))
|| (!Config.BSCaseSensitive
&& (stristr(nbuf, wordbuf))))
mustkick = 1;
delete [] wordbuf;
}
} else if (bw->type == BW_END) {
int len = strlen(bw->word);
int len = bw->word.length();
if ((BSCaseSensitive
if ((Config.BSCaseSensitive
&&
(!strncmp
(nbuf + strlen(nbuf) - len, bw->word, len)))
|| (!BSCaseSensitive
(nbuf + strlen(nbuf) - len, bw->word.c_str(), len)))
|| (!Config.BSCaseSensitive
&&
(!strnicmp
(nbuf + strlen(nbuf) - len, bw->word,
(nbuf + strlen(nbuf) - len, bw->word.c_str(),
len)))) {
mustkick = 1;
} else {
char *wordbuf = new char[len + 2];
memcpy(wordbuf, bw->word, len);
memcpy(wordbuf, bw->word.c_str(), len);
wordbuf[len] = ' ';
wordbuf[len + 1] = '\0';
if ((BSCaseSensitive && (strstr(nbuf, wordbuf)))
|| (!BSCaseSensitive
if ((Config.BSCaseSensitive && (strstr(nbuf, wordbuf)))
|| (!Config.BSCaseSensitive
&& (stristr(nbuf, wordbuf))))
mustkick = 1;
@@ -341,10 +344,10 @@ void botchanmsgs(User * u, ChannelInfo * ci, char *buf)
if (mustkick) {
check_ban(ci, u, TTB_BADWORDS);
if (BSGentleBWReason)
if (Config.BSGentleBWReason)
bot_kick(ci, u, BOT_REASON_BADWORD_GENTLE);
else
bot_kick(ci, u, BOT_REASON_BADWORD, bw->word);
bot_kick(ci, u, BOT_REASON_BADWORD, bw->word.c_str());
/* free the normalized buffer before return (#850) */
delete [] nbuf;
@@ -358,7 +361,7 @@ void botchanmsgs(User * u, ChannelInfo * ci, char *buf)
}
/* Flood kicker */
if (ci->botflags & BS_KICK_FLOOD) {
if (ci->botflags.HasFlag(BS_KICK_FLOOD)) {
time_t now = time(NULL);
ud = get_user_data(ci->c, u);
@@ -380,7 +383,7 @@ void botchanmsgs(User * u, ChannelInfo * ci, char *buf)
}
/* Repeat kicker */
if (ci->botflags & BS_KICK_REPEAT) {
if (ci->botflags.HasFlag(BS_KICK_REPEAT)) {
ud = get_user_data(ci->c, u);
if (!ud) {
return;
@@ -405,148 +408,72 @@ void botchanmsgs(User * u, ChannelInfo * ci, char *buf)
/* return if the user is on the ignore list */
if (get_ignore(u->nick) != NULL) {
if (get_ignore(u->nick.c_str()) != NULL) {
return;
}
/* Fantaisist commands */
if (buf && (ci->botflags & BS_FANTASY) && *buf == *BSFantasyCharacter) {
if (buf && ci->botflags.HasFlag(BS_FANTASY) && *buf == *Config.BSFantasyCharacter && !was_action) {
cmd = strtok(buf, " ");
if (cmd && (cmd[0] == *BSFantasyCharacter)) {
if (cmd && (cmd[0] == *Config.BSFantasyCharacter)) {
char *params = strtok(NULL, "");
const char *event_name = EVENT_BOT_FANTASY_NO_ACCESS;
/* Strip off the fantasy character */
cmd++;
if (check_access(u, ci, CA_FANTASIA))
event_name = EVENT_BOT_FANTASY;
{
command = findCommand(CHANSERV, cmd);
if (params)
send_event(event_name, 4, cmd, u->nick, ci->name, params);
/* Command exists and can not be called by fantasy */
if (command && !command->HasFlag(CFLAG_DISABLE_FANTASY))
{
bbuf = std::string(cmd);
/* Some commands don't need the channel name added.. eg !help */
if (!command->HasFlag(CFLAG_STRIP_CHANNEL))
{
bbuf += " ";
bbuf += ci->name;
}
if (params)
{
bbuf += " ";
bbuf += params;
}
chanserv(u, const_cast<char *>(bbuf.c_str())); // XXX Unsafe cast, this needs reviewing -- CyberBotX
}
FOREACH_MOD(I_OnBotFantasy, OnBotFantasy(cmd, u, ci, params));
}
else
send_event(event_name, 3, cmd, u->nick, ci->name);
{
FOREACH_MOD(I_OnBotNoFantasyAccess, OnBotNoFantasyAccess(cmd, u, ci, params));
}
}
}
}
/*************************************************************************/
/* Load/save data files. */
#define SAFE(x) do { \
if ((x) < 0) { \
if (!forceload) \
fatal("Read error on %s", BotDBName); \
failed = 1; \
break; \
} \
} while (0)
void load_bs_dbase()
{
dbFILE *f;
int c, ver;
uint16 tmp16;
uint32 tmp32;
BotInfo *bi;
int failed = 0;
if (!(f = open_db(s_BotServ, BotDBName, "r", BOT_VERSION)))
return;
ver = get_file_version(f);
while (!failed && (c = getc_db(f)) != 0) {
char *s;
if (c != 1)
fatal("Invalid format in %s %d", BotDBName, c);
SAFE(read_string(&s, f));
bi = new BotInfo(s);
delete [] s;
SAFE(read_string(&bi->user, f));
SAFE(read_string(&bi->host, f));
SAFE(read_string(&bi->real, f));
if (ver >= 10) {
SAFE(read_int16(&tmp16, f));
bi->flags = tmp16;
}
SAFE(read_int32(&tmp32, f));
bi->created = tmp32;
SAFE(read_int16(&tmp16, f));
bi->chancount = tmp16;
}
close_db(f);
}
#undef SAFE
/*************************************************************************/
#define SAFE(x) do { \
if ((x) < 0) { \
restore_db(f); \
log_perror("Write error on %s", BotDBName); \
if (time(NULL) - lastwarn > WarningTimeout) { \
ircdproto->SendGlobops(NULL, "Write error on %s: %s", BotDBName, \
strerror(errno)); \
lastwarn = time(NULL); \
} \
return; \
} \
} while (0)
void save_bs_dbase()
{
dbFILE *f;
BotInfo *bi;
static time_t lastwarn = 0;
int i;
if (!(f = open_db(s_BotServ, BotDBName, "w", BOT_VERSION)))
return;
for (i = 0; i < 256; i++) {
for (bi = botlists[i]; bi; bi = bi->next) {
SAFE(write_int8(1, f));
SAFE(write_string(bi->nick, f));
SAFE(write_string(bi->user, f));
SAFE(write_string(bi->host, f));
SAFE(write_string(bi->real, f));
SAFE(write_int16(bi->flags, f));
SAFE(write_int32(bi->created, f));
SAFE(write_int16(bi->chancount, f));
}
}
SAFE(write_int8(0, f));
close_db(f);
}
#undef SAFE
/*************************************************************************/
/* Inserts a bot in the bot list. I can't be much explicit mh? */
void insert_bot(BotInfo * bi)
void insert_bot(BotInfo *bi)
{
BotInfo *ptr, *prev;
for (prev = NULL, ptr = botlists[tolower(*bi->nick)];
ptr != NULL && stricmp(ptr->nick, bi->nick) < 0;
ci::string ci_bi_nick(bi->nick.c_str());
for (prev = NULL, ptr = botlists[tolower(bi->nick[0])];
ptr != NULL && ci_bi_nick > ptr->nick.c_str();
prev = ptr, ptr = ptr->next);
bi->prev = prev;
bi->next = ptr;
if (!prev)
botlists[tolower(*bi->nick)] = bi;
botlists[tolower(bi->nick[0])] = bi;
else
prev->next = bi;
if (ptr)
@@ -556,13 +483,15 @@ void insert_bot(BotInfo * bi)
/*************************************************************************/
/*************************************************************************/
BotInfo *findbot(const char *nick)
BotInfo *findbot(const std::string &nick)
{
BotInfo *bi;
if (!nick || !*nick)
if (nick.empty())
return NULL;
ci::string ci_nick(nick.c_str());
/*
* XXX Less than efficient, but we need to do this for good TS6 support currently. This *will* improve. -- w00t
*/
@@ -570,10 +499,10 @@ BotInfo *findbot(const char *nick)
{
for (bi = botlists[i]; bi; bi = bi->next)
{
if (!stricmp(nick, bi->nick))
if (ci_nick == bi->nick)
return bi;
if (nick == bi->uid)
if (ci_nick == bi->uid)
return bi;
}
}
@@ -596,11 +525,11 @@ static BanData *get_ban_data(Channel * c, User * u)
if (!c || !u)
return NULL;
snprintf(mask, sizeof(mask), "%s@%s", u->username,
common_get_vhost(u));
snprintf(mask, sizeof(mask), "%s@%s", u->GetIdent().c_str(),
u->GetDisplayedHost().c_str());
for (bd = c->bd; bd; bd = next) {
if (now - bd->last_use > BSKeepData) {
if (now - bd->last_use > Config.BSKeepData) {
if (bd->next)
bd->next->prev = bd->prev;
if (bd->prev)
@@ -642,38 +571,31 @@ static BanData *get_ban_data(Channel * c, User * u)
* Allocates it if necessary.
*/
static UserData *get_user_data(Channel * c, User * u)
static UserData *get_user_data(Channel *c, User *u)
{
struct c_userlist *user;
if (!c || !u)
return NULL;
for (user = c->users; user; user = user->next) {
if (user->user == u) {
if (user->ud) {
time_t now = time(NULL);
for (CUserList::iterator it = c->users.begin(); it != c->users.end(); ++it)
{
UserContainer *uc = *it;
/* Checks whether data is obsolete */
if (now - user->ud->last_use > BSKeepData) {
if (user->ud->lastline)
delete [] user->ud->lastline;
/* We should not free and realloc, but reset to 0
instead. */
memset(user->ud, 0, sizeof(UserData));
user->ud->last_use = now;
}
if (uc->user == u)
{
time_t now = time(NULL);
return user->ud;
} else {
user->ud = new UserData;
user->ud->last_use = time(NULL);
user->ud->lines = 0;
user->ud->last_start = 0;
user->ud->lastline = NULL;
user->ud->times = 0;
return user->ud;
/* Checks whether data is obsolete */
if (now - uc->ud.last_use > Config.BSKeepData)
{
if (uc->ud.lastline)
delete [] uc->ud.lastline;
/* We should not free and realloc, but reset to 0
instead. */
memset(&uc->ud, 0, sizeof(UserData));
uc->ud.last_use = now;
}
return &uc->ud;
}
}
@@ -689,94 +611,79 @@ void bot_join(ChannelInfo * ci)
if (!ci || !ci->c || !ci->bi)
return;
if (BSSmartJoin) {
if (Config.BSSmartJoin)
{
/* We check for bans */
if (ci->c->bans && ci->c->bans->count) {
char buf[BUFSIZE];
const char *av[4];
if (ci->c->bans && ci->c->bans->count)
{
Entry *ban, *next;
int ac;
if (ircdcap->tsmode) {
snprintf(buf, BUFSIZE - 1, "%ld", static_cast<long>(time(NULL)));
av[0] = ci->c->name;
av[1] = buf;
av[2] = "-b";
ac = 4;
} else {
av[0] = ci->c->name;
av[1] = "-b";
ac = 3;
}
for (ban = ci->c->bans->entries; ban; ban = next) {
for (ban = ci->c->bans->entries; ban; ban = next)
{
next = ban->next;
if (entry_match
(ban, ci->bi->nick, ci->bi->user, ci->bi->host, 0)) {
ircdproto->SendMode(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);
if (entry_match(ban, ci->bi->nick.c_str(), ci->bi->user.c_str(), ci->bi->host.c_str(), 0))
{
ci->c->RemoveMode(NULL, CMODE_BAN, ban->mask);
}
}
}
std::string Limit;
int limit = 0;
if (ci->c->GetParam(CMODE_LIMIT, Limit))
{
limit = atoi(Limit.c_str());
}
/* Should we be invited? */
if ((ci->c->mode & anope_get_invite_mode())
|| (ci->c->limit && ci->c->usercount >= ci->c->limit))
ircdproto->SendNoticeChanops(NULL, ci->c->name,
"%s invited %s into the channel.",
ci->bi->nick, ci->bi->nick);
if (ci->c->HasMode(CMODE_INVITE)
|| (limit && ci->c->users.size() >= limit))
ircdproto->SendNoticeChanops(ci->bi, ci->c,
"%s invited %s into the channel.",
ci->bi->nick.c_str(), ci->bi->nick.c_str());
}
ircdproto->SendJoin(ci->bi, ci->c->name, ci->c->creation_time);
ircdproto->SendBotOp(ci->bi->nick, ci->c->name);
send_event(EVENT_BOT_JOIN, 2, ci->name, ci->bi->nick);
ircdproto->SendJoin(ci->bi, ci->c->name.c_str(), ci->c->creation_time);
for (std::list<ChannelModeStatus *>::iterator it = BotModes.begin(); it != BotModes.end(); ++it)
{
ci->c->SetMode(ci->bi, *it, ci->bi->nick, false);
}
FOREACH_MOD(I_OnBotJoin, OnBotJoin(ci, ci->bi));
}
/*************************************************************************/
/* This makes a ban if the user has to have one. In every cases it increments
the kick count for the user. */
static void check_ban(ChannelInfo * ci, User * u, int ttbtype)
/** Check if a user should be banned by botserv
* @param ci The channel the user is on
* @param u The user
* @param ttbtype The type of bot kicker the user should be checked against
*/
static void check_ban(ChannelInfo *ci, User *u, int ttbtype)
{
BanData *bd = get_ban_data(ci->c, u);
if (!bd)
return;
/* Don't ban ulines */
if (is_ulined(u->server->name))
return;
bd->ttb[ttbtype]++;
if (bd->ttb[ttbtype] == ci->ttb[ttbtype]) {
const char *av[4];
int ac;
if (ci->ttb[ttbtype] && bd->ttb[ttbtype] >= ci->ttb[ttbtype])
{
/* Should not use == here because bd->ttb[ttbtype] could possibly be > ci->ttb[ttbtype]
* if the TTB was changed after it was not set (0) before and the user had already been
* kicked a few times. Bug #1056 - Adam */
char mask[BUFSIZE];
char buf[BUFSIZE];
bd->ttb[ttbtype] = 0;
get_idealban(ci, u, mask, sizeof(mask));
if (ircdcap->tsmode) {
snprintf(buf, BUFSIZE - 1, "%ld", static_cast<long>(time(NULL)));
av[0] = ci->name;
av[1] = buf;
av[2] = "+b";
av[3] = mask;
ac = 4;
} else {
av[0] = ci->name;
av[1] = "+b";
av[2] = mask;
ac = 3;
}
ircdproto->SendMode(ci->bi, ci->name, "+b %s", mask);
do_cmode(ci->bi->nick, ac, av);
send_event(EVENT_BOT_BAN, 3, u->nick, ci->name, mask);
if (ci->c)
ci->c->SetMode(NULL, CMODE_BAN, mask);
FOREACH_MOD(I_OnBotBan, OnBotBan(u, ci, mask));
}
}
@@ -789,202 +696,119 @@ static void bot_kick(ChannelInfo * ci, User * u, int message, ...)
va_list args;
char buf[1024];
const char *fmt;
const char *av[3];
if (!ci || !ci->bi || !ci->c || !u)
return;
va_start(args, message);
fmt = getstring(u->na, message);
fmt = getstring(u, message);
if (!fmt)
return;
vsnprintf(buf, sizeof(buf), fmt, args);
va_end(args);
av[0] = ci->name;
av[1] = u->nick;
av[2] = buf;
ircdproto->SendKick(ci->bi, av[0], av[1], "%s", av[2]);
do_kick(ci->bi->nick, 3, av);
send_event(EVENT_BOT_KICK, 3, u->nick, ci->name, buf);
ci->c->Kick(ci->bi, u, "%s", buf);
}
/*************************************************************************/
/* Makes a simple ban and kicks the target */
void bot_raw_ban(User * requester, ChannelInfo * ci, char *nick,
const char *reason)
void bot_raw_ban(User * requester, ChannelInfo * ci, char *nick, const char *reason)
{
int ac;
const char *av[4];
const char *kav[4]; // seperate as not everything is constified XXX -- w00t
char mask[BUFSIZE];
char buf[BUFSIZE];
User *u = finduser(nick);
if (!u)
return;
if (ircd->protectedumode) {
if ((ModeManager::FindUserModeByName(UMODE_PROTECTED)))
{
if (is_protected(u) && (requester != u)) {
ircdproto->SendPrivmsg(ci->bi, ci->name, "%s",
getstring2(NULL, PERMISSION_DENIED));
ircdproto->SendPrivmsg(ci->bi, ci->name.c_str(), "%s", getstring(ACCESS_DENIED));
return;
}
}
if ((ci->flags & CI_PEACE) && stricmp(requester->nick, nick)
&& (get_access(u, ci) >= get_access(requester, ci)))
if (ci->HasFlag(CI_PEACE) && stricmp(requester->nick.c_str(), nick) && (get_access(u, ci) >= get_access(requester, ci)))
return;
if (ircd->except) {
if (ModeManager::FindChannelModeByName(CMODE_EXCEPT))
{
if (is_excepted(ci, u) == 1) {
ircdproto->SendPrivmsg(ci->bi, ci->name, "%s",
getstring2(NULL, BOT_EXCEPT));
ircdproto->SendPrivmsg(ci->bi, ci->name.c_str(), "%s", getstring(BOT_EXCEPT));
return;
}
}
get_idealban(ci, u, mask, sizeof(mask));
if (ircdcap->tsmode) {
snprintf(buf, BUFSIZE - 1, "%ld", static_cast<long>(time(NULL)));
av[0] = ci->name;
av[1] = buf;
av[2] = "+b";
av[3] = mask;
ac = 4;
} else {
av[0] = ci->name;
av[1] = "+b";
av[2] = mask;
ac = 3;
}
ircdproto->SendMode(ci->bi, ci->name, "+b %s", mask);
do_cmode(ci->bi->nick, ac, av);
kav[0] = ci->name;
kav[1] = nick;
if (!reason) {
kav[2] = ci->bi->nick;
} else {
if (strlen(reason) > 200)
(*const_cast<char **>(&reason))[200] = '\0'; // Unsafe cast -- will review later -- CyberBotX
kav[2] = reason;
}
ci->c->SetMode(NULL, CMODE_BAN, mask);
/* Check if we need to do a signkick or not -GD */
if ((ci->flags & CI_SIGNKICK)
|| ((ci->flags & CI_SIGNKICK_LEVEL)
&& !check_access(requester, ci, CA_SIGNKICK)))
ircdproto->SendKick(ci->bi, kav[0], kav[1], "%s (%s)", kav[2],
requester->nick);
if (ci->HasFlag(CI_SIGNKICK) || (ci->HasFlag(CI_SIGNKICK_LEVEL) && !check_access(requester, ci, CA_SIGNKICK)))
ci->c->Kick(ci->bi, u, "%s (%s)", reason ? reason : ci->bi->nick.c_str(), requester->nick.c_str());
else
ircdproto->SendKick(ci->bi, kav[0], kav[1], "%s", kav[2]);
do_kick(ci->bi->nick, 3, kav);
send_event(EVENT_BOT_KICK, 3, kav[1], kav[0], kav[2]);
ci->c->Kick(ci->bi, u, "%s", reason ? reason : ci->bi->nick.c_str());
}
/*************************************************************************/
/* Makes a kick with a "dynamic" reason ;) */
void bot_raw_kick(User * requester, ChannelInfo * ci, char *nick,
const char *reason)
void bot_raw_kick(User * requester, ChannelInfo * ci, char *nick, const char *reason)
{
const char *av[3];
User *u = finduser(nick);
if (!u || !is_on_chan(ci->c, u))
if (!u || !ci->c->FindUser(u))
return;
if (ircd->protectedumode) {
if ((ModeManager::FindUserModeByName(UMODE_PROTECTED)))
{
if (is_protected(u) && (requester != u)) {
ircdproto->SendPrivmsg(ci->bi, ci->name, "%s",
getstring2(NULL, PERMISSION_DENIED));
ircdproto->SendPrivmsg(ci->bi, ci->name.c_str(), "%s", getstring(ACCESS_DENIED));
return;
}
}
if ((ci->flags & CI_PEACE) && stricmp(requester->nick, nick)
&& (get_access(u, ci) >= get_access(requester, ci)))
if (ci->HasFlag(CI_PEACE) && stricmp(requester->nick.c_str(), nick) && (get_access(u, ci) >= get_access(requester, ci)))
return;
av[0] = ci->name;
av[1] = nick;
if (!reason) {
av[2] = ci->bi->nick;
} else {
if (strlen(reason) > 200)
(*const_cast<char **>(&reason))[200] = '\0'; // Unsafe cast -- will review later -- CyberBotX
av[2] = reason;
}
if ((ci->flags & CI_SIGNKICK)
|| ((ci->flags & CI_SIGNKICK_LEVEL)
&& !check_access(requester, ci, CA_SIGNKICK)))
ircdproto->SendKick(ci->bi, av[0], av[1], "%s (%s)", av[2],
requester->nick);
if (ci->HasFlag(CI_SIGNKICK) || (ci->HasFlag(CI_SIGNKICK_LEVEL) && !check_access(requester, ci, CA_SIGNKICK)))
ci->c->Kick(ci->bi, u, "%s (%s)", reason ? reason : ci->bi->nick.c_str(), requester->nick.c_str());
else
ircdproto->SendKick(ci->bi, av[0], av[1], "%s", av[2]);
do_kick(ci->bi->nick, 3, av);
send_event(EVENT_BOT_KICK, 3, av[1], av[0], av[2]);
ci->c->Kick(ci->bi, u, "%s", reason ? reason : ci->bi->nick.c_str());
}
/*************************************************************************/
/* Makes a mode operation on a channel for a nick */
void bot_raw_mode(User * requester, ChannelInfo * ci, const char *mode,
char *nick)
void bot_raw_mode(User * requester, ChannelInfo * ci, const char *mode, char *nick)
{
const char *av[4];
int ac;
char buf[BUFSIZE];
User *u;
*buf = '\0';
u = finduser(nick);
if (!u || !is_on_chan(ci->c, u))
if (!u || !ci->c->FindUser(u))
return;
snprintf(buf, BUFSIZE - 1, "%ld", static_cast<long>(time(NULL)));
if (ircd->protectedumode) {
if ((ModeManager::FindUserModeByName(UMODE_PROTECTED))) {
if (is_protected(u) && *mode == '-' && (requester != u)) {
ircdproto->SendPrivmsg(ci->bi, ci->name, "%s",
getstring2(NULL, PERMISSION_DENIED));
ircdproto->SendPrivmsg(ci->bi, ci->name.c_str(), "%s", getstring(ACCESS_DENIED));
return;
}
}
if (*mode == '-' && (ci->flags & CI_PEACE)
&& stricmp(requester->nick, nick)
&& (get_access(u, ci) >= get_access(requester, ci)))
if (*mode == '-' && ci->HasFlag(CI_PEACE)
&& stricmp(requester->nick.c_str(), nick) && (get_access(u, ci) >= get_access(requester, ci)))
return;
if (ircdcap->tsmode) {
av[0] = ci->name;
av[1] = buf;
av[2] = mode;
av[3] = nick;
ac = 4;
ircdproto->SendMode(ci->bi, av[0], "%s %s", av[2], av[3]);
} else {
av[0] = ci->name;
av[1] = mode;
av[2] = nick;
ac = 3;
ircdproto->SendMode(ci->bi, av[0], "%s %s", av[1], av[2]);
}
do_cmode(ci->bi->nick, ac, av);
ci->c->SetModes(NULL, "%s %s", mode, nick);
}
/*************************************************************************/
+1242 -1619
View File
File diff suppressed because it is too large Load Diff
+431 -1493
View File
File diff suppressed because it is too large Load Diff
+42
View File
@@ -0,0 +1,42 @@
/*
* Copyright (C) 2008-2010 Robin Burchell <w00t@inspircd.org>
* Copyright (C) 2008-2010 Anope Team <team@anope.org>
*
* Please read COPYING and README for further details.
*
*
* $Id$
*
*/
#include "services.h"
#include "modules.h"
Command::Command(const std::string &sname, size_t min_params, size_t max_params, const std::string &spermission) : MaxParams(max_params), MinParams(min_params), name(sname), permission(spermission)
{
this->core = 0;
this->mod_name = NULL;
this->service = NULL;
this->next = NULL;
}
Command::~Command()
{
if (this->mod_name) {
delete [] this->mod_name;
}
if (this->service) {
delete [] this->service;
}
}
CommandReturn Command::Execute(User *u, const std::vector<ci::string> &) { return MOD_CONT; }
bool Command::OnHelp(User *u, const ci::string &subcommand) { return false; }
void Command::OnSyntaxError(User *u, const ci::string &subcommand) { }
void Command::SetPermission(const std::string &reststr)
{
this->permission = reststr;
}
+140 -117
View File
@@ -1,6 +1,6 @@
/* Routines for looking up commands in a *Serv command list.
*
* (C) 2003-2009 Anope Team
* (C) 2003-2010 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -15,6 +15,7 @@
#include "services.h"
#include "commands.h"
#include "language.h"
#include "hashcomp.h"
/*************************************************************************/
@@ -29,12 +30,11 @@ Command *lookup_cmd(Command * list, char *cmd)
{
Command *c;
for (c = list; c->name; c++) {
if (stricmp(c->name, cmd) == 0) {
for (c = list; ; c++) {
if (stricmp(c->name.c_str(), cmd) == 0) {
return c;
}
}
return NULL;
}
/*************************************************************************/
@@ -48,65 +48,123 @@ Command *lookup_cmd(Command * list, char *cmd)
* @param cmd Command
* @return void
*/
void mod_run_cmd(char *service, User * u, CommandHash * cmdTable[],
const char *cmd)
void mod_run_cmd(const std::string &service, User * u, CommandHash * cmdTable[], const char *cmd)
{
Command *c = findCommand(cmdTable, cmd);
int retVal = 0;
Command *current;
int retVal = MOD_CONT;
ChannelInfo *ci;
EventReturn MOD_RESULT;
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);
FOREACH_RESULT(I_OnPreCommandRun, OnPreCommandRun(service, u, cmd, c));
if (MOD_RESULT == EVENT_STOP)
return;
if (!c)
{
notice_lang(service, u, UNKNOWN_COMMAND_HELP, cmd, service.c_str());
return;
}
if (!c->HasFlag(CFLAG_ALLOW_UNREGISTERED))
{
// Command requires registered users only
if (!u->IsIdentified())
{
notice_lang(service, u, NICK_IDENTIFY_REQUIRED, Config.s_NickServ);
Alog() << "Access denied for unregistered user " << u->nick << " with service " << service << " and command " << cmd;
return;
}
}
}
/*************************************************************************/
std::vector<ci::string> params;
std::string curparam;
char *s = NULL;
while ((s = strtok(NULL, " ")))
{
// - 1 because params[0] corresponds with a maxparam of 1.
if (params.size() >= (c->MaxParams - 1))
{
curparam += s;
curparam += " ";
}
else
{
params.push_back(s);
}
}
/**
* Output the 'Limited to' line for the given command
* @param service Services Client
* @param u User Struct
* @param c Command Struct
* @return void
*/
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 (!curparam.empty())
{
// Remove trailing space
curparam.erase(curparam.size() - 1, curparam.size());
// Add it
params.push_back(curparam.c_str());
}
if (params.size() < c->MinParams)
{
c->OnSyntaxError(u, !params.empty() ? params[params.size() - 1] : "");
return;
}
FOREACH_RESULT(I_OnPreCommand, OnPreCommand(u, c->service, c->name.c_str(), params));
if (MOD_RESULT == EVENT_STOP)
return;
if (params.size() > 0 && !c->HasFlag(CFLAG_STRIP_CHANNEL) && (cmdTable == CHANSERV || cmdTable == BOTSERV))
{
if (ircdproto->IsChannelValid(params[0].c_str()))
{
if ((ci = cs_findchan(params[0].c_str())))
{
if ((ci->HasFlag(CI_FORBIDDEN)) && (!c->HasFlag(CFLAG_ALLOW_FORBIDDEN)))
{
notice_lang(service, u, CHAN_X_FORBIDDEN, ci->name.c_str());
Alog() << "Access denied for user " << u->nick << " with service " << service
<< " and command " << cmd << " because of FORBIDDEN channel " << ci->name;
return;
}
else if ((ci->HasFlag(CI_SUSPENDED)) && (!c->HasFlag(CFLAG_ALLOW_SUSPENDED)))
{
notice_lang(service, u, CHAN_X_FORBIDDEN, ci->name.c_str());
Alog() << "Access denied for user " << u->nick << " with service " << service
<<" and command " << cmd << " because of SUSPENDED channel " << ci->name;
return;
}
}
else if (!c->HasFlag(CFLAG_ALLOW_UNREGISTEREDCHANNEL))
{
notice_lang(service, u, CHAN_X_NOT_REGISTERED, params[0].c_str());
return;
}
}
/* A user not giving a channel name for a param that should be a channel */
else
{
notice_lang(service, u, CHAN_X_INVALID, params[0].c_str());
return;
}
}
// If the command requires a permission, and they aren't registered or don't have the required perm, DENIED
if (!c->permission.empty())
{
if (!u->Account()->HasCommand(c->permission))
{
notice_lang(service, u, ACCESS_DENIED);
Alog() << "Access denied for user " << u->nick << " with service " << service << " and command " << cmd;
return;
}
}
retVal = c->Execute(u, params);
if (retVal == MOD_CONT)
{
FOREACH_MOD(I_OnPostCommand, OnPostCommand(u, c->service, c->name.c_str(), params));
}
}
/*************************************************************************/
@@ -119,70 +177,35 @@ void do_help_limited(char *service, User * u, Command * c)
* @param cmd Command
* @return void
*/
void mod_help_cmd(char *service, User * u, CommandHash * cmdTable[],
const char *cmd)
void mod_help_cmd(char *service, User * u, CommandHash * cmdTable[], 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;
spacesepstream tokens(cmd);
std::string token;
tokens.GetToken(token);
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) {
Command *c = findCommand(cmdTable, token.c_str());
ci::string subcommand = tokens.StreamEnd() ? "" : tokens.GetRemaining().c_str();
if (!c || !c->OnHelp(u, subcommand))
notice_lang(service, u, NO_HELP_AVAILABLE, cmd);
} else {
do_help_limited(service, u, c);
else
{
u->SendMessage(service, " ");
/* Inform the user what permission is required to use the command */
if (!c->permission.empty())
notice_lang(service, u, COMMAND_REQUIRES_PERM, c->permission.c_str());
/* User isn't identified and needs to be to use this command */
if (!c->HasFlag(CFLAG_ALLOW_UNREGISTERED) && !u->IsIdentified())
notice_lang(service, u, COMMAND_IDENTIFY_REQUIRED);
/* User doesn't have the proper permission to use this command */
else if (!c->permission.empty() && (!u->Account() || (!u->Account()->HasCommand(c->permission))))
notice_lang(service, u, COMMAND_CANNOT_USE);
/* User can use this command */
else
notice_lang(service, u, COMMAND_CAN_USE);
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
/* Compatibility routines.
*
* (C) 2003-2009 Anope Team
* (C) 2003-2010 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
+916 -924
View File
File diff suppressed because it is too large Load Diff

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