home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2012 January / maximum-cd-2012-01.iso / DiscContents / digsby_setup.exe / lib / oscar / __init__.pyo (.txt) next >
Encoding:
Python Compiled Bytecode  |  2011-10-05  |  3.1 KB  |  67 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyo (Python 2.6)
  3.  
  4. from common.Protocol import ProtocolException
  5.  
  6. class OscarException(ProtocolException):
  7.     pass
  8.  
  9. import capabilities
  10. from oscar.OscarSocket import OscarSocket as socket
  11. from oscar.OscarConversation import OscarConversation as conversation
  12. from oscar.OscarBuddies import OscarBuddies as buddies
  13. from oscar.OscarBuddies import OscarBuddy as buddy
  14. import oscar.OscarUtil as util
  15. from oscar.OscarUtil import apply_format as unpack, decode
  16. from OscarProtocol import SnacQueue, LoginError, ScreennameError, RedirectError
  17. from oscar.snac import SnacError
  18. from oscar.ssi import SSIException
  19. import snac
  20. from oscar.OscarProtocol import OscarProtocol as protocol
  21. errors = OscarException
  22. auth_errcode = {
  23.     1: 'Invalid nick or password',
  24.     2: 'Service temporarily unavailable',
  25.     3: 'All other errors',
  26.     4: 'Incorrect screenname or password.',
  27.     5: 'The username and password you entered do not match.',
  28.     6: 'Internal client error (bad input to authorizer)',
  29.     7: 'Invalid account',
  30.     8: 'Deleted account',
  31.     9: 'Expired account',
  32.     10: 'No access to database',
  33.     11: 'No access to resolver',
  34.     12: 'Invalid database fields',
  35.     13: 'Bad database status',
  36.     14: 'Bad resolver status',
  37.     15: 'Internal error',
  38.     16: 'Service temporarily offline',
  39.     17: 'Suspended account',
  40.     18: 'DB send error',
  41.     19: 'DB link error',
  42.     20: 'Reservation map error',
  43.     21: 'Reservation link error',
  44.     22: 'The users num connected from this IP has reached the maximum',
  45.     23: 'The users num connected from this IP has reached the maximum (reservation)',
  46.     24: 'You are trying to connect too frequently. Please try to reconnect in a few minutes.',
  47.     25: 'User too heavily warned',
  48.     26: 'Reservation timeout',
  49.     27: 'You are using an older version of ICQ. Upgrade required',
  50.     28: 'You are using an older version of ICQ. Upgrade recommended',
  51.     29: 'Rate limit exceeded. Please try to reconnect in a few minutes',
  52.     30: "Can't register on the ICQ network. Reconnect in a few minutes",
  53.     32: 'Invalid SecurID',
  54.     34: 'Account suspended because of your age (age < 13)' }
  55.  
  56. def _lowerstrip(name):
  57.     if isinstance(name, bytes):
  58.         name = name.decode('utf8')
  59.     
  60.     if not isinstance(name, unicode):
  61.         return name
  62.     name = ''.join(name.split())
  63.     name = name.lower()
  64.     name = name.encode('utf8')
  65.     return name
  66.  
  67.