460 Commits

Author SHA1 Message Date
Peter Powell
146d72fddb Fix Doxygen comments. 2013-06-21 03:52:56 +01:00
attilamolnar
ac72c53ce2 Replace void* dest and target_type parameters of OnMode with a User* and a Channel* 2013-06-13 18:20:10 +02:00
attilamolnar
623ba6ae49 Get rid of the OnRemoteKill hook, make use of GetRouting() and TR_CUSTOM to route KILLs 2013-06-12 21:22:37 +02:00
attilamolnar
98f3924960 Change command name parameter of OnPostCommand to be a Command* 2013-06-12 20:08:22 +02:00
attilamolnar
78900eaa5e Remove deprecated Request cross-module communication mechanism 2013-06-07 01:00:10 +02:00
attilamolnar
79db1cf848 Create IOHook interface (extracted from Module) 2013-06-07 01:00:10 +02:00
attilamolnar
ca4c4a6798 Route WALLOPS like a regular command, remove OnWallops hook 2013-06-02 18:05:01 +02:00
Peter Powell
244a65e855 Clean up the FileReader class and all of the modules that use it.
- Modules which use this class will now have to catch a
  CoreException when opening files if they wish to ignore
  the failed loading of a file.
- m_randquote has been cleaned up massively and the RANDQUOTE
  command has been removed as it was pretty much useless.
2013-05-27 00:15:30 +02:00
Attila Molnar
b36ce84c7d Merge pull request #545 from SaberUK/master+logging-cleanup
Clean up the logging system (part 1 of 2).
2013-05-21 17:11:46 -07:00
attilamolnar
7a67685bcb Remove OnUserPreNotice and OnUserNotice hooks, add MessageType argument to OnUserMessage and OnUserPreMessage
All modules (except m_nonotice) that perform filtering on messages have common logic for handling PRIVMSGs and NOTICEs and most of them run the exact same code in both cases
2013-05-20 23:30:11 +02:00
Peter Powell
3e105c6311 Fix spacing in calls to LogManager::Log. 2013-05-19 19:33:36 +01:00
attilamolnar
8790551dc1 Merge insp20 2013-04-28 00:32:14 +02:00
Adam
8428bbb387 Modularize DNS
The DNS modules are temporarily in commands/ so they're loaded automatically

Thanks to Attila for helping with much of this.
2013-04-26 16:59:29 -05:00
attilamolnar
988d821807 OnUserPreJoin is a local-only hook, change User* parameter to LocalUser* 2013-04-13 15:34:12 +02:00
Peter Powell
11cafc12d5 Tidy up source files:
- Use #pragma once instead of include guards.
- Move header files in src/modules to include/modules.
- Fixed various spacing issues.
2013-04-12 17:03:05 +01:00
Peter Powell
645f7e18c6 Add LOG_ prefix to the log level enum values. 2013-04-12 02:21:19 +01:00
Peter Powell
5c29c53f65 Convert ISUPPORT to use a map instead of a string. 2013-04-11 23:08:03 +01:00
attilamolnar
9eeae94195 Allow dynamic references to reference ServiceProviders, introduce ModeReference
Mode handlers can be referenced using mode/<modename>
2013-04-08 23:13:24 +02:00
attilamolnar
927937d610 Rework dynamic_reference management, introduce dynamic_reference_nocheck
New dynamic references are now resolved at construction and all of them are re-resolved when a relevant service is added or removed; resolution is no longer done in operator->

dynamic_reference_nocheck is a variant of dynamic_reference that does not check for value being null in operator-> / operator*
dynamic_reference still throws an exception when used in this case

Both kinds of dynamic references support .check(): an exception is thrown if this is called when value is null
2013-04-08 23:13:24 +02:00
attilamolnar
9fc218c005 Remove OnAddBan and OnDelBan hooks 2013-04-08 21:55:53 +02:00
attilamolnar
0fa365373e Don't attempt to unload or reload modules that are waiting to be unloaded 2013-04-05 18:23:44 +02:00
attilamolnar
de9cf90b6b Remove more deprecated code
- ConfigReader
- FloodQuitUserHandler
- IsValidModuleCommand
- CallCommandHandler
- DoCleanup from u_listmode.h
2013-04-01 16:10:45 +02:00
Peter Powell
d877be98d1 Purge the deprecated chanprotect module. 2013-04-01 10:43:12 +01:00
attilamolnar
1cb05553e2 Change channel name parameter of Module::OnUserPreJoin() and Channel::JoinUser() to std::string from char* 2013-04-01 02:13:43 +02:00
attilamolnar
d1b9bf8e35 New API version 2013-04-01 01:42:49 +02:00
attilamolnar
fe9e594755 Fix m_dnsbl not checking cgiirc users when the cgiirc address is elined 2013-03-11 20:48:58 +01:00
attilamolnar
d00914ed6f Add a flag to Command that controls whether an empty last parameter is allowed or not 2012-12-15 21:17:06 +01:00
ChrisTX
5b9682275e Windows: In-depth cleanup (see details)
-Fix x64 builds for Windows. Now all configurations compile.
-Remove the non-working rebase stuff.
-Remove the Windows fork hack and instead use FreeConsole() to emulate the behavior. This directly allows us to compile with ASLR, which is turned on now.
-Remove the old IPC mechanism for the removed GUI. This is not needed anymore as the GUI wasn't ever supported on anything newer than 1.2
-Remove the WIN32/WINDOWS macros. _WIN32 is supported on all x86-based VC++ targets, so that's what we need.
-Enable optimizations for release builds.
-De-duplicate printf_c(), it was previously copy-pasted into colors.h for configure
-Add the VC++ specific bad files in .gitignore
-Disable PID writing on Windows. This is only making sense for *nix builds.
-Replace the CPU usage retrieval with an algorithm analogous to the *nix behavior. Also supports separated now/total values. (Tested with a dummy busy loop - seems working)
-Removed certain unused functions and variables
-Remove stdint defines from the windows wrapper
-Remove CRT debug alloc. This is a bad idea as it would define a macro to replace free which breaks builds.
-Re-evaluated the warnings list, commented it.
-Moved inspircd_config/_version to include/ to match *nix
-Removed the creation of inspircd_se_config, as it isn't used at all.
-Made non-git builds show as "r0" instead of "r" (thanks to @SaberUK for pointing this out)
-Fixed up m_spanningtree's project paths. Now all configurations (debug/release x86/x64) have been tested and build properly.
-Moved FindDNS out of the wrapper and matched its log behavior with *nix. (It's pointless having it in the wrapper after the recent slimming down)
-Replaced random/srandom wrappers with a mechanism that tries to use Windows' Random API first is no SSL module is loaded.
-Removed more old junk from support for compilers older than VC++ 2010 (we don't have project files for these, so compiling them would be hard anyways)
-Removed the unused ClearConsole()
-Removed unused includes from the wrapper. Also, do not include psapi.h here if we don't link psapi.lib. This should be done where appropriate.
-Made inet_aton an inline function for increased performance
-C4800, performance warning about bool forcing, resolved at all occurrences.
-C4701, uninitialized variable 'cached', resolved at all occurrences.
-dlerror() was migrated out of the wrapper for more thread safety (no global buffer being shared) and increased performance.
-Removed the wrong CRT debug flags. This drains a lot of performance.
-Removed the clock_gettime/gettimeofday wrappers
-Replaced all TCHAR/ANSI mix-ups of functions with the correct respective function.
-Added a block of C4355 for < VS2012
-Update project files for c870714
2012-10-12 22:31:38 +02:00
attilamolnar
91abba488a New OnUserSetIP() hook 2012-09-13 18:51:28 +02:00
Peter Powell
808a0a0957 Fix Doxygen syntax errors. 2012-07-05 21:00:35 +01:00
Robin Burchell
2c3745edb3 Revert "users: introduce OnSetClientIP hook."
This reverts commit 5fd31ec5a6ba6021763b36d8d17d4665900623ab.
2012-07-01 21:11:59 +02:00
William Pitcock
5fd31ec5a6 users: introduce OnSetClientIP hook.
This hook is called whenever a client's IP is modified.
2012-06-12 22:49:29 -07:00
Robby-
46a3904619 Replace copyright headers with headers granting specific authors copyright 2012-04-19 20:58:29 +02:00
Justin Crawford
df5f76832e Fixes for bug #12 2012-04-14 18:03:25 -07:00
Daniel De Graaf
cd6b7a8cda Split up API_VERSION number
Since we can make API changes in multiple branches at the same time,
a single sequence number is insufficient. Use two numbers to indicate
the major version and API increment.
2010-04-01 19:01:32 -05:00
danieldg
10d8e9151d Remove channel argument from OnSendWhoLine, this information is already available in params[0]
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12650 e03df62e-2008-0410-955e-edbf42e46eb7
2010-03-22 20:29:05 +00:00
danieldg
a9754ce49b Allow static initialization of dynamic_reference objects
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12648 e03df62e-2008-0410-955e-edbf42e46eb7
2010-03-22 18:02:09 +00:00
danieldg
7cb909b0f3 PURE_STATIC fixes to use normal <module> tags
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12641 e03df62e-2008-0410-955e-edbf42e46eb7
2010-03-18 15:14:31 +00:00
danieldg
11e45f2cb7 Convert pgsql to SQLv3
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12626 e03df62e-2008-0410-955e-edbf42e46eb7
2010-03-13 01:28:54 +00:00
danieldg
6d55803ae8 Fix ModuleManager::SetPriority algorithm which did not handle PRIORITY_BEFORE correctly
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12600 e03df62e-2008-0410-955e-edbf42e46eb7
2010-03-06 01:27:20 +00:00
danieldg
4d46f5f9ef Restore <options:exemptchanops> with long names
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12502 e03df62e-2008-0410-955e-edbf42e46eb7
2010-02-20 09:15:55 +00:00
danieldg
c2ec183ffe Kill m_spy, which was replaced by channels/auspex in 1.2 but kept alive for nostalgia
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12497 e03df62e-2008-0410-955e-edbf42e46eb7
2010-02-19 02:50:29 +00:00
danieldg
394414b7eb Defer module init on initial load for easier dependency checking
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12477 e03df62e-2008-0410-955e-edbf42e46eb7
2010-02-16 20:32:43 +00:00
danieldg
4498f1abd1 m_dnsbl updates
Prevent user registration until dnsbl lookups are complete
Allow DNSBLs to be checked using <connect:dnsbl> (MARK type)

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12454 e03df62e-2008-0410-955e-edbf42e46eb7
2010-02-14 00:31:44 +00:00
danieldg
aab7998583 Add random number generation functions to InspIRCd class.
Default implementation uses libc random(), which can be better than rand().
If gnutls is loaded, gcrypt will be used to provide random numbers.

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12404 e03df62e-2008-0410-955e-edbf42e46eb7
2010-02-09 02:22:27 +00:00
danieldg
8e34d66ef3 Add OnSetConnectClass hook for use in adding requirements to connect classes (such as requiressl)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12352 e03df62e-2008-0410-955e-edbf42e46eb7
2010-02-02 15:02:33 +00:00
danieldg
23e62cef07 Add parameters to OnSendWhoLine hook, fixes "/who * o" returning opers with +H
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12345 e03df62e-2008-0410-955e-edbf42e46eb7
2010-02-01 01:31:40 +00:00
danieldg
9ee588b23f PreCommand/PostCommand are local-only hooks
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12291 e03df62e-2008-0410-955e-edbf42e46eb7
2010-01-18 17:35:55 +00:00
danieldg
4b6bdeccb5 Add Module::init() for correct exception handling during hook registration
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12278 e03df62e-2008-0410-955e-edbf42e46eb7
2010-01-17 16:00:14 +00:00
danieldg
ac002a195d Verify cloak keys match during CAPAB negotiation
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12258 e03df62e-2008-0410-955e-edbf42e46eb7
2010-01-14 18:22:39 +00:00