670 Commits

Author SHA1 Message Date
attilamolnar
8a64bd3a0a Deduplicate code in modmanager_static and modmanager_dynamic 2013-09-08 17:10:15 +02:00
attilamolnar
e6e3ae88fb Remove ModuleManager::ModCount and GetCount() 2013-09-08 16:57:03 +02:00
attilamolnar
fabe111fb9 Fix module loading in PURE_STATIC builds 2013-09-08 16:54:33 +02:00
attilamolnar
d349f981fb Remove ModuleManager::GetAllModuleNames(), use GetModules() instead 2013-08-30 13:15:10 +02:00
attilamolnar
c202dea024 Replace OnRehash() with ReadConfig() that is called on boot, on module load and on rehash
This eliminates the need for calling OnRehash() in init()
2013-08-30 13:15:10 +02:00
attilamolnar
9962840222 Fix a couple of issues
- Wrong doc for Snomask::GetDescription()
- Incorrect idle time when WHOISing remote users
- String + int = garbage
- Remote MODE commands (user mode changes) being broadcast in addition to being forwarded
- Incorrect revision being shown
2013-08-08 15:10:48 +02:00
attilamolnar
d24619c012 Automatically attach modules to events 2013-08-04 16:08:57 +02:00
Adam
8710724b55 Change the syntax of FOREACH macros to be less dumb. 2013-08-04 16:08:57 +02:00
attilamolnar
ac55270a08 Move dynamic_reference and related classes to dynref.h 2013-07-19 19:40:02 +02:00
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
0a8b0d317e Remove unused variables, avoid copies where possible, check empty() instead of size() == 0
Most of these were detected by cppcheck
2013-05-16 20:33:46 +02: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