Mercurial > xib
comparison irclib.py @ 71:c5e4bf95f52a
Dots are forbidden in IRC nicknames
Signed-off-by: Charly COSTE <changaco@changaco.net>
author | Charly COSTE <changaco@changaco.net> |
---|---|
date | Sun, 30 Aug 2009 22:46:02 +0200 |
parents | 0a2b9e84bbde |
children | 676c2d2bf240 |
comparison
equal
deleted
inserted
replaced
70:01f1c6cb7447 | 71:c5e4bf95f52a |
---|---|
801 | 801 |
802 def nick(self, newnick, callback=None): | 802 def nick(self, newnick, callback=None): |
803 """Send a NICK command.""" | 803 """Send a NICK command.""" |
804 if callback != None: | 804 if callback != None: |
805 self.add_nick_callback(callback) | 805 self.add_nick_callback(callback) |
806 if ' ' in newnick: | 806 if re.search('[ \.]', newnick) != None: |
807 self._call_nick_callbacks('erroneusnickname') | 807 self._call_nick_callbacks('erroneusnickname') |
808 return False | 808 return False |
809 try: | 809 try: |
810 str(newnick) | 810 str(newnick) |
811 except: | 811 except: |