chatbot
Advanced tools
| Metadata-Version: 1.1 | ||
| Name: chatbot | ||
| Version: 1.4.6b | ||
| Version: 1.5b | ||
| Summary: Allows users on wikia wikis to create a chatbot for Special:Chat | ||
@@ -5,0 +5,0 @@ Home-page: http://packages.python.org/chatbot/ |
+22
-7
@@ -116,12 +116,22 @@ import re | ||
| class PrivateMessage(threading.Thread): | ||
| def __init__(self, user, username, password, wiki, key): | ||
| threading.Thread.__init__(self) | ||
| self.c = Client(username, password, wiki, priv=user, key=key) | ||
| class PrivateMessage(ChatBot): | ||
| def __init__(self, username, password): | ||
| ChatBot.__init__(self) | ||
| self.c = Client(username, password, wiki) | ||
| self.changed = False | ||
| self.message = "" | ||
| def send(self, message, xhr): | ||
| self.c.send(message, xhr=xhr) | ||
| def send(self, message): | ||
| self.changed = True | ||
| self.message = message | ||
| def on_message(self, c, e): | ||
| if self.changed: | ||
| c.send(c, message) | ||
| self.changed = False | ||
| class Client(object): | ||
| def __init__(self, username, password, site, priv=None, key=None): | ||
| def __init__(self, username, password, site): | ||
| self.username = username | ||
@@ -396,2 +406,5 @@ self.password = password | ||
| def on_idle(self, c, e): | ||
| pass | ||
| def run(self): | ||
@@ -424,2 +437,4 @@ in_chat = 0 | ||
| self.on_message(self.c, e) | ||
| else: | ||
| self.on_idle(self.c, e) | ||
@@ -426,0 +441,0 @@ if __name__ == '__main__': |
+1
-1
| Metadata-Version: 1.1 | ||
| Name: chatbot | ||
| Version: 1.4.6b | ||
| Version: 1.5b | ||
| Summary: Allows users on wikia wikis to create a chatbot for Special:Chat | ||
@@ -5,0 +5,0 @@ Home-page: http://packages.python.org/chatbot/ |
+1
-1
| from setuptools import setup, find_packages | ||
| setup(name='chatbot', | ||
| version='1.4.6b', | ||
| version='1.5b', | ||
| description='Allows users on wikia wikis to create a chatbot for Special:Chat', | ||
@@ -6,0 +6,0 @@ long_description="""This is a chat bot making module for wikia's Special:Chat. |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
18232
0.78%407
2.78%