337 Commits

Author SHA1 Message Date
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
attilamolnar
13b7084eae Change User::SetClientIP() to be virtual 2012-10-03 20:36:20 +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
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
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
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
Robby-
46a3904619 Replace copyright headers with headers granting specific authors copyright 2012-04-19 20:58:29 +02:00
Justin Crawford
df5f76832e Fixes for bug #12 2012-04-14 18:03:25 -07:00
Rutger
10e0af3831 Add <connect:maxconnwarn>
Created the maxconnwarn variable in the connect block, so you can make
connect blocks that only warns about max connections if you want to.
This reduces noise from connecting clients that have low maxlocal and/or
maxglobal. It is enabled by default.
2012-04-01 21:11:25 +02:00
Jackmcbarn
58ab072505 Fix recursion of QuitUser in SendQ quits 2011-05-23 21:51:08 -04:00
danieldg
69e28c67dd Remove possible references to deleted User objects due to DNS lookups
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12445 e03df62e-2008-0410-955e-edbf42e46eb7
2010-02-12 22:30:27 +00:00
danieldg
8e34d66ef3 Add OnSetConnectClass hook for use in adding requirements to connect classes (such as requiressl)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12352 e03df62e-2008-0410-955e-edbf42e46eb7
2010-02-02 15:02:33 +00:00
danieldg
7fdd55570e Update connect block matching on rehash to prefer names, show more useful information in /STATS i
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12337 e03df62e-2008-0410-955e-edbf42e46eb7
2010-01-31 19:54:18 +00:00
danieldg
1cda046fed Allow connect classes to be specified without an allow or deny mask
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12336 e03df62e-2008-0410-955e-edbf42e46eb7
2010-01-31 03:42:20 +00:00
danieldg
dfc2301e0b Remove UpdateNickHash due to incorrect behavior
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12331 e03df62e-2008-0410-955e-edbf42e46eb7
2010-01-30 18:56:39 +00:00
danieldg
ab8305ad99 Move nick change code out of cmd_nick; fixes double-invocation of hooks and may eliminate bug #911
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12330 e03df62e-2008-0410-955e-edbf42e46eb7
2010-01-30 18:40:51 +00:00
danieldg
aeded4708c Fix MOTD and RULES to work remotely (remove the old hacks for MOTD)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12301 e03df62e-2008-0410-955e-edbf42e46eb7
2010-01-19 04:43:19 +00:00
brain
cd712c40e1 ...because every now and again, i have to do a massive commit.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12248 e03df62e-2008-0410-955e-edbf42e46eb7
2010-01-11 03:07:32 +00:00
danieldg
3cd1a24a51 Remove mode counter, not reliable and only used for umode +i
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12246 e03df62e-2008-0410-955e-edbf42e46eb7
2010-01-09 17:48:40 +00:00
danieldg
0f87ad0d4b Add fine-grained command flood controls
This reintrouces "Excess Flood" quits for those that prefer it to fakelag,
and allows the maximum command rate to be set in the connect block.

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12093 e03df62e-2008-0410-955e-edbf42e46eb7
2009-11-11 19:52:03 +00:00
danieldg
a26502ff51 Move StreamSocket inheritance off of User
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12047 e03df62e-2008-0410-955e-edbf42e46eb7
2009-11-06 22:37:36 +00:00
danieldg
18ab1f358a Fix global clone count not being decremented on remote user quit
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11984 e03df62e-2008-0410-955e-edbf42e46eb7
2009-11-01 21:53:47 +00:00
danieldg
6fe52cbb3b Fixes found by removing User inheritance from StreamSocket
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11975 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-25 15:21:45 +00:00
danieldg
9fad3ecb92 Create irc::sockets::cidr_mask
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11968 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-24 20:04:05 +00:00
danieldg
6b2ea83367 Move forward declarations to typedefs.h
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11967 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-24 20:03:53 +00:00