summaryrefslogtreecommitdiffstats
path: root/src/ClientInfo.hpp
diff options
context:
space:
mode:
authorMarkus Mittendrein <git@maxmitti.tk>2015-09-22 20:16:17 +0200
committerMarkus Mittendrein <git@maxmitti.tk>2015-09-22 20:16:17 +0200
commit1f5f2defd78714354e628cf1889235a6340f5625 (patch)
tree2c174181ad0e524df75d7f739fdaa9ed9e88f812 /src/ClientInfo.hpp
parent21b385a546b2bf5c3102de73aa2ce0b2d35c426f (diff)
downloadmanager-1f5f2defd78714354e628cf1889235a6340f5625.tar.gz
manager-1f5f2defd78714354e628cf1889235a6340f5625.zip
Use {CLI} instead of [CLI] as Chat-prefix for management users
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())