|
From: <arn...@us...> - 2007-12-14 10:37:28
|
Revision: 940
http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=940&view=rev
Author: arnetheduck
Date: 2007-12-14 02:37:24 -0800 (Fri, 14 Dec 2007)
Log Message:
-----------
compile fix, some qui flags used
Modified Paths:
--------------
dcplusplus/trunk/changelog.txt
dcplusplus/trunk/dcpp/AdcHub.cpp
dcplusplus/trunk/win32/WaitingUsersFrame.cpp
Modified: dcplusplus/trunk/changelog.txt
===================================================================
--- dcplusplus/trunk/changelog.txt 2007-12-13 22:28:47 UTC (rev 939)
+++ dcplusplus/trunk/changelog.txt 2007-12-14 10:37:24 UTC (rev 940)
@@ -30,6 +30,7 @@
* Page up/down in private chat scrolls chat log just as in hub chat
* Fixed crash on right-click in the download queue (poy)
* Readded waiting users frame keyboard shortcut
+* Handle some QUI flags (thanks pret/poy)
-- 0.703 2007-11-08 --
* Fixed invalid strings (thanks james ross)
Modified: dcplusplus/trunk/dcpp/AdcHub.cpp
===================================================================
--- dcplusplus/trunk/dcpp/AdcHub.cpp 2007-12-13 22:28:47 UTC (rev 939)
+++ dcplusplus/trunk/dcpp/AdcHub.cpp 2007-12-14 10:37:24 UTC (rev 940)
@@ -263,12 +263,26 @@
void AdcHub::handle(AdcCommand::QUI, AdcCommand& c) throw() {
uint32_t s = AdcCommand::toSID(c.getParam(0));
- putUser(s);
-
- // No use to hammer if we're banned
- if(s == sid && c.hasFlag("TL", 1)) {
- setAutoReconnect(false);
+ putUser(s); // @todo: use the DI flag
+
+ string tmp;
+ if(c.getParam("MS", 1, tmp)) {
+ fire(ClientListener::StatusMessage(), this, tmp);
}
+
+ if(s == sid) {
+ if(c.getParam("TL", 1, tmp)) {
+ if(tmp == "-1") {
+ setAutoReconnect(false);
+ } else {
+ setAutoReconnect(true);
+ setReconnDelay(Util::toUInt32(tmp));
+ }
+ }
+ if(c.getParam("RD", 1, tmp)) {
+ fire(ClientListener::Redirect(), this, tmp);
+ }
+ }
}
void AdcHub::handle(AdcCommand::CTM, AdcCommand& c) throw() {
Modified: dcplusplus/trunk/win32/WaitingUsersFrame.cpp
===================================================================
--- dcplusplus/trunk/win32/WaitingUsersFrame.cpp 2007-12-13 22:28:47 UTC (rev 939)
+++ dcplusplus/trunk/win32/WaitingUsersFrame.cpp 2007-12-14 10:37:24 UTC (rev 940)
@@ -192,9 +192,9 @@
}
// Keyboard shortcuts
-bool WaitingUsersFrame::onChar(int c) {
+bool WaitingUsersFrame::handleChar(int c) {
if(c == VK_DELETE) {
- onRemove(0, 0, 0, bHandled);
+ onRemove();
return true;
}
return false;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|