diff options
| author | Markus Mittendrein <git@maxmitti.tk> | 2015-09-22 20:16:17 +0200 |
|---|---|---|
| committer | Markus Mittendrein <git@maxmitti.tk> | 2015-09-22 20:16:17 +0200 |
| commit | 1f5f2defd78714354e628cf1889235a6340f5625 (patch) | |
| tree | 2c174181ad0e524df75d7f739fdaa9ed9e88f812 | |
| parent | 21b385a546b2bf5c3102de73aa2ce0b2d35c426f (diff) | |
| download | manager-1f5f2defd78714354e628cf1889235a6340f5625.tar.gz manager-1f5f2defd78714354e628cf1889235a6340f5625.zip | |
Use {CLI} instead of [CLI] as Chat-prefix for management users
| -rw-r--r-- | src/ClientInfo.hpp | 11 | ||||
| -rw-r--r-- | src/crsm.cpp | 2 |
2 files changed, 10 insertions, 3 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()) diff --git a/src/crsm.cpp b/src/crsm.cpp index f1c61fe..51136c8 100644 --- a/src/crsm.cpp +++ b/src/crsm.cpp @@ -615,7 +615,7 @@ void CRSM::newManagementData() } else { - writeToServer("[CLI]<" + conn.name + "> " + data + "\n"); + writeToServer(ClientInfo::managementClient(conn).toString(true) + " " + data + "\n"); } } } |
