summaryrefslogtreecommitdiff
path: root/plugins/replace.py
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/replace.py')
-rw-r--r--plugins/replace.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/replace.py b/plugins/replace.py
index 3202721c..02059a18 100644
--- a/plugins/replace.py
+++ b/plugins/replace.py
@@ -23,7 +23,7 @@ Add your own pattern
--------------------
You can easily edit this plugin to add your own patterns. For example if
-don’t want to search for an insult everytime you’re angry, you can create a
+don’t want to search for an insult every time you’re angry, you can create a
curse pattern this way:
- In the init(self) method of the Plugin class, add something like
@@ -91,7 +91,7 @@ def replace_time(message, tab):
def replace_date(message, tab):
- return datetime.datetime.now().strftime("%x")
+ return datetime.datetime.now().strftime("%Y-%m-%d")
def replace_datetime(message, tab):
@@ -102,11 +102,11 @@ def replace_random_user(message, tab):
if isinstance(tab, tabs.MucTab):
return random.choice(tab.users).nick
elif isinstance(tab, tabs.PrivateTab):
- return random.choice([JID(tab.name).resource, tab.own_nick])
+ return random.choice([tab.jid.resource, tab.own_nick])
else:
# that doesn’t make any sense. By why use this pattern in a
# ConversationTab anyway?
- return str(tab.name)
+ return tab.jid.full
def replace_dice(message, tab):