1. def __SendChatPacket(self, text, type):
  2. if text == "/cleverbot":
  3. if constInfo.CleverBot == 1: chat.AppendChat(chat.CHAT_TYPE_INFO, "CleverBot active")
  4. if constInfo.CleverBot == 0: chat.AppendChat(chat.CHAT_TYPE_INFO, "CleverBot passive")
  5. if text == "/cleverbot_open":
  6. if constInfo.CleverBot == 0:
  7. chat.AppendChat(chat.CHAT_TYPE_INFO, "CleverBot Activated")
  8. constInfo.CleverBot = 1
  9. else: chat.AppendChat(chat.CHAT_TYPE_INFO, "CleverBot already active")
  10. if text == "/cleverbot_close":
  11. if constInfo.CleverBot == 1:
  12. chat.AppendChat(chat.CHAT_TYPE_INFO, "CleverBot Disabled")
  13. constInfo.CleverBot = 0
  14. else: chat.AppendChat(chat.CHAT_TYPE_INFO, "CleverBot already disable")
Comments powered by Disqus