summaryrefslogtreecommitdiffstats
path: root/src
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
parent21b385a546b2bf5c3102de73aa2ce0b2d35c426f (diff)
downloadmanager-1f5f2defd78714354e628cf1889235a6340f5625.tar.gz
manager-1f5f2defd78714354e628cf1889235a6340f5625.zip
Use {CLI} instead of [CLI] as Chat-prefix for management users
Diffstat (limited to 'src')
-rw-r--r--src/ClientInfo.hpp11
-rw-r--r--src/crsm.cpp2
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");
}
}
}