120 if self.verbose: |
120 if self.verbose: |
121 print "[%s] -> %s" % (self.name, line) |
121 print "[%s] -> %s" % (self.name, line) |
122 |
122 |
123 if line.startswith ("PING :"): |
123 if line.startswith ("PING :"): |
124 self.write ("PONG :%s" % line[6:]) |
124 self.write ("PONG :%s" % line[6:]) |
|
125 self.send_all_now() # pings must be responded to immediately! |
125 else: |
126 else: |
126 words = line.split(" ") |
127 words = line.split(" ") |
127 if len(words) >= 2: |
128 if len(words) >= 2: |
128 if words[1] == "001": |
129 if words[1] == "001": |
129 self.flags |= CLIF_CONNECTED |
130 self.flags |= CLIF_CONNECTED |