2336 Commits

Author SHA1 Message Date
Attila Molnar
5303501b93 Add a ModeParser::FindMode() overload that takes a mode name and a mode type 2014-02-20 13:34:27 +01:00
Attila Molnar
f66d05dbda Create a name -> ModeHandler* map 2014-02-20 13:20:21 +01:00
Attila Molnar
7bcb703bca Replace ModeMasks with a two-dimensional array 2014-02-18 13:47:10 +01:00
Attila Molnar
8f901b33a8 Change the parameter type of ModeHandler::GiveModeList() from ModeMasks to ModeType 2014-02-18 13:41:01 +01:00
Attila Molnar
0556720b55 Add ParamModeBase and ParamMode, change all parameter modes to inherit from ParamMode
- Type of the extension used to store data is a template parameter
- The extension is automatically unset when the mode is unset
- Handlers inheriting from ParamMode have to provide OnSet() and SerializeParam(); may optionally provide OnUnset()
- Transparently handle the case when OnSet() modifies the mode parameter
- Remove Channel::custom_mode_params map; ask the mode handlers to serialize their parameters instead
2014-02-15 14:38:24 +01:00
Attila Molnar
88baaf9e68 Add ModeHandler::IsParameterMode() and MC_PARAM 2014-02-15 13:51:35 +01:00
Attila Molnar
8bdc2313a6 Move GetAllPrefixChars() from Channel to Membership 2014-02-14 12:16:31 +01:00
Attila Molnar
74ccc28da3 Move GetPrefixChar() from Channel to Membership 2014-02-14 12:15:00 +01:00
Attila Molnar
51b5f06c48 Return a Membership* from get_first_visible_channel() in cmd_who and pass that to modules 2014-02-14 12:00:06 +01:00
Attila Molnar
6fb7507c58 Replace DummyExtItem with a flag in Extensible 2014-02-10 13:56:14 +01:00
Attila Molnar
4ec65c6231 Call DelFd() and SetFd(-1) from SocketEngine::Close(EventHandler*) 2014-02-09 17:17:04 +01:00
Attila Molnar
efe77ba63b Change all socketengine methods to be static 2014-02-08 23:01:44 +01:00
Attila Molnar
689996cb88 Move socketengine stats into a new class 2014-02-08 22:40:30 +01:00
Attila Molnar
b01820c079 Rename SocketEngine::AddFd() and DelFd() to AddFdRef() and DelFdRef() 2014-02-08 22:25:06 +01:00
Attila Molnar
ed6176383e Replace SocketEngine::GetName() with INSPIRCD_SOCKETENGINE_NAME define 2014-02-08 13:16:31 +01:00
Attila Molnar
2cf4b614e6 Change SocketEngine functions that do not require an instance to be static 2014-02-08 13:10:09 +01:00
Attila Molnar
5b6ae9c542 Only compile the testsuite if INSPIRCD_ENABLE_TESTSUITE is defined 2014-02-07 18:21:01 +01:00
Peter Powell
9dd4108273 Convert irc::stringjoiner to be a method instead of a class.
Add separator parameter
2014-02-06 23:11:51 +01:00
Peter Powell
db0e78c5d2 Fix various cases of UUID exposure.
- Introduce WriteCommand which sends * when the user has not registered.
- Switch a ton of code to use WriteCommand instead of WriteServ.
- Convert WriteNotice to be a wrapper around WriteCommand.
- Only send * when NICK has not been sent instead of before registration.
2014-02-06 23:10:01 +01:00
Adam
3752b3f59d New socketengine stuff:
Use vectors that grow as necessary instead of mass allocating everything at once
Rework poll engine logic to make sense
2014-02-04 22:39:12 +01:00
Attila Molnar
d7164e521b Change type of SocketEngine::CurrentSetSize to size_t from int 2014-02-04 21:10:45 +01:00
Attila Molnar
98ef89c392 Remove some dead code 2014-01-31 14:27:32 +01:00
Attila Molnar
5ac1ffce11 Allow Timers to delete themselves in Tick() 2014-01-30 21:44:51 +01:00
Attila Molnar
3fef0ed889 Add ProtocolInterface::BroadcastEncap() and infrastructure for manually forwarding ENCAPs 2014-01-26 13:12:01 +01:00
Attila Molnar
92cc388aeb ProtocolInterface::SendEncapsulatedData() changes
- Pass command name and destination as real parameters
- Allow callers to specify the command source
- Send a SID instead of a server name if the target is a single server
2014-01-26 13:05:09 +01:00
Attila Molnar
1db0e984be Add Channel* parameter to OnSendWhoLine 2014-01-25 12:40:21 +01:00
Peter Powell
074727e7a7 Convert InspIRCd::PassCompare to return bool instead of int.
The insane behaviour of this method was due to an implementation
detail which has since become irrelevent.
2014-01-25 12:20:04 +01:00
Attila Molnar
458168b575 Convert InviteBase::invites to an intrusively linked list 2014-01-24 13:20:11 +01:00
Attila Molnar
8537a54950 Remove classbase inheritance from Invitation 2014-01-24 13:12:40 +01:00
Attila Molnar
f1f8173bb5 Convert LocalUserList to an intrusively linked list 2014-01-24 13:08:13 +01:00
Attila Molnar
932e8d13f8 Convert UserChanList to an intrusively linked list 2014-01-24 12:58:01 +01:00
Attila Molnar
9a962e1c51 Add intrusive list template 2014-01-24 12:37:43 +01:00
Attila Molnar
d02011d69f Remove whitespace and minor style changes 2014-01-23 14:37:09 +01:00
Attila Molnar
87ec27cf3c Remove unneeded classbase inheritance from FileReader 2014-01-23 14:06:07 +01:00
Attila Molnar
99f79a4e5c Split IOHook into IOHook and IOHookProvider
Create one IOHook instance for each hooked socket which contains all the
hook specific data and read/write/close functions, removing the need for
the "issl_session" array in SSL modules.

Register instances of the IOHookProvider class in the core and use them to
create specialized IOHook instances (OnConnect/OnAccept).

Remove the OnHookIO hook, add a dynamic reference to ListenSocket that
points to the hook provider (if any) to use for incoming connections on
that socket.

For outgoing connections modules still have to find the IOHookProvider
they want to use themselves but instead of calling AddIOHook(hookprov),
now they have to call IOHookProvider::OnConnect() after the connection
has been established.
2014-01-22 19:10:01 +01:00
Attila Molnar
e244cb2c63 Merge insp20 2014-01-21 18:44:08 +01:00
Attila Molnar
89510c143f Bump API version because of 3f4d54eb031f1cd6b016dfe1f768ed86303e3856 2014-01-21 14:13:02 +01:00
Attila Molnar
d379dcab40 Read uline state in spanningtree; remove ConfigReader::ulines 2014-01-08 12:41:01 +01:00
Attila Molnar
5a366d8945 Unset all extensions and the topic when lowering TS on a channel 2014-01-06 13:29:10 +01:00
Attila Molnar
9136136ac3 Move server description field from TreeServer into Server; remove OnGetServerDescription hook 2014-01-05 15:20:17 +01:00
Attila Molnar
11916574f6 Introduce Server class
- Replaces std::string server in User
- Replaces InspIRCd::ULine() and SilentULine()
2014-01-05 15:04:01 +01:00
Attila Molnar
d736eba00b Improve UserManager::QuitUser() and related code
- Make operreason optional; NULL means same as quitreason
- Remove User::quietquit, it is now handled internally in spanningtree
- Send snotice about quitting remote users from spanningtree
2014-01-05 14:17:12 +01:00
Attila Molnar
a500ec70bb Change type of snomask parameter to char in ProtocolInterface::SendSNONotice() 2014-01-04 19:43:04 +01:00
Attila Molnar
b5bc73e310 Add functor that does strict weak ordering based on national_case_insensitive_map 2014-01-04 19:38:20 +01:00
Peter Powell
428e8f4f69 Fix some Windows-related problems.
- Fix an error relating to the unavailability of std::back_inserter.
- Fix loading configuration files when using relative paths.
- Fix two methods in hashcomp being exported twice.
- Remove some unimportant error messages.
2014-01-04 19:31:29 +01:00
Adam
dbbd333956 Add m_ldap, and convert m_ldapoper and m_ldapauth to use it. 2013-12-19 16:40:11 +01:00
Attila Molnar
1e8389b27f Clean up CoreException
- Remove default constructor
- Replace virtual functions returning C strings with functions returning const std::string refs
2013-12-18 16:20:40 +01:00
Attila Molnar
ff407e6751 Remove unused motd and rules field from ServerConfig 2013-12-18 16:07:50 +01:00
Peter Powell
ad47ea6626 Make various self contained methods static.
- InspIRCd::IsValidMask
- InspIRCd::TimeString
2013-12-15 06:46:44 +00:00
Peter Powell
07d0d8f52f Remove some pointless code:
- Remove the CHARSET entry from ISUPPORT.

  CHARSET was removed in draft-brocklesby-irc-isupport-03 and we
  always used the default value anyway. This has also been removed
  in the latest version of Charybdis.

- Remove irc::sockets::satouser.

  This helper method was longer than the code it replaced.
2013-12-15 06:46:44 +00:00