Advertisement
Guest User

Untitled

a guest
Sep 24th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. ######
  2. import ch
  3. #from datetime import datetime
  4.  
  5. def init(mgr):
  6. mgr.addPattern(r"pm (?P<n1>\w+) (?P<n2>\w+)$", 6, pm)
  7.  
  8. def pm(mgr, pm, user, body, m):
  9. if m.group("n1"):
  10. user1 = m.group("n1")
  11. if m.group("n2"):
  12. body = m.group("n2")
  13. mgr._pm.message(user1, body)
  14. return "valid"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement