Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Porkepix
wantzel
Commits
b7cf2e93
Commit
b7cf2e93
authored
May 26, 2015
by
Mindiell
Browse files
No more giving the title of an url
parent
4b65a302
Changes
1
Hide whitespace changes
Inline
Side-by-side
wantzel.py
View file @
b7cf2e93
...
...
@@ -166,9 +166,9 @@ class Wantzel(object):
user
=
re
.
search
(
"([^!]*)!"
,
user
).
group
(
1
)
#print("Message received: %s %s %s" % (user, channel, msg))
# Whatever is done, get the title of an existing url in a message
title
=
""
if
"http"
in
msg
:
title
,
website
=
get_title
(
msg
)
#
title = ""
#
if "http" in msg:
#
title, website = get_title(msg)
# Never answer to botself
if
user
!=
config
.
nickname
:
# If it's a query, bot should answer to the user as the channel
...
...
@@ -192,8 +192,9 @@ class Wantzel(object):
self
.
stats
(
user
,
channel
,
msg
)
elif
command
==
"admin"
:
self
.
admin
(
user
,
channel
,
msg
)
if
title
and
website
:
self
.
send_message
(
channel
,
messages
[
"title"
]
%
(
title
,
website
))
# No more giving the title of an url
#if title and website:
# self.send_message(channel, messages["title"] % (title, website))
def
help
(
self
,
user
,
channel
,
msg
):
"""
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment