Author: dylan
Date: 2006-05-21 22:45:37 -0400 (Sun, 21 May 2006)
New Revision: 981
Modified:
trunk/
trunk/python/server/.todo
trunk/python/server/TODO
trunk/python/server/haver/server/entity.py
trunk/python/server/haver/server/talker.py
Log:
Fixed bugs mentioned previously in the TODO.
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- 1f59643a-e6e5-0310-bc24-f7d4c744f460:/haver/havercurs-objc:43089
1f59643a-e6e5-0310-bc24-f7d4c744f460:/haver/local/trunk:11166
1f59643a-e6e5-0310-bc24-f7d4c744f460:/haver/local/trunk-merge-10131:11178
1f59643a-e6e5-0310-bc24-f7d4c744f460:/haver/winch/trunk:43192
27e50396-46e3-0310-8b22-ae223a1f35ce:/local:212
ca0be05d-e60e-0410-9596-96133d777aec:/haver/local:3259
e9404bb1-7af0-0310-a7ff-e22194cd388b:/haver/local:2455
edfcd8bd-4ce7-0310-a97e-bb1efd40edf3:/local:238
+ 1f59643a-e6e5-0310-bc24-f7d4c744f460:/haver/havercurs-objc:43089
1f59643a-e6e5-0310-bc24-f7d4c744f460:/haver/local/trunk:11166
1f59643a-e6e5-0310-bc24-f7d4c744f460:/haver/local/trunk-merge-10131:11178
1f59643a-e6e5-0310-bc24-f7d4c744f460:/haver/winch/trunk:43192
27e50396-46e3-0310-8b22-ae223a1f35ce:/local:212
ca0be05d-e60e-0410-9596-96133d777aec:/haver/local:3262
e9404bb1-7af0-0310-a7ff-e22194cd388b:/haver/local:2455
edfcd8bd-4ce7-0310-a97e-bb1efd40edf3:/local:238
Modified: trunk/python/server/.todo
===================================================================
--- trunk/python/server/.todo 2006-05-22 02:11:59 UTC (rev 980)
+++ trunk/python/server/.todo 2006-05-22 02:45:37 UTC (rev 981)
@@ -1,11 +1,20 @@
<todo version="0.1.19">
- <note priority="high" time="1148263802">
+ <note priority="high" time="1148263802" done="1148265858">
Bug: when a client connection crashes (raises an exception), make sure
to remove a user from all joined channels...
+ <comment>
+ Fixed.
+ </comment>
</note>
- <note priority="high" time="1148263853">
+ <note priority="high" time="1148263853" done="1148265872">
Bug: PART main shows unknown.user main...
+ <comment>
+ Fixed.
+ </comment>
</note>
<note priority="medium" time="1148263612">
Add a command to list groups a user belongs to.
</note>
+ <note priority="medium" time="1148265840">
+ BUG: 'USERS' without an argument shouldn't crash the client connection.
+ </note>
</todo>
Modified: trunk/python/server/TODO
===================================================================
--- trunk/python/server/TODO 2006-05-22 02:11:59 UTC (rev 980)
+++ trunk/python/server/TODO 2006-05-22 02:45:37 UTC (rev 981)
@@ -1,9 +1,12 @@
- Bug: when a client connection crashes (raises an exception), make sure to
remove a user from all joined channels...
- (added Sun May 21 22:10:02 2006, incomplete, priority high)
+ (added Sun May 21 22:10:02 2006, completed on Sun May 21 22:44:18 2006,
priority high)
- Bug: PART main shows unknown.user main...
- (added Sun May 21 22:10:53 2006, incomplete, priority high)
+ (added Sun May 21 22:10:53 2006, completed on Sun May 21 22:44:32 2006,
priority high)
- Add a command to list groups a user belongs to.
(added Sun May 21 22:06:52 2006, incomplete, priority medium)
+- BUG: 'USERS' without an argument shouldn't crash the client connection.
+ (added Sun May 21 22:44:00 2006, incomplete, priority medium)
+
Modified: trunk/python/server/haver/server/entity.py
===================================================================
--- trunk/python/server/haver/server/entity.py 2006-05-22 02:11:59 UTC (rev
980)
+++ trunk/python/server/haver/server/entity.py 2006-05-22 02:45:37 UTC (rev
981)
@@ -71,10 +71,19 @@
name = group.name.lower()
if name in self.groups:
self.groups.remove(name)
- group.remove('user', name)
+ group.remove('user', self.name)
else:
raise Fail('already.parted', group.name)
-
+
+ def quit(self, lobby):
+ groups = []
+ for name in list(self.groups):
+ group = lobby.lookup('group', name)
+ self.partGroup(group)
+ groups.append(group)
+
+ return groups
+
def updateIdle(self):
self.lastActivity = int(time.time())
Modified: trunk/python/server/haver/server/talker.py
===================================================================
--- trunk/python/server/haver/server/talker.py 2006-05-22 02:11:59 UTC (rev
980)
+++ trunk/python/server/haver/server/talker.py 2006-05-22 02:45:37 UTC (rev
981)
@@ -67,9 +67,9 @@
self.sendMsg('BYE', *args)
name = user.name
- for group in user.members('group'):
- user.partGroup(group)
+ for group in user.quit(lobby):
group.sendMsg('QUIT', name, *args)
+
def connectionMade(self):
log.msg('New client from ' + str(self.addr))
@@ -82,9 +82,14 @@
user = self.user
lobby = self.factory.lobby
lobby.remove(user.namespace, user.name)
+ for group in user.quit(lobby):
+ group.sendMsg('QUIT', user.name, 'disconnect')
+
del self.user
except AttributeError:
pass
+ except Fail, f:
+ log.msg('Failure after connection lost: %s (%s)' %
(f.name, f.args))
del self.state
_______________________________________________
Haver-commits mailing list
[email protected]
https://mail.gna.org/listinfo/haver-commits