Changeset 12
- Timestamp:
- 01/30/04 20:34:46 (5 years ago)
- Files:
-
- trunk/jjigw.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/jjigw.py
r11 r12 51 51 return evil_characters_re.sub(" ",s) 52 52 53 numeric_re=re.compile(r"\d\d\d") 53 54 channel_re=re.compile(r"^[&#+!][^\000 \007 ,:\r\n]{1,49}$") 54 55 nick_re=re.compile(r"^[a-zA-Z\x5b-\x60\x7b-\x7d\[\]\\`_^{|}][a-zA-Z\x5b-\x60\x7b-\x7d\[\]\\`_^{|}0-9-]{0,8}$") … … 142 143 143 144 def whoreply(self,params): 144 if params[ 5]!=self.nick:145 return 146 if len(params)!= 8:147 return 148 target,channel,user,host,server,nick,flags,rest=params145 if params[4]!=self.nick: 146 return 147 if len(params)!=7: 148 return 149 channel,user,host,server,nick,flags,rest=params 149 150 fullname=rest.split(None,1)[1] 150 151 self.debug("Channel: %r" % (channel,)) … … 649 650 params.append(split[0]) 650 651 split=split[1:] 652 if command and numeric_re.match(command): 653 params=params[1:] 651 654 self.debug("Prefix: %r Command: %r params: %r" % (prefix,command,params)) 652 655 self.lock.release() … … 710 713 def irc_cmd_352(self,prefix,command,params): 711 714 self.debug("WHO reply received") 712 if len(params)< 8:715 if len(params)<7: 713 716 self.debug("too short - ignoring") 714 717 return 715 user=self.get_user(params[ 5])718 user=self.get_user(params[4]) 716 719 self.debug("Got user %r" % (user.nick,)) 717 720 user.whoreply(params)
