equal
deleted
inserted
replaced
68 RawSendNet(QString("START:") + delimeter + seed); |
68 RawSendNet(QString("START:") + delimeter + seed); |
69 } |
69 } |
70 |
70 |
71 void HWNewNet::SendNet(const QByteArray & buf) |
71 void HWNewNet::SendNet(const QByteArray & buf) |
72 { |
72 { |
|
73 qDebug() << "to net:" << buf; |
73 QString msg = QString(buf.toBase64()); |
74 QString msg = QString(buf.toBase64()); |
74 |
75 |
75 //NetBuffer += buf; |
76 //NetBuffer += buf; |
76 //RawSendNet(QString("PRIVMSG %1 :"MAGIC_CHAR MAGIC_CHAR"%2").arg(channel, msg)); |
77 RawSendNet(QString(msg)); |
77 } |
78 } |
78 |
79 |
79 void HWNewNet::RawSendNet(const QString & str) |
80 void HWNewNet::RawSendNet(const QString & str) |
80 { |
81 { |
81 RawSendNet(str.toUtf8()); |
82 RawSendNet(str.toUtf8()); |
167 emit FromNet(HWProto::addStringListToBuffer(cache, lst)); |
168 emit FromNet(HWProto::addStringListToBuffer(cache, lst)); |
168 return; |
169 return; |
169 } |
170 } |
170 |
171 |
171 QByteArray em = QByteArray::fromBase64(msg.toAscii()); |
172 QByteArray em = QByteArray::fromBase64(msg.toAscii()); |
|
173 qDebug() << "to engine:" << em; |
172 emit FromNet(em); |
174 emit FromNet(em); |
173 } |
175 } |
174 |
176 |
175 |
177 |
176 void HWNewNet::ConfigAsked() |
178 void HWNewNet::ConfigAsked() |
177 { |
179 { |
178 QByteArray cache; |
180 QByteArray cache; |
179 HWProto::addStringToBuffer(cache, "eseed " + seed); |
181 HWProto::addStringToBuffer(cache, "eseed " + seed); |
|
182 HWProto::addStringToBuffer(cache, "TN"); |
180 HWProto::addStringToBuffer(cache, "e$gmflags 0"); |
183 HWProto::addStringToBuffer(cache, "e$gmflags 0"); |
181 HWProto::addStringToBuffer(cache, QString("etheme %1").arg(config->GetRandomTheme())); |
184 HWProto::addStringToBuffer(cache, QString("etheme %1").arg(config->GetRandomTheme())); |
182 QString _msg = QString("CONFIGANSWER") + delimeter + QString(cache.toBase64()); |
185 QString _msg = QString("CONFIGANSWER") + delimeter + QString(cache.toBase64()); |
183 RawSendNet(_msg); |
186 RawSendNet(_msg); |
184 } |
187 } |