Changeset 159
- Timestamp:
- 05/21/05 12:08:54 (4 years ago)
- Files:
-
- trunk/jjigw.dtd (modified) (1 diff)
- trunk/jjigw/config.py (modified) (1 diff)
- trunk/jjigw/ircsession.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/jjigw.dtd
r138 r159 16 16 jid CDATA #REQUIRED 17 17 name CDATA #IMPLIED 18 password CDATA #IMPLIED 18 19 encoding CDATA "us-ascii" 19 20 nicks_8bit (yes|no) "no" trunk/jjigw/config.py
r157 r159 80 80 self.max_nick_length=int(node.prop("max_nick_length")) 81 81 self.max_channel_length=int(node.prop("max_nick_length")) 82 self.password=node.prop("password") 82 83 def get_servers(self): 83 84 r=self.servers trunk/jjigw/ircsession.py
r157 r159 53 53 self.jid=jid 54 54 self.nick=nick 55 # Insert some sort of password lookup here if required 56 self.password=self.network.password 55 57 if self.component.profile: 56 58 ttarget=self.thread_run_prof … … 287 289 self.pass_message_to_raw_channel("Connected.") 288 290 self.__logger.debug("Connected.") 291 if self.password: 292 self._send("PASS %s" % (self.password,)) 289 293 self._send("NICK %s" % (self.nick,)) 290 294 user=md5.new(self.jid.bare().as_string()).hexdigest()[:64] 291 295 self.conninfo=ConnectionInfo(self.socket,user) 292 296 self.component.register_connection(self.conninfo) 293 self._send("USER %s 0 * :JJIGW User %s" % (user,user)) 297 # If we had to issue a password, then chances are the server 298 # is going to be anal about what we pass for the USER. 299 # In this case, don't bother sending the hash. 300 if self.password: 301 self._send("USER %s 0 * :JJIGW User %s" % (self.nick, user) ) 302 else: 303 self._send("USER %s 0 * :JJIGW User %s" % (user,user)) 294 304 self.server=server 295 305 self.cond.notify() … … 357 367 358 368 def irc_cmd_PING(self,prefix,command,params): 369 # TODO: If this were implemented absolutely correctly, 370 # shouldn't this ping be sent to the client instead 371 # of immediately sending it back to the server? 372 # Otherwise, it will not give you an accurate reading 373 # of lag. 359 374 self.send("PONG %s" % (params[0],)) 360 375
