source file: p10/commands/svsnick.py
file stats: 6 lines, 6 executed: 100.0% covered
   1. #!/usr/bin/env python
   2. 
   3. import genericcommand
   4. import p10.base64
   5. 
   6. class svsnick(genericcommand.genericcommand):
   7. 
   8.     def handle(self, origin, args):
   9.         self._state.changeNick(origin, p10.base64.parseNumeric(args[0], self._state.maxClientNumerics), args[1], self._state.ts())
  10. 
  11. #
  12. # CAUTION!
  13. #
  14. # Beware's svsnick has a fairly major race condition - N and SN messages
  15. # can cross and there's no way to solve it using the current protocol spec.
  16. #
  17. # The solution is fairly simple, to not actually enact SNs apart from if the
  18. # user is local, and then send an N out as if the user had changed locally.