2276 Commits

Author SHA1 Message Date
Peter Powell
3e105c6311 Fix spacing in calls to LogManager::Log. 2013-05-19 19:33:36 +01:00
Peter Powell
b180658962 Accept a LogLevel instead of an int in logging methods. 2013-05-19 17:11:57 +01:00
Peter Powell
5ad9b97fcf Purge a ton of code related to non <log> related logging.
- InspIRCd::OpenLog
- ./inspircd --logfile [file]

This is no longer needed now we have (since 1.2) custom logging.
2013-05-19 17:11:53 +01:00
Peter Powell
ad0828aa64 Move LogHeader to LogStream. 2013-05-19 03:22:54 +01:00
Peter Powell
ac726c8896 Move LogLevel enum from filelogger to logger. 2013-05-19 03:22:41 +01:00
Daniel Vassdal
42ae479081 Added macro to allow simpler logic in functions with the need to vsnprintf 2013-05-18 14:01:21 -07:00
attilamolnar
3ce33ee0e6 Change the signature of User::ForceNickChange() to accept const std::string& instead of const char* 2013-05-18 21:24:22 +02:00
attilamolnar
f3d134a5b6 Get rid of the NICKForced extension
Don't run OnUserPreNick when the nick change is forced
2013-05-18 21:23:52 +02:00
attilamolnar
b0d652a15f Remove unused UserManager::ServerPrivmsgAll() 2013-05-18 21:09:44 +02:00
attilamolnar
801af5b473 irc::tokenstream and irc::sepstream cleanup
irc::sepstream does not require virtual methods
2013-05-18 21:09:31 +02:00
attilamolnar
21eba8e86b irc::stringjoiner cleanup
- Get rid of unused constructors
- signed -> unsigned
- return const ref from GetJoined()
2013-05-18 21:08:25 +02:00
attilamolnar
780757cbc1 Deduplicate hex string creation code 2013-05-18 21:07:42 +02:00
Peter Powell
5c9427cde0 Remove the size argument from IsChannel and IsNick.
There was only one case (which was probably an error) where these
methods were not set to their ServerLimits value.
2013-05-18 19:11:07 +01:00
attilamolnar
67822c67e9 Initialize local_count 2013-05-18 16:03:17 +02:00
Daniel Vassdal
6153822a2d Added a function to replace all the ugly sprintf-ing everywhere 2013-05-16 21:34:45 +02:00
attilamolnar
bb962f92ac Workaround for std::list::size() having linear complexity on some implementations 2013-05-16 20:51:12 +02: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
Peter Powell
8e9abaaa73 Fix GCC warnings about using C++11 features when not in C++11 mode. 2013-05-16 16:43:35 +01:00
attilamolnar
712a0e5ff3 Get rid of strlcpy(), strlcat(), charlcat() and charremove() 2013-05-16 02:23:45 +02:00
attilamolnar
a2e9e2837d irc::Spacify-- 2013-05-16 01:57:09 +02:00
attilamolnar
c5a4658380 Allow spaces (and more) in oper types
The spaces are converted to '_' characters in OPERTYPE for 2.0 servers
Issue #533 suggested by @ankitkv
2013-05-16 01:56:06 +02:00
Peter Powell
accccc212c Replace some C-isms with C++-isms.
* 'const char*' to 'const std::string&'.
* snprintf to std::string concatenation.
* Replace duplicated OneOfMatches with InspIRCd::MatchMask.
2013-05-15 03:32:56 +01:00
Peter Powell
226a95aab0 Add method for writing server notices.
This allows us to send a server notice to a user without worrying
about whether they are registered or not.

If a user receives a server notice and they are not registered
then the nickname field will contain an asterisk instead of their
nick name.
2013-05-14 23:30:12 +01:00
Peter Powell
b89aa87280 Clean up cross-platform compatibility.
- Move compatibility macros to a new header file.
- Sort system include files in alphabetical order.
- Clean up signal handling (thanks to Adam).
2013-05-07 05:00:33 +02:00
attilamolnar
8790551dc1 Merge insp20 2013-04-28 00:32:14 +02:00
Peter Powell
f2566ff550 Move <performance:nouserdns> to <connect:nouserdns>. 2013-04-27 05:59:54 +01: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
2bb64c5dcf Move SocketEngine::IgnoreError() code into socketengine.h and add test for EWOULDBLOCK 2013-04-24 19:54:58 +02:00
attilamolnar
1638ee6193 Timer changes and TimerManager enhancements
Timer::Tick() now has a bool return value: if false is returned the timer is deleted using operator delete, otherwise, if it's a repeating timer then it's rescheduled (readded)
Timers are removed from the TimerManager automatically at destruction

Timers are now stored in a multimap instead of a sorted vector
2013-04-21 18:00:09 +02:00
Peter Powell
0d3a6719b8 Fix building with libc++.
- Purged std::tr1::strlower (was never used).
- Moved std::tr1::insensitive to irc::insensitive.
- Added TR1NS macro to point to the correct C++ TR1 namespace.
2013-04-19 01:34:07 +01:00
attilamolnar
326852f7dd Fix Windows build 2013-04-17 22:13:26 +02:00
Adam
47332d6e9b Fix m_ssl_gnutls and perhaps some other things on Windows by recognizing WSAEWOULDBLOCK 2013-04-16 18:19:42 -05:00
attilamolnar
895554aebc Use std::string internally in UIDGenerator, move UUID_LENGTH into the class as a constant 2013-04-14 18:35:41 +02:00
attilamolnar
48f7fa6b11 Extract UID/SID generation logic into a new class: UIDGenerator 2013-04-14 18:20:02 +02:00
attilamolnar
f8127cf8c5 Remove const char* versions of InspIRCd::FindNick()/FindNickOnly()/FindUUID()/FindChan() 2013-04-13 17:43:37 +02:00
attilamolnar
b98acac5c9 Channel::JoinUser() and Channel::ForceChan() changes
Convert static Channel::ForceChan() to non-static Channel::ForceJoin() that joins a user to a channel, no permission checks

The (static) Channel::JoinUser() now has a LocalUser parameter, and no longer have TS and bursting parameters. If the channel doesn't exist, it is created using current time as TS
2013-04-13 16:05:54 +02:00
attilamolnar
988d821807 OnUserPreJoin is a local-only hook, change User* parameter to LocalUser* 2013-04-13 15:34:12 +02:00
attilamolnar
d71b6a8b27 Remove the deprecated invite API 2013-04-13 15:34:11 +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
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