548 Commits

Author SHA1 Message Date
Peter Powell
f4041a13c3 Release v3.0.0 release candidate 1. 2019-01-07 22:41:54 +00:00
Peter Powell
6adca3e099 Fix the OnSendWhoLine event being completely broken with WHOX. 2018-11-15 19:24:47 +00:00
Peter Powell
0e6b18ff91 Fix warnings from Doxygen. 2018-10-21 19:18:08 +01:00
Peter Powell
cae87fa047 Switch all core modules still using COMMAND_INIT to MODULE_INIT. 2018-09-23 14:19:06 +01:00
Peter Powell
7e9ec8e490 Amend OnPostCommand to specify whether the command is loopcalled.
This restores previous behaviour which was lost when the original
line parameter was removed.
2018-09-11 09:03:47 +01:00
Peter Powell
f7a115884f Rename OnChangeLocalUserHost to OnPreChangeHost for consistency. 2018-08-14 00:22:59 +01:00
Peter Powell
10b17a0e9f Remove the OnInfo event.
This is not used by anything and On{Post,Pre}Command hooks can
be used if people really want to add stuff to INFO.
2018-08-14 00:18:13 +01:00
Peter Powell
58a0a7e014 Implement IRCv3 message tag support.
Co-authored-by: Attila Molnar <attilamolnar@hush.com>
2018-08-13 21:51:11 +01:00
Peter Powell
ba23c2b115 Convert AWAY to use cross-module events and clean up slightly.
OnSetAway has been replaced with four events. OnUserPreAway and
OnUserPreBack can be used to deny an away state change and/or
change the away message of a local user. OnUserAway and OnUserBack
allow modules to be notified that a user's away state has changed.
2018-08-12 15:01:45 +01:00
Peter Powell
213e4d9680 Remove the original line parameter of On{Pre,Post}Command.
In the brave new world of message tags and alternate wire formats
this is no longer something that is appropriate to expose.

In reality it was only ever used by m_alias which now reconstitutes
the command name and parameters into a RFC 1459-style message for
whatever it needs to do.
2018-08-10 13:55:32 +01:00
Peter Powell
d9a52277df Remove support for static modules.
This has been frequently broken in the past and as far as I know is
used by literally nobody.

Also, even if all modules are compiled into the core any libraries
linked against are and have always been linked dynamically making
this unusable on platforms without dynamic libraries.
2018-07-31 03:20:18 +01:00
Peter Powell
7bde9de9b3 Replace most usages of "name" with "real" or "real name". 2018-07-30 18:34:57 +01:00
Peter Powell
8cb20e3545 Replace most usages of "GECOS" with "real" or "real name". 2018-07-30 18:30:11 +01:00
Peter Powell
384ef31bc0 Use CommandBase::Params instead of std::vector<std::string>.
This is presently a typedef but will soon be replaced with a class
that encapsulates both tags and parameters.
2018-07-26 20:12:14 +01:00
Peter Powell
ef48486b09 Rename IntModuleList to Module::List. 2018-07-24 10:02:27 +01:00
Peter Powell
35b70631f0 Merge tag 'v2.0.26' into master. 2018-04-22 13:02:19 +01:00
Peter Powell
b86d7db056 Call OnUserMessageBlocked when a PRIVMSG or a NOTICE is blocked.
This is necessary to allow m_ircv3_echomessage to pretend that a
message was echoed successfully. This is useful as it doesn't let
spammers know that their message was blocked.
2018-04-16 17:02:42 +01:00
Peter Powell
aa19c8fc02 Remove swhois messages set in the oper block on deoper.
Closes #1240.
2018-04-09 11:59:09 +01:00
Peter Powell
454c8d3749 Move OnStats from the core to a cross-module event.
Some core code still exists in the XLine system but this will be
replaced when the XLine system is replaced later.
2018-04-08 16:54:27 +01:00
Peter Powell
d2efdbf6bb Fix building on Windows (mostly). 2018-02-17 17:12:26 +00:00
Peter Powell
2fcb5ff438 Rework message handling.
- Move all message-related types to their own header to make moving
  them to a cross-module events easier.
- Rename OnUserMessage to OnUserPostMessage.
- Rename OnText to OnUserMessage.
- Replace the dest, target_type, and status parameters with the
  MessageTarget class.
- Replace the text, exempt_list, and msgtype parameters with the
  MessageDetails struct.
- Add echooriginal and originaltext to the MessageDetails struct
  to allow spam filtering to not be broken by cap echo-message.
2018-01-06 14:18:21 +00:00
Peter Powell
70be9c79d2 Move OnSync{Channel,Network,User} to ServerEventListener. 2017-12-03 13:58:10 +00:00
Peter Powell
91e0af0fc4 Add the override keyword in places that it is missing.
GCCs warnings for this are much better than Clangs.
2017-11-21 15:51:45 +00:00
Attila Molnar
3b51dfb1d6 Add events which are fired when a service is added or deleted. 2017-11-16 14:15:25 +00:00
Peter Powell
9eac41bf5a Tweak the module flags in MODULES slightly.
Using unique letters for each flag makes it easier to read when
using fonts which have similar glyphs for upper and lower case
characters.
2017-10-21 22:03:43 +01:00
Peter Powell
ee7ac5aaed Clean up OnCleanup.
- Switch to using ExtensionItem::ExtensibleType for the type instead
of TargetTypeFlags.
- Pass the extensible to OnCleanup as an Extensible pointer
instead of a void pointer.
- Call OnCleanup for memberships as well as channels and users.
- Rewrite event documentation to remove outdated references.
2017-10-18 12:54:51 +01:00
Peter Powell
a1bc06e8a0 Update a bunch of references to the old command modules. 2017-08-27 13:18:58 +01:00
Peter Powell
a62ae50007 Fix a bunch of Doxygen warnings. 2017-08-26 09:58:15 +01:00
Peter Powell
d1df2bce56 Add CXX11_OVERRIDE to overridden members that lack it.
This fixes a ton of warnings when building on compilers that
default to C++11 or newer.
2017-07-12 14:41:52 +01:00
Peter Powell
b8d85c6251 Update stuff for the new versioning system. 2016-09-02 22:13:22 +02:00
Attila Molnar
6c4a6b1753 Deduplicate mode unregistering code in ModuleManager::DoSafeUnload() and extract into a method 2016-08-29 14:33:25 +02:00
Attila Molnar
f9455b925d Remove unused EventHandlerIter typedef 2016-08-29 14:30:41 +02:00
Attila Molnar
85456f0bd3 Remove virtual destructor of class Version
No classes inherit from it and it is only used as the return value from Module::GetVersion() which returns it by value
2016-08-11 10:58:21 +02:00
Attila Molnar
925afed1b9 Don't exit on rehash if the pid file cannot be written 2016-06-17 12:04:12 +02:00
Peter Powell
30bd7bb39f Rename PURE_STATIC to INSPIRCD_STATIC. 2016-04-04 13:20:21 +01:00
Attila Molnar
725c954efb Send WHO reply numerics with User::WriteNumeric(), pass Numeric::Numeric objects to the OnSendWhoLine hook 2016-02-26 15:59:20 +01:00
Attila Molnar
a5c00b1548 Return ModResult from the OnSendWhoLine hook 2016-02-26 15:40:22 +01:00
Attila Molnar
304b6dbbf5 Introduce Stats::Context, pass it to the OnStats hook and switch all code to it 2016-02-25 17:02:03 +01:00
Attila Molnar
da29af8cba Convert WriteNumeric() calls to pass the parameters of the numeric as method parameters 2016-02-25 16:12:09 +01:00
Attila Molnar
fd87f9f073 Add minimum channel rank and exception list parameters to the OnUserInvite hook 2015-12-06 11:24:39 +01:00
Attila Molnar
860f5cbf1e Merge branch 'master+serviceinit' 2015-12-02 13:30:24 +01:00
Attila Molnar
c290d09c45 Handle module reloading in core_reloadmodule entirely 2015-11-26 13:36:44 +01:00
Attila Molnar
a39bd397cd Extract code that manipulates the ModuleManager::DataProviders map into methods 2015-11-23 12:46:59 +01:00
Attila Molnar
9b9326ff08 Expand module names in ServerConfig::ApplyModules() 2015-06-04 00:03:29 +02:00
Attila Molnar
7bb75e575b Allow modules to be called as "foo" instead of "m_foo.so" 2015-05-20 15:02:24 +02:00
Attila Molnar
00c0409dd4 Remove support for non-unloadable (VF_STATIC) modules
No module we ship uses this flag and new modules should not use it either to make hotfixing possible
2015-05-12 23:42:20 +02:00
Attila Molnar
8f34594cb7 Move OnWhois* events to core_whois, add Whois::Context
Remove InspIRCd::SendWhoisLine()
2015-04-28 15:16:22 +02:00
Attila Molnar
8f5efbc7aa Merge insp20 2015-04-20 17:40:12 +02:00
Attila Molnar
7bea24293a Eliminate constant return value of the all events version of ModuleManager::SetPriority() 2015-02-15 17:58:47 +01:00
Attila Molnar
bfc1abbcad Convert mods calling the old compat wrapper of ModuleManager::SetPriority() to use the current method, remove wrapper 2015-02-15 17:56:01 +01:00