Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wantzel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Porkepix
wantzel
Commits
b7cf2e93
Commit
b7cf2e93
authored
May 26, 2015
by
Mindiell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
No more giving the title of an url
parent
4b65a302
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
wantzel.py
wantzel.py
+6
-5
No files found.
wantzel.py
View file @
b7cf2e93
...
@@ -166,9 +166,9 @@ class Wantzel(object):
...
@@ -166,9 +166,9 @@ class Wantzel(object):
user
=
re
.
search
(
"([^!]*)!"
,
user
).
group
(
1
)
user
=
re
.
search
(
"([^!]*)!"
,
user
).
group
(
1
)
#print("Message received: %s %s %s" % (user, channel, msg))
#print("Message received: %s %s %s" % (user, channel, msg))
# Whatever is done, get the title of an existing url in a message
# Whatever is done, get the title of an existing url in a message
title
=
""
#
title = ""
if
"http"
in
msg
:
#
if "http" in msg:
title
,
website
=
get_title
(
msg
)
#
title, website = get_title(msg)
# Never answer to botself
# Never answer to botself
if
user
!=
config
.
nickname
:
if
user
!=
config
.
nickname
:
# If it's a query, bot should answer to the user as the channel
# If it's a query, bot should answer to the user as the channel
...
@@ -192,8 +192,9 @@ class Wantzel(object):
...
@@ -192,8 +192,9 @@ class Wantzel(object):
self
.
stats
(
user
,
channel
,
msg
)
self
.
stats
(
user
,
channel
,
msg
)
elif
command
==
"admin"
:
elif
command
==
"admin"
:
self
.
admin
(
user
,
channel
,
msg
)
self
.
admin
(
user
,
channel
,
msg
)
if
title
and
website
:
# No more giving the title of an url
self
.
send_message
(
channel
,
messages
[
"title"
]
%
(
title
,
website
))
#if title and website:
# self.send_message(channel, messages["title"] % (title, website))
def
help
(
self
,
user
,
channel
,
msg
):
def
help
(
self
,
user
,
channel
,
msg
):
"""
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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