Changeset 26 for trunk


Ignore:
Timestamp:
02/20/07 12:49:10 (18 years ago)
Author:
atzm
Message:
  • Modify nick action
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/amazonbot/amazonbot.py

    r25 r26  
    99 
    1010import re 
     11import string 
    1112import sys 
    1213import time 
     
    497498        return True 
    498499 
     500    NICK_TRANS_TABLE = string.maketrans('-_i1z2o0s5bdnmft', '_-1i2z0o5sdbmntf') 
    499501    def onact_nick(self, msg, c, e, to): 
    500         nick = nm_to_n(e.source()) 
    501         _debug('in nick action: %s to %s in %s' % (msg, nick, to)) 
     502        nick   = nm_to_n(e.source()) 
     503        nickto = nick.translate(self.NICK_TRANS_TABLE) 
     504        _debug('in nick action: %s to %s in %s (%s)' % (msg, nick, to, nickto)) 
    502505        c.notice(to, msg) 
    503         c.nick('%s_' % nick) 
     506        c.nick(nickto) 
    504507        return True 
    505508 
Note: See TracChangeset for help on using the changeset viewer.