irc.py

changeset 120
9880bb697149
parent 119
0f96e3157b7f
child 123
aeb0d0788869
equal deleted inserted replaced
119:0f96e3157b7f 120:9880bb697149
126 words = line.split(" ") 126 words = line.split(" ")
127 if len(words) >= 2: 127 if len(words) >= 2:
128 if words[1] == "001": 128 if words[1] == "001":
129 self.flags |= CLIF_CONNECTED 129 self.flags |= CLIF_CONNECTED
130 130
131 umode = self.cfg.get_value ('umode', '')
132
133 if umode != '':
134 self.write ('MODE %s %s' % (self.mynick, self.cfg.get_value ('umode', '')))
135
131 for channel in self.channels: 136 for channel in self.channels:
132 self.write ("JOIN %s %s" % (channel.get_value ('name'), channel.get_value ('password', default=''))) 137 self.write ("JOIN %s %s" % (channel.get_value ('name'), channel.get_value ('password', default='')))
133
134 umode = self.cfg.get_value ('umode', '')
135
136 if umode != '':
137 self.write ('MODE %s %s' % (self.mynick, self.cfg.get_value ('umode', '')))
138 elif words[1] == "PRIVMSG": 138 elif words[1] == "PRIVMSG":
139 self.handle_privmsg (line) 139 self.handle_privmsg (line)
140 elif words[1] == 'QUIT': 140 elif words[1] == 'QUIT':
141 rex = re.compile (r'^:([^!]+)!([^@]+)@([^ ]+) QUIT') 141 rex = re.compile (r'^:([^!]+)!([^@]+)@([^ ]+) QUIT')
142 match = rex.match (line) 142 match = rex.match (line)

mercurial