512 Commits

Author SHA1 Message Date
Attila Molnar
dbe5a1fc6f Add User::WriteRemoteNumeric() and switch code using SendText() to send numerics to it 2016-02-25 16:40:50 +01:00
Attila Molnar
da29af8cba Convert WriteNumeric() calls to pass the parameters of the numeric as method parameters 2016-02-25 16:12:09 +01:00
Attila Molnar
c89cc290fb Move already sent id rollover handling and static LocalUser::already_sent_id into UserManager 2015-11-03 13:13:00 +01:00
Attila Molnar
30fc51c6dd Rewrite invite system
- Moved out of core, now lives entirely in core_channel
- Accessible using the provided API after including the appropriate header
- Invites are stored in an extension attached to LocalUser/Channel objects, they no longer need special handling when destroying these objects or when lowering TS
- Expiration of timed invites are implemented using Timers
- When creating a new invite let a non-timed invite override a timed one
2015-11-02 13:28:55 +01:00
Attila Molnar
cf728bd8a3 Implement User::WriteCommonQuit() using ForEachNeighbor() in UserManager 2015-01-24 14:53:03 +01:00
Attila Molnar
662dfa6c18 Add User::ForEachNeighbor() 2015-01-24 14:49:10 +01:00
Attila Molnar
84ae29d0ea Move the intrusive list containers into the insp namespace 2014-08-30 10:35:21 +02:00
Attila Molnar
46c97a8db7 Rename UserChanList to User::ChanList, remove UCListIter 2014-07-14 16:24:59 +02:00
Attila Molnar
2eb0505a16 User::ChangeNick() cannot fail if the new nick is the uuid, document this and rely on it 2014-07-03 12:36:14 +02:00
Attila Molnar
393cc8f9d6 Remove now needless User::ForceNickChange()
Change call sites to call ChangeNick()
2014-07-03 12:27:24 +02:00
Attila Molnar
10bae31483 Remove unused User::WriteCommonExcept()
WriteCommonRaw(msg, false) has similiar functionality with a std::string parameter
2014-04-02 12:52:20 +02:00
Attila Molnar
2465f88a58 Move User::SendAll() into core_privmsg
This functionality is only used by the PRIVMSG and NOTICE handlers
2014-04-02 12:50:04 +02:00
Attila Molnar
a6e68c0d34 Remove User::WriteTo() functions; use User::WriteFrom() instead
The removed functions were rarely used and all they did was to call User::WriteFrom() with swapped arguments. On call sites, WriteTo() hardly offers any readability improvement over WriteFrom().
2014-04-02 12:44:12 +02:00
Attila Molnar
b1173ca66a Update nick timestamps in User::ChangeNick(), pass the new TS in a parameter 2014-03-03 15:07:17 +01:00
Attila Molnar
7ffef79f97 Index Channel::modes and User::modes with the id of the mode instead of its letter 2014-02-21 15:11:24 +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
Attila Molnar
458168b575 Convert InviteBase::invites to an intrusively linked list 2014-01-24 13:20:11 +01:00
Attila Molnar
f1f8173bb5 Convert LocalUserList to an intrusively linked list 2014-01-24 13:08:13 +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
Peter Powell
03a623a284 Rename <connect:nouserdns> to <connect:resolvehostnames>.
This name is more descriptive and avoids a double negative which
could make the name of this setting unclear to non-native speakers.
2013-08-10 14:04:09 +01:00
attilamolnar
dafa2f3031 Remove virtual User::GetClass() (but keep LocalUser::GetClass()) 2013-08-09 18:28:11 +02:00
attilamolnar
b4542af6b4 Accept std::string as parameter in User::ChangeHost(), ChangeIdent() and ChangeName()
Pass the string itself to IsIdent() instead of string.c_str()
2013-08-09 18:20:12 +02:00
attilamolnar
e4b76e6502 Move host cycle logic into m_hostcycle 2013-08-09 18:10:48 +02:00
attilamolnar
2dc01893c6 Get rid of enum UserModes and mark User::modes as private 2013-07-19 19:40:05 +02:00
attilamolnar
fd1d19d634 Replace hardcoded mode letters, part 3
This changes most remaining User::IsModeSet() calls to use ModeReferences for modes that were created by other modules or the core
2013-07-19 19:40:04 +02:00
attilamolnar
882084defc Move SetNoticeMask(), FormatNoticeMasks() and ProcessNoticeMasks() from the User class to the snomask modehandler 2013-07-19 19:40:03 +02:00
Daniel Vassdal
3ae91bafe7 Allow for skipping clone checking before DNS is complete. 2013-07-02 10:55:51 -07:00
attilamolnar
f2cdf27dd9 Replace hardcoded mode letters passed to IsModeSet() and GetModeParameter() with ModeHandlers, part 1 2013-07-01 19:21:08 +02:00
Peter Powell
146d72fddb Fix Doxygen comments. 2013-06-21 03:52:56 +01:00
Peter Powell
e01df6385e Convert User::SendText to use std::string. 2013-06-06 01:45:04 +01:00
Peter Powell
ef3799a43a Convert User::FormatNoticeMasks() to use std::string. 2013-06-06 01:45:04 +01:00
Peter Powell
c5bc6c1cf5 Replace some C string operations with the + operator. 2013-06-06 01:45:04 +01: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
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
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
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
attilamolnar
295b3e7ba1 Fix clang warning about IsOper() 2013-04-11 21:58: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
01b71ef43f Move most whois related code from the core into cmd_whois 2013-04-09 18:36:49 +02:00
attilamolnar
8c08130e19 Make cmd_whowas act like a module, remove special handling 2013-04-04 19:05:20 +02: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
12872e3d4b Change User::GetIPString() to return const std::string& 2013-04-01 01:27:02 +02:00
attilamolnar
fe9e594755 Fix m_dnsbl not checking cgiirc users when the cgiirc address is elined 2013-03-11 20:48:58 +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
74b05d5500 Make LocalUserList an std::list 2012-11-29 23:41:22 +01: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