summaryrefslogtreecommitdiffstats
path: root/ClientInfo.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'ClientInfo.hpp')
-rw-r--r--ClientInfo.hpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/ClientInfo.hpp b/ClientInfo.hpp
index a9010eb..9c39c44 100644
--- a/ClientInfo.hpp
+++ b/ClientInfo.hpp
@@ -3,6 +3,7 @@
#include <QString>
enum ClientInterface {
+ Auto = 0,
Clonk = 1,
IRC = 1 << 1,
Management = 1 << 2
@@ -66,6 +67,13 @@ public:
return ret;
}
+ static inline ClientInfo autoClient()
+ {
+ ClientInfo ret;
+ ret.interface = Auto;
+ return ret;
+ }
+
inline bool operator==(const ClientInfo& other)
{
return other.interface == interface && other.nick == nick && (interface == Clonk ? other.pcName == pcName && other.CUID == CUID : true);
@@ -78,6 +86,6 @@ public:
inline QString toString() const
{
- return (!nick.isEmpty() ? nick + (interface == Clonk ? " (" + pcName + ")" : " (IRC)") : "");
+ return interface == Auto ? "~auto~" : interface == Management ? management.name + " {CLI}" : (!nick.isEmpty() ? nick + (interface == Clonk ? " (" + pcName + ")" : " [IRC]") : "");
}
};