2137 Commits

Author SHA1 Message Date
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
295b3e7ba1 Fix clang warning about IsOper() 2013-04-11 21:58:23 +02:00
attilamolnar
01ea7ce9c3 BanCache: Move expiration code into a function, call it from RemoveEntries() 2013-04-10 19:27:24 +02:00
attilamolnar
2b1328c3f4 BanCache: Remove BanCacheManager::RehashCache()
The function was never called
2013-04-10 19:27:24 +02:00
attilamolnar
05ea981523 BanCache: Simplify BanCacheManager::RemoveEntries() 2013-04-10 19:27:24 +02:00
attilamolnar
a0fdf5fcd5 BanCache: Remove BanCacheHit::IP field, and BanCacheManager::RemoveHit()
The IP field was only used in RemoveHit(), RemoveHit() was only called from GetHit()
2013-04-10 19:27:24 +02:00
attilamolnar
c5d1a7843e BanCache: Don't repeat ourselves, one BanCacheManager::AddHit() and one BanCacheHit constructor is enough 2013-04-10 19:27:23 +02:00
attilamolnar
ca0083cba9 Replace IS_AWAY() and IS_OPER() macros with User::IsAway() and User::IsOper() 2013-04-10 17:28:08 +02:00
attilamolnar
99461ac66d Fix ListModeBase on Windows 2013-04-09 21:41:18 +02:00
attilamolnar
01b71ef43f Move most whois related code from the core into cmd_whois 2013-04-09 18:36:49 +02:00
attilamolnar
8c4dfd8add XLine: Provide a default implementation for DisplayExpiry() 2013-04-09 18:30:50 +02:00
attilamolnar
98beba078b ListModeBase: Cache max items per channel 2013-04-08 23:13:25 +02:00
attilamolnar
9de86c34d4 ListModeBase: Minor changes to original u_listmode code
- Add constructors to ListItem, ListLimit
- Rename fields in ListItem
- Store time as time_t instead of string
- Store limits in a vector instead of a list
- Don't deallocate the list when it becomes empty
2013-04-08 23:13:25 +02:00
attilamolnar
ebe5b201aa Migrate u_listmode.h into the core, change +b to use it 2013-04-08 23:13:24 +02:00
attilamolnar
0ce252f05c Add builtin modes using AddService() 2013-04-08 23:13:24 +02:00
attilamolnar
1bf6cf727d Unite include/modes/*.h into include/builtinmodes.h 2013-04-08 23:13:24 +02: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
Peter Powell
2ae42bbb1f Default to the XML config format. 2013-04-06 11:47:56 +01:00
Peter Powell
362f3009ac Merge inspircd_{config,version}.h into a single header file. 2013-04-05 16:39:40 +01:00
attilamolnar
bb3aa2fb37 Stop recreating hashmaps every hour, move garbage collection code related to local users to UserManager 2013-04-04 19:23:16 +02:00
attilamolnar
f86f450701 Move whowas settings into cmd_whowas from ConfigReader 2013-04-04 19:05:20 +02:00
attilamolnar
8c08130e19 Make cmd_whowas act like a module, remove special handling 2013-04-04 19:05:20 +02:00
attilamolnar
886f1ba488 Convert InspIRCd::Duration() to be static 2013-04-03 15:54:28 +02:00
attilamolnar
26e7bb0b9a Whitespace and empty destructor removal, minor coding style changes 2013-04-01 21:56:13 +02:00
Attila Molnar
66b90807bb Merge pull request #452 from SaberUK/master+nuke-hashmap
Purge the deprecated hash_map from existance.
2013-04-01 09:50:50 -07:00
attilamolnar
80e88c163d Move member variables from User to LocalUser
- idle_lastmsg
- dns_done
- quitting_sendq
- exempt
- lastping
2013-04-01 17:05:12 +02:00
attilamolnar
713416ddfc Change IsNickHandler()/IsIdentHandler()/IsChannelHandler() to use C++ strings as arguments instead of C strings 2013-04-01 16:20:35 +02:00
attilamolnar
6a080dfd91 Convert IsSID() to a static member function, modules shouldn't override it 2013-04-01 16:15:19 +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
Attila Molnar
df2cbbe6e7 Merge pull request #454 from SaberUK/master+misc-improvements
Purge dead code and deprecated types.
2013-04-01 06:53:24 -07:00
Peter Powell
f00ffba521 Purge references to the deprecated GetStackedLine method. 2013-04-01 10:43:12 +01:00
Peter Powell
d877be98d1 Purge the deprecated chanprotect module. 2013-04-01 10:43:12 +01:00
Peter Powell
6b71f21137 Remove some dead code:
- Conditions in m_httpd_stats which can never be true.
- Commented out code in m_sqloper.
- Unused macro in inspircd.h.
2013-04-01 10:42:23 +01:00
Peter Powell
52fa9f8fbc Add macro for marking methods as deprecated. 2013-04-01 10:39:55 +01:00
Peter Powell
fd655fa93a Purge the deprecated hash_map from existance. 2013-04-01 05:57:33 +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
Adam
9b9140d5f8 Rewrote caller.h to be more C++11 ish, currently commented out pending whenever we decide to support some C++11 features 2013-03-31 19:08:36 -05:00
attilamolnar
d1b9bf8e35 New API version 2013-04-01 01:42:49 +02:00
attilamolnar
12872e3d4b Change User::GetIPString() to return const std::string& 2013-04-01 01:27:02 +02:00
attilamolnar
56cae0f3a4 Remove legacy code, mostly related to 1.2 compatibility 2013-04-01 00:54:58 +02:00
attilamolnar
fd6a8e9392 Add support for mandatory tags in included config files
If the mandatory tag is not found in the included config, the rehash is aborted. This is especially useful for remote includes, as it allows users to have a dummy tag at the end of the included config to indicate that the config has been wholly read.
This method does not depend on exit codes so even situations where wget returns an empty or a wrong page that we would otherwise accept can be detected and an error can be generated before we assume that the contents have disappeared (and unload all modules, if the included file is supposed to contain module tags, for example).

Usage: <include ... mandatorytag="namehere"> - if the included config doesn't contain a <namehere> tag then the rehash is aborted

Fixes #30 reported by @Justasic
2013-03-20 21:43:46 +01:00
attilamolnar
ade9cc2134 Remove dead code from DNS 2013-03-11 20:52:21 +01:00
attilamolnar
fe9e594755 Fix m_dnsbl not checking cgiirc users when the cgiirc address is elined 2013-03-11 20:48:58 +01:00
Peter Powell
2e04480f21 Use the preprocessor to detect whether hash_map is available. 2013-01-28 21:38:03 +00:00
Peter Powell
1883b0cebe Fix warning: "const type qualifier on return type has no effect". 2013-01-16 11:13:23 +00:00
Peter Powell
020eeeabd8 Include <list> in base.h to prevent build errors on OpenBSD. 2012-12-25 18:39:03 +01:00