git.stg.codes
/
stg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed storing relation between users and services.
[stg.git]
/
include
/
stg
/
user_ips.h
diff --git
a/include/stg/user_ips.h
b/include/stg/user_ips.h
index 264b58960ac2df91e5fa59d991b5583219a8a98a..e55f99fa7fc114460681fcebe87c8639ef2ee259 100644
(file)
--- a/
include/stg/user_ips.h
+++ b/
include/stg/user_ips.h
@@
-70,6
+70,7
@@
public:
std::string GetIpStr() const;
bool IsIPInIPS(uint32_t ip) const;
bool OnlyOneIP() const;
std::string GetIpStr() const;
bool IsIPInIPS(uint32_t ip) const;
bool OnlyOneIP() const;
+ bool IsAnyIP() const;
size_t Count() const;
void Add(const IP_MASK &im);
void Erase();
size_t Count() const;
void Add(const IP_MASK &im);
void Erase();
@@
-172,6
+173,12
@@
return false;
}
//-----------------------------------------------------------------------------
inline
}
//-----------------------------------------------------------------------------
inline
+bool USER_IPS::IsAnyIP() const
+{
+ return !ips.empty() && ips.front().ip == 0;
+}
+//-----------------------------------------------------------------------------
+inline
void USER_IPS::Add(const IP_MASK &im)
{
ips.push_back(im);
void USER_IPS::Add(const IP_MASK &im)
{
ips.push_back(im);