2095 Commits

Author SHA1 Message Date
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
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
attilamolnar
71d53e4883 Remove ServerLimits::Finalise(), it's completely wrong
Truncate <limits:identmax>+1 long idents in User::ChangeIdent()
2012-12-09 18:12:09 +01:00
attilamolnar
73074b0a78 Change a few signed counter variables to unsigned so they roll over later 2012-12-05 21:49:39 +01:00
attilamolnar
eea9343393 Throw an exception when attempting to register an extension with a name that already exists
Previously this silently failed
2012-12-02 19:43:20 +01:00
attilamolnar
74b05d5500 Make LocalUserList an std::list 2012-11-29 23:41:22 +01:00
attilamolnar
a589577b68 Add a typedef for LocalUserList 2012-11-29 23:41:22 +01:00
attilamolnar
504caa8ca9 Fix typo in doc and remove some whitespace 2012-10-29 18:33:07 +01:00
attilamolnar
954786c678 Move ServerConfig::ProcessColors() into class InspIRCd, as a helper function
Change signature to accept a file_cache reference so modules can use it easily
2012-10-29 18:27:17 +01:00
Peter Powell
3479532178 Fix for #268.
- Move color stripping code to helperfuncs.
- Strip color codes before matching filters.
2012-10-19 17:50:08 +02:00
ChrisTX
90aa5811d1 Resolve two warnings clang complains about
No newline at end of file in consolecolors.h
String plus int in snomasks
2012-10-14 23:58:20 +02:00
ChrisTX
ebdaf368e1 Replace printf(_c) with iostream 2012-10-14 02:13:49 +02: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
c8707149b2 Move simple user and channel mode handlers into a single file 2012-10-08 16:58:42 +02:00
attilamolnar
13b7084eae Change User::SetClientIP() to be virtual 2012-10-03 20:36:20 +02:00
attilamolnar
6abc0b8ca7 Make ConfigReader::GetSID() return a const reference to a string instead of a string 2012-09-30 03:04:08 +02:00
attilamolnar
2115bd71dc Call OnUserSetIP() whenever the IP of a local user changes, set ident,host,dhost in LocalUser constructor 2012-09-13 18:51:28 +02:00
attilamolnar
91abba488a New OnUserSetIP() hook 2012-09-13 18:51:28 +02:00
Adam
c4a53990f0 Fix bug #291 - fix rehashing bind tags not changing them between servers/clients and ssl/nonssl 2012-09-12 16:56:47 -04:00
attilamolnar
7aacf73950 Add a config option to enable/disable the welcome notice sent to clients after successful registration
Fixes #284 reported by @hoggeh
2012-08-25 00:37:04 +02:00
attilamolnar
41c26a03fa Move STATS handler back to cmd_stats so it's hotpatchable again 2012-07-13 17:18:07 +02:00
attilamolnar
074a96c9ff Close files opened with popen() with pclose() instead of fclose() 2012-07-11 16:34:50 +02:00
attilamolnar
a8d911c021 Don't manage memory manually for the commasepstream in irc::portparser 2012-07-11 15:01:31 +02:00
attilamolnar
03a8a981f1 Use std::set instead of std::map in irc::portparser 2012-07-11 15:01:31 +02:00
attilamolnar
d2d88b6371 #include <stdint.h>, add header guard to extensible.h
Fixes #102 reported by @kshade
2012-07-06 20:25:21 +02:00
Justin Crawford
c79475caa8 Added color codes to /rules, moved the parsing to ServerConfig and cleaned the code up a bit 2012-07-06 09:15:48 -07:00
Peter Powell
808a0a0957 Fix Doxygen syntax errors. 2012-07-05 21:00:35 +01:00
Robin Burchell
59dc6b0ec2 Revert "users: add SetClientIP function for irc::sockets::sockaddrs type."
This reverts commit f0474272303ac9297f637ce956315518138bafff.
2012-07-01 21:12:16 +02:00
Robin Burchell
2c3745edb3 Revert "users: introduce OnSetClientIP hook."
This reverts commit 5fd31ec5a6ba6021763b36d8d17d4665900623ab.
2012-07-01 21:11:59 +02:00
attilamolnar
f36892a2d4 Remove unused channelmanager 2012-06-30 00:05:00 +02:00
Peter Powell
b5e60891b6 InviteBase needs to be a CoreExport on Windows. 2012-06-28 01:19:11 +01:00
attilamolnar
d2e189102b Fix pending invites not being removed when a channel was deleted or had its TS lowered 2012-06-17 17:54:49 +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
William Pitcock
f047427230 users: add SetClientIP function for irc::sockets::sockaddrs type.
Code which touches client_sa should instead use this SetClientIP function so that hooks may
be called in the future.
2012-06-12 22:49:29 -07:00
attilamolnar
e3e7cb89e1 Add testsuite tests for UID generation 2012-05-27 23:30:02 +02:00
Peter Powell
cfbb5630c5 Fix compile error caused by unistd.h not existing on Windows. 2012-05-23 13:15:22 +01:00
Robin Burchell
fcacc8e030 Merge pull request #96 from Justasic/insp20
[2.0] Process escape sequences for MOTD for issue #23
2012-05-03 07:28:59 -07:00
Justin Crawford
a2d85a098e Fixed using a function on every call for /motd, causing lag on large networks (requested by w00t) 2012-04-22 23:59:53 -07:00
Robby-
46a3904619 Replace copyright headers with headers granting specific authors copyright 2012-04-19 20:58:29 +02:00
Robby-
627fa2acc8 Add conf/ to include paths and fix some typos 2012-04-19 10:30:08 +02:00
Robin Burchell
7f0eca26b4 FileWriter hasn't been non-blocking for a very, very long time. 2012-04-16 12:01:54 +02:00
Guillaume Delacour
937c562ce4 Fix compilation with GCC 4.7.
GCC 4.7 headers no longer implicitly include unistd.h in many places, see
http://gcc.gnu.org/gcc-4.7/porting_to.html

Fixes #65
2012-04-16 08:20:46 +02:00
Robin Burchell
76619990ad Merge pull request #55 from Justasic/insp20
[2.0] Fixes for bug #12
2012-04-15 12:53:52 -07:00