mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 00:04:48 -07:00
final (?) spectator code, small bugfix
This commit is contained in:
parent
fa16d86283
commit
a543c9b90c
22 changed files with 453 additions and 190 deletions
|
|
@ -22,14 +22,15 @@ bool ReturnMessage::send(ReturnCode code)
|
|||
return (code == ReturnOk);
|
||||
}
|
||||
|
||||
bool ReturnMessage::sendList(const QStringList &args)
|
||||
bool ReturnMessage::sendList(const QStringList &args, const QString &prefix)
|
||||
{
|
||||
ServerSocket *s = qobject_cast<ServerSocket *>(parent());
|
||||
if (!s)
|
||||
return false;
|
||||
|
||||
QString arg1 = prefix.isEmpty() ? cmd : prefix;
|
||||
for (int i = 0; i < args.size(); i++)
|
||||
s->msg(QString("%1|%2|%3").arg(cmd)
|
||||
s->msg(QString("%1|%2|%3").arg(arg1)
|
||||
.arg(msg_id)
|
||||
.arg(args[i]));
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue