[pybot-commits] CVS: pybot/pybot user.py,1.2,1.3
Brought to you by:
niemeyer
|
From: Gustavo N. <nie...@us...> - 2002-06-19 21:46:25
|
Update of /cvsroot/pybot/pybot/pybot
In directory usw-pr-cvs1:/tmp/cvs-serv2373
Modified Files:
user.py
Log Message:
Do user matching case insensitively.
Index: user.py
===================================================================
RCS file: /cvsroot/pybot/pybot/pybot/user.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** user.py 4 Dec 2001 00:57:38 -0000 1.2
--- user.py 19 Jun 2002 21:46:22 -0000 1.3
***************
*** 47,53 ****
def match(self, nick="*", username="*", host="*"):
! if (nick=="*" or nick==self.nick) and \
! (username=="*" or username==self.username) and \
! (host=="*" or (host[0]=="*" and host[1:]==self.host[-(len(host)-1):]) or host==self.host):
return 1
--- 47,53 ----
def match(self, nick="*", username="*", host="*"):
! if (nick=="*" or nick.lower()==self.nick.lower()) and \
! (username=="*" or username.lower()==self.username.lower()) and \
! (host=="*" or (host[0]=="*" and host[1:].lower()==self.host[-(len(host)-1):].lower()) or host.lower()==self.host.lower()):
return 1
|