47 Commits

Author SHA1 Message Date
InspIRCd Robot
9f0f434771 Update copyright headers. 2024-11-02 08:42:20 +00:00
Sadie Powell
dfd72fe029 Remove some unnecessary uses of <iostream>. 2024-09-16 10:02:19 +01:00
InspIRCd Robot
d4da9eeff9 Update copyright headers. 2024-06-14 09:13:03 +01:00
Sadie Powell
dbc2b4ce9f Fix a conversion warning in win32service. 2024-06-07 14:40:41 +01:00
InspIRCd Robot
ae3e2db109 Update copyright headers. 2024-06-07 10:37:56 +01:00
Sadie Powell
b4e3e97329 Simplify the codes that InspIRCd can exit with.
The custom codes that InspIRCd exits with are not very useful and can confuse init systems like systemd which assume that certain
exit codes mean certain things. INSPIRCD_BINARY_EXIT was a workaround
for this in v3 but considering thatsers have to check the logs anyway
so we may as well just use EXIT_SUCCESS and EXIT_FAILURE.
2023-07-13 14:07:26 +01:00
Sadie Powell
45e56e5ee1 Yet more stylistic fixes. 2022-12-01 05:25:01 +00:00
Sadie Powell
89537ed2ab Fix various cases of the &* being next to the name instead of type. 2022-09-29 12:36:01 +01:00
Sadie Powell
648f813f8c Switch from NULL to nullptr. 2022-07-22 18:53:21 +01:00
Sadie Powell
4fd71323d3 Slim the included headers down more. 2022-01-26 14:00:58 +00:00
InspIRCd Robot
4540162276 Update copyright headers. 2021-08-27 09:38:22 +01:00
Herman
96e0f18f7f
Code refactor and minor fix (#1879) 2021-06-12 05:59:13 +01:00
InspIRCd Robot
e94b673532 Update copyright headers. 2021-05-14 14:48:39 +01:00
Sadie Powell
b4a174ee9c Fix a bunch of weird indentation and spacing issues. 2021-04-27 16:41:14 +01:00
Sadie Powell
2ba32afa9a Fix a bunch of really obvious unnecessary includes. 2021-03-05 09:17:13 +00:00
InspIRCd Robot
7b1ab06a95 Update copyright headers. 2021-03-05 02:16:11 +00:00
InspIRCd Robot
4f9abe96a4 Fixes by misspell-fixer 2020-04-21 00:52:12 -06:00
InspIRCd Robot
aa692dc103 Update copyright headers. 2020-01-11 22:14:43 +00:00
attilamolnar
034cf50b14 Use exit code EXIT_STATUS_SERVICE on Windows when exiting because of a service error 2013-06-18 21:26:54 +02:00
Peter Powell
362f3009ac Merge inspircd_{config,version}.h into a single header file. 2013-04-05 16:39:40 +01:00
ChrisTX
25aa230671 Win32: Rewrite the service wrapper
Edited original commit to pass MAX_PATH as nSize to GetModuleFileNameA() instead of 101 after approval from author @ChrisTX (Attila Molnar)

Fixes #404 reported by @crchauffe
2013-03-25 14:57:05 +01:00
attilamolnar
a87c56faea Fix thread handle leak in StartServiceThread() 2012-12-03 21:29:24 +01:00
attilamolnar
4451fd13a1 Fix broken RetrieveLastError()
- FORMAT_MESSAGE_IGNORE_INSERTS flag wasn't used and we never pass insertion parameters, this could cause FormatMessage() to fail
- The return value of FormatMessage() wasn't checked, if it returned zero (failure) then RetrieveLastError() returned garbage if err[] wasn't initialized previously
2012-12-03 21:28:38 +01: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
Robby-
46a3904619 Replace copyright headers with headers granting specific authors copyright 2012-04-19 20:58:29 +02:00
Adam
699a8b2fc8 Fix extras compilation under Windows 2011-06-18 17:25:35 -04:00
w00t
90ea385688 Hooray unused variables. Thanks MSVC.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11480 e03df62e-2008-0410-955e-edbf42e46eb7
2009-08-03 22:47:39 +00:00
psychon
b6dbd6caab Update all wiki links to point to the new wiki. This was done automatically with the following command, only .Makefile.inc got some indent fixups by hand.
for file in $(find -type f -and -not -path '*/.svn/*' -and -not -name '*.so') ; do sed -e 's#http://www.inspircd.org/wiki#http://wiki.inspircd.org#' -e 's#http://wiki.inspircd.org/index.php/#http://wiki.inspircd.org/#' -i $file ; done


git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11223 e03df62e-2008-0410-955e-edbf42e46eb7
2009-03-15 12:42:35 +00:00
w00t
43847ec9c7 Update copyrights for 2009.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10932 e03df62e-2008-0410-955e-edbf42e46eb7
2009-01-02 18:16:05 +00:00
brain
1fd22793d1 Windows compile fixes
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10343 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-28 20:30:32 +00:00
brain
097e19291f remove the testing debug setting
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10311 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-27 11:04:19 +00:00
brain
d807048fc6 Some comments
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10261 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-24 23:47:20 +00:00
brain
b708dff6d2 Use the error name constants here now rather than magic numbers. magic numbers blow goats.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10253 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-24 23:05:51 +00:00
brain
50fb079808 Properly name the windows service error constants and put proper descriptions in the error strings
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10251 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-24 23:02:03 +00:00
brain
3229dee5bb No names for the service specific errors, probably wont ever name them as theyre never shown in linux
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10245 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-24 21:05:15 +00:00
brain
a539875ecc Properly give the service specific exit code on failure to start. Now we just need to find out how to retrieve this
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10240 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-24 19:19:57 +00:00
brain
a6cf47a2cd work in progress
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10238 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-24 19:08:36 +00:00
brain
dab0a575e2 EWWW windows line endings!
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10223 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-22 20:01:13 +00:00
brain
7dd31e2b7a fixes
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10207 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-21 16:07:54 +00:00
brain
33295316f5 zap the evil externs, and comment the lot
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10205 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-21 14:41:55 +00:00
brain
cc3503abc4 detect if the process has an interactive session (if its started as a service, the window station will have no drawable surfaces, and we can detect this)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10199 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-21 13:36:15 +00:00
brain
823f071fd1 add text explanations of the error messages that can occur when adding or removing the service.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10197 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-21 12:39:21 +00:00
brain
e1fb9123c2 change startup type from SERVICE_DEMAND_START to SERVICE_AUTO_START so that inspircd boots with the system
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10196 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-21 12:19:09 +00:00
brain
c1a2a8abca make service log on as local service builtin account again. There was no issue with privileges except the fact i was using encryption on my files. doh.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10195 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-21 12:13:09 +00:00
brain
839ff9b521 now works 'enough' to progress further. Can start and stop the service and it accepts connections. NOTE: It will not function as local service. Needs to be possibly set as networkservice.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10194 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-21 11:21:46 +00:00
brain
2c5db1dfcb add support for windows service. This now is part of inspircd itself being as we have native build. It doesnt quite work yet in all the ways it should.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10193 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-21 11:01:51 +00:00