cobalt.py

changeset 96
24f0b13e87d3
parent 94
2c93636202a5
child 124
7b2cd8b1ba86
equal deleted inserted replaced
95:af912f53649c 96:24f0b13e87d3
60 if len(data) > 0: 60 if len(data) > 0:
61 client.exceptdie() 61 client.exceptdie()
62 else: 62 else:
63 client.quit_irc() 63 client.quit_irc()
64 64
65 quit() 65 if g_BotActive:
66 #if g_BotActive: 66 restart_self()
67 # restart_self() 67 else:
68 #else: 68 quit()
69 # quit()
70 69
71 def restart_self(): 70 def restart_self():
72 os.execl (sys.executable, sys.executable, * sys.argv) 71 os.execl (sys.executable, sys.executable, * sys.argv)
73 72
74 def main(): 73 def main():
98 quit() 97 quit()
99 98
100 for aconn in autoconnects: 99 for aconn in autoconnects:
101 for conndata in Config.get_nodelist ('connections'): 100 for conndata in Config.get_nodelist ('connections'):
102 if conndata.get_value ('name') == aconn: 101 if conndata.get_value ('name') == aconn:
103 #Irc.irc_client (conndata, 0) 102 Irc.irc_client (conndata, 0)
104 break 103 break
105 else: 104 else:
106 raise ValueError ("unknown autoconnect entry %s" % (aconn)) 105 raise ValueError ("unknown autoconnect entry %s" % (aconn))
107 106
108 # Start the REST server 107 # Start the REST server

mercurial