|
Lines 82-96
Link Here
|
| 82 |
emit dcopMultiServerRaw("me " + message); |
82 |
emit dcopMultiServerRaw("me " + message); |
| 83 |
} |
83 |
} |
| 84 |
|
84 |
|
| 85 |
void KonvDCOP::say(const QString& server,const QString& target,const QString& command) |
85 |
void KonvDCOP::say(const QString& _server,const QString& _target,const QString& _command) |
| 86 |
{ |
86 |
{ |
|
|
87 |
//Sadly, copy on write doesn't exist with QString::replace |
| 88 |
QString server(_server), target(_target), command(_command); |
| 89 |
|
| 87 |
// TODO: this just masks a greater problem - Server::addQuery will return a query for '' --argonel |
90 |
// TODO: this just masks a greater problem - Server::addQuery will return a query for '' --argonel |
| 88 |
// TODO: other DCOP calls need argument checking too --argonel |
91 |
// TODO: other DCOP calls need argument checking too --argonel |
| 89 |
if (server.isEmpty() || target.isEmpty() || command.isEmpty()) |
92 |
if (server.isEmpty() || target.isEmpty() || command.isEmpty()) |
| 90 |
kdDebug() << "KonvDCOP::say() requires 3 arguments." << endl; |
93 |
kdDebug() << "KonvDCOP::say() requires 3 arguments." << endl; |
| 91 |
else |
94 |
else |
| 92 |
{ |
95 |
{ |
| 93 |
kdDebug() << "KonvDCOP::say()" << endl; |
96 |
command.replace('\n',"\\n"); |
|
|
97 |
command.replace('\r',"\\r"); |
| 98 |
target.remove('\n'); |
| 99 |
target.remove('\r'); |
| 100 |
server.remove('\n'); |
| 101 |
server.remove('\r'); |
| 94 |
// Act as if the user typed it |
102 |
// Act as if the user typed it |
| 95 |
emit dcopSay(server,target,command); |
103 |
emit dcopSay(server,target,command); |
| 96 |
} |
104 |
} |