summaryrefslogtreecommitdiffstats
path: root/src/ClientInfo.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ClientInfo.hpp')
-rw-r--r--src/ClientInfo.hpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/ClientInfo.hpp b/src/ClientInfo.hpp
index 8099b59..cccff95 100644
--- a/src/ClientInfo.hpp
+++ b/src/ClientInfo.hpp
@@ -92,9 +92,16 @@ public:
return toString() < other.toString();
}
- inline QString toString() const
+ inline QString toString(bool asChatNick = false) const
{
- return interface == Auto ? "~auto~" : interface == Management ? management.name + " {CLI}" : (!nick.isEmpty() ? nick + (interface == Clonk ? " (" + pcName + ")" : " [IRC]") : "");
+ if(asChatNick)
+ {
+ return interface == Auto ? "<~auto~>" : interface == Management ? "{CLI}<" + management.name + ">" : interface == IRC ? "[IRC]<" + nick + ">" : "<" + nick + ">";
+ }
+ else
+ {
+ return interface == Auto ? "~auto~" : interface == Management ? management.name + "{CLI} " : (!nick.isEmpty() ? nick + (interface == Clonk ? " (" + pcName + ")" : " [IRC]") : "");
+ }
}
inline bool floodCheck(int maxCount, int floodTimeSecs, QDateTime newDateTime = QDateTime::currentDateTime())