From 4145279c2cf97ce507da7a6466735a3ac2277988 Mon Sep 17 00:00:00 2001 From: Felix Rabe Date: Sun, 27 May 2007 02:52:00 +0200 Subject: [PATCH] Removed GalconClient from gtkgalcon.py --- gtkgalcon.py | 108 +---------------------------------------------------------- 1 file changed, 1 insertion(+), 107 deletions(-) diff --git a/gtkgalcon.py b/gtkgalcon.py index 0f89485..0c8e334 100755 --- a/gtkgalcon.py +++ b/gtkgalcon.py @@ -51,113 +51,7 @@ def gnome_hig(widget): widget.set_row_spacings(6) if isinstance(widget, gtk.Box): widget.set_spacing(6) - return widget - - -class GalconClient(object): - """ - GalconClient is an example implementation of a standalone galcon - client. It can be used to create a bot or a custom gui. - - Right now we don't have the digest information, so you either have to - use the nickname inca on the server zappa, and the digest provided by - default in the protocol implementation, or sniff the digest for a - given server/username combo and provide that to the connection when - you create it. - - To impelment a client simply write the functions you see below the - "RECV Functions" comment - - To send commands use self.connection.send_command((1, cmd, *paramters)) - for example (send a public message): - self.connection.send_command((1, 'message', 'hello there')) - or (send a private message): - self.connection.send_command((1, 'msg', 'carn', 'hey!')) - - - """ - - def __init__(self, email, name, passwd): - self.email = email - self.name = name - self.passwd = passwd - self.connections = None - - - def connect(self): - def do_connect(games): - for game in games: - if game['owner'] != 'zappa': continue - self.connection = GalconUDPProtocol(self, game['addr'], 9031, game['owner']) - reactor.listenUDP(0, self.connection) - return 'ok' - return list_games(self.email, self.name, self.passwd).addCallback(do_connect) - - # RECV Functions - - def message(self, server_name, usr, msg): - """ - We received a message - """ - pass - - def topic(self, server_name, topic): - """ - We received the topic - """ - pass - - def players(self, server_name, players): - """ - We received the player list. Either parse the players var or look - at self.connection.players where its already parsed - """ - pass - - - def stop(self, server_name): - """ - Game was stopped - """ - pass - - def start(self, server_name, universe): - """ - Game was started - the universe is a dictionary containing players, options, and planets. - It has everything you need to draw the map including planet x,y coords - and sizes, as well as planet ownership. - """ - pass - - def delta(self, server_name, universe): - """ - Contains an updated version of the universe dictionary. - - Note, you can always find this at self.connection.universe - assuming self.connection.game == True - - """ - pass - - def mfleet(self, server_name, *args): - """ - A player dispatched a fleet. - """ - pass - - def redirect(self, server_name, *args): - """ - A player redirected a fleet - """ - pass - - - def ping(self, server_name): - """ - We received a ping. We already acknowledged though. - """ - pass + return widget class GalconChatWindow(WindowF12RawConsoleMixin): -- 2.11.4.GIT