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
La Quadrature du Net
rpteam
wantzel
Commits
07f3d342
Commit
07f3d342
authored
Mar 22, 2016
by
Mindiell
Browse files
Removed 'new starter' string and send help results to user directly => All this to avoid chan spam.
parent
3a8e90c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
wantzel.py
View file @
07f3d342
...
...
@@ -237,8 +237,6 @@ class Wantzel(object):
Utils
.
debug
(
"Command: %s"
%
command
)
if
command
:
Utils
.
debug
(
"group(0): %s"
%
command
.
group
(
0
))
if
command
.
group
(
0
).
startswith
(
'!'
):
self
.
send_message
(
channel
,
messages
[
"new_starter"
])
command
=
command
.
group
(
1
)
Utils
.
debug
(
"Command: %s"
%
command
)
if
command
.
startswith
(
"rp"
):
...
...
@@ -249,7 +247,7 @@ class Wantzel(object):
self
.
status
(
command
,
user
,
channel
,
msg
)
elif
command
==
"help"
:
Utils
.
debug
(
"Calling self.help"
)
self
.
help
(
channel
,
msg
)
self
.
help
(
user
,
channel
,
msg
)
elif
command
==
"kill"
:
Utils
.
debug
(
"Calling self.kill"
)
self
.
kill
(
user
,
channel
,
msg
)
...
...
@@ -263,7 +261,7 @@ class Wantzel(object):
#if title and website:
# self.send_message(channel, messages["title"] % (title, website))
def
help
(
self
,
channel
,
msg
):
def
help
(
self
,
user
,
channel
,
msg
):
"""
Show global help.
If a known command is behind the ~help command, an adequate message is
...
...
@@ -274,9 +272,9 @@ class Wantzel(object):
command
=
re
.
search
(
"~help (help|rp|status|stats|kill|admin)"
,
msg
)
if
command
:
command
=
command
.
group
(
1
)
self
.
send_message
(
channel
,
messages
[
"help_"
+
command
])
self
.
send_message
(
user
,
messages
[
"help_"
+
command
])
else
:
self
.
send_message
(
channel
,
messages
[
"help"
])
self
.
send_message
(
user
,
messages
[
"help"
])
def
rp
(
self
,
command
,
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