Changeset 160
- Timestamp:
- 05/21/05 12:12:28 (4 years ago)
- Files:
-
- trunk/jjigw/component.py (modified) (2 diffs)
- trunk/jjigw/ircsession.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/jjigw/component.py
r157 r160 282 282 283 283 def presence_available(self,stanza): 284 nick=None 285 to=stanza.get_to() 286 fr=stanza.get_from() 287 status=stanza.get_status() 284 nick = None 285 to = stanza.get_to() 286 fr = stanza.get_from() 287 status = stanza.get_status() 288 show = stanza.get_show() 288 289 if not status: 289 status="Unknown" 290 if not show: 291 status = "Unknown" 292 else: 293 status = show 290 294 if to.node and not to.resource: 291 295 p=stanza.make_error_response("bad-request") … … 298 302 self.send(p) 299 303 return 1 304 if show in ("away", "xa", "dnd"): 305 sess.set_away() 306 else: 307 sess.set_back() 300 308 else: 301 309 nick=to.resource trunk/jjigw/ircsession.py
r159 r160 305 305 self.cond.notify() 306 306 307 def set_away(self,status): 308 self.send("AWAY :%s" % (status)) 309 310 def set_back(self): 311 self.send("AWAY") 312 307 313 def _send(self,str): 308 314 if self.socket and not self.exited:
