aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar jesopo2016-03-31 12:10:51 +0100
committerGravatar jesopo2016-03-31 12:10:51 +0100
commit6dff99490c11daf84718cf420ffd98ff808974fc (patch)
tree964adefb7b177b280f2beb2527094fc994501457
parentmade the @ for the twitter command optional. (diff)
added CTCP SOURCE and TIME responses.
-rw-r--r--modules/ctcp.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/ctcp.py b/modules/ctcp.py
index 23ce25f6..933e02af 100644
--- a/modules/ctcp.py
+++ b/modules/ctcp.py
@@ -1,4 +1,4 @@
-
+import datetime
class Module(object):
def __init__(self, bot):
@@ -18,8 +18,13 @@ class Module(object):
if ctcp_command == "VERSION":
ctcp_response = self.bot.config.get("ctcp-version",
"BitBot (https://github.com/jesopo/bitbot)")
+ elif ctcp_command == "SOURCE":
+ ctcp_response = self.bot.config.get("ctcp-source",
+ "https://github.com/jesopo/bitbot")
elif ctcp_command == "PING":
ctcp_response = " ".join(ctcp_args_split)
+ elif ctcp_command == "TIME":
+ ctcp_response = datetime.datetime.now().strftime("%c")
if ctcp_response:
event["user"].send_ctcp_response(ctcp_command,