nick.py 751 B

1234567891011121314151617181920212223
  1. """
  2. SleekXMPP: The Sleek XMPP Library
  3. Copyright (C) 2010 Nathanael C. Fritz
  4. This file is part of SleekXMPP.
  5. See the file LICENSE for copying permission.
  6. """
  7. # The nickname stanza has been moved to its own plugin, but the existing
  8. # references are kept for backwards compatibility.
  9. from sleekxmpp.stanza import Message, Presence
  10. from sleekxmpp.xmlstream import register_stanza_plugin
  11. from sleekxmpp.plugins.xep_0172 import UserNick as Nick
  12. register_stanza_plugin(Message, Nick)
  13. register_stanza_plugin(Presence, Nick)
  14. # To comply with PEP8, method names now use underscores.
  15. # Deprecated method names are re-mapped for backwards compatibility.
  16. Nick.setNick = Nick.set_nick
  17. Nick.getNick = Nick.get_nick
  18. Nick.delNick = Nick.del_nick