* Copyright (C) 2019 linuxdaemon <linuxdaemon.irc@gmail.com>
* Copyright (C) 2013 Daniel Vassdal <shutter@canternet.org>
* Copyright (C) 2012-2016, 2018 Attila Molnar <attilamolnar@hush.com>
- * Copyright (C) 2012-2013, 2016-2020 Sadie Powell <sadie@witchery.services>
+ * Copyright (C) 2012-2013, 2016-2021 Sadie Powell <sadie@witchery.services>
* Copyright (C) 2012, 2019 Robby <robby@chatbelgie.be>
* Copyright (C) 2012 DjSlash <djslash@djslash.org>
* Copyright (C) 2012 ChrisTX <xpipe@hotmail.de>
REG_USER = 1, /* Has sent USER */
REG_NICK = 2, /* Has sent NICK */
- REG_NICKUSER = 3, /* Bitwise combination of REG_NICK and REG_USER */
- REG_ALL = 7 /* REG_NICKUSER plus next bit along */
+ REG_NICKUSER = 3, /* Bitwise combination of REG_NICK and REG_USER */
+ REG_ALL = 7 /* REG_NICKUSER plus next bit along */
};
enum UserType {
*/
unsigned int registration_timeout;
- /** Host mask for this line
- */
+ /** Hosts that this user can connect from as a string. */
std::string host;
+ /** Hosts that this user can connect from as a vector. */
+ std::vector<std::string> hosts;
+
/** Number of seconds between pings for this line
*/
unsigned int pingtime;
/** Update the settings in this block to match the given block */
void Update(const ConnectClass* newSettings);
- const std::string& GetName() { return name; }
- const std::string& GetHost() { return host; }
+ const std::string& GetName() const { return name; }
+ const std::string& GetHost() const { return host; }
+ const std::vector<std::string>& GetHosts() const { return hosts; }
/** Returns the registration timeout
*/
class CoreExport User : public Extensible
{
private:
- /** Cached nick!ident@dhost value using the displayed hostname
+ /** Cached nick!ident\@dhost value using the displayed hostname
*/
std::string cached_fullhost;
- /** Cached ident@ip value using the real IP address
+ /** Cached ident\@ip value using the real IP address
*/
std::string cached_hostip;
- /** Cached ident@realhost value using the real hostname
+ /** Cached ident\@realhost value using the real hostname
*/
std::string cached_makehost;
- /** Cached nick!ident@realhost value using the real hostname
+ /** Cached nick!ident\@realhost value using the real hostname
*/
std::string cached_fullrealhost;
class CoreExport UserIOHandler : public StreamSocket
{
private:
- size_t checked_until;
+ size_t checked_until;
public:
LocalUser* const user;
UserIOHandler(LocalUser* me)
/** Set the connect class to which this user belongs to.
* @param explicit_name Set this string to tie the user to a specific class name. Otherwise, the class is fitted by checking \<connect> tags from the configuration file.
- * @return A reference to this user's current connect class.
*/
void SetClass(const std::string &explicit_name = "");