home · contact · privacy
Remove chat QUERY.
[plomrogue2] / plomrogue / commands.py
index 0145157d537e9cb6986afbe94a8c7acdf39858bf..8ec6f524d22e8283ba13fc47424dc4e18352de2d 100644 (file)
@@ -99,20 +99,20 @@ def cmd_GET_GAMESTATE(game, connection_id):
     game.send_gamestate(connection_id)
 cmd_GET_GAMESTATE.argtypes = ''
 
-def cmd_QUERY(game, target_nick, msg, connection_id):
-    if not connection_id in game.sessions:
-        raise GameError('can only query when logged in')
-    t = game.get_thing(game.sessions[connection_id], False)
-    source_nick = t.nickname
-    for t in [t for t in game.things if t.type_ == 'player' and t.nickname == target_nick]:
-        for c_id in game.sessions:
-            if game.sessions[c_id] == t.id_:
-                game.io.send('CHAT ' + quote(source_nick+ '->' + target_nick + ': ' + msg), c_id)
-                game.io.send('CHAT ' + quote(source_nick+ '->' + target_nick + ': ' + msg), connection_id)
-                return
-        raise GameError('target user offline')
-    raise GameError('can only query with registered nicknames')
-cmd_QUERY.argtypes = 'string string'
+#def cmd_QUERY(game, target_nick, msg, connection_id):
+#    if not connection_id in game.sessions:
+#        raise GameError('can only query when logged in')
+#    t = game.get_thing(game.sessions[connection_id], False)
+#    source_nick = t.nickname
+#    for t in [t for t in game.things if t.type_ == 'player' and t.nickname == target_nick]:
+#        for c_id in game.sessions:
+#            if game.sessions[c_id] == t.id_:
+#                game.io.send('CHAT ' + quote(source_nick+ '->' + target_nick + ': ' + msg), c_id)
+#                game.io.send('CHAT ' + quote(source_nick+ '->' + target_nick + ': ' + msg), connection_id)
+#                return
+#        raise GameError('target user offline')
+#    raise GameError('can only query with registered nicknames')
+#cmd_QUERY.argtypes = 'string string'
 
 def cmd_PING(game, connection_id):
     game.io.send('PONG', connection_id)