Skip to content
GitLab
Menu
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
0868d5fe
Commit
0868d5fe
authored
Jul 05, 2016
by
Mindiell
Browse files
Un peu de stupidité n'a jamais fait de mal à personne <3
parent
aaf55585
Pipeline
#42
skipped
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
messages.py
View file @
0868d5fe
...
@@ -109,4 +109,9 @@ messages = {
...
@@ -109,4 +109,9 @@ messages = {
"wiki_update"
:
"wiki_update"
:
"""%s a mis à jour la page "%s" sur le wiki (%s)"""
,
"""%s a mis à jour la page "%s" sur le wiki (%s)"""
,
"coin_deltree"
:
"""%s ~ %s ~ Deltree ~ %s ~ %s"""
,
}
}
wantzel.py
View file @
0868d5fe
...
@@ -6,6 +6,7 @@ License : AGPLv3
...
@@ -6,6 +6,7 @@ License : AGPLv3
Doc : https://wiki.laquadrature.net/Wantzel
Doc : https://wiki.laquadrature.net/Wantzel
"""
"""
import
random
import
re
import
re
import
sqlite3
import
sqlite3
import
time
import
time
...
@@ -26,6 +27,39 @@ INFO = 1
...
@@ -26,6 +27,39 @@ INFO = 1
ERROR
=
0
ERROR
=
0
LOG_LEVEL
=
DEBUG
LOG_LEVEL
=
DEBUG
animals
=
[
{
"left"
:
"""><((('>"""
,
"right"
:
"""<')))><"""
,
"sound"
:
"blub"
,
},
{
"left"
:
"""=^..^="""
,
"right"
:
"""=^..^="""
,
"sound"
:
"meow"
,
},
{
"left"
:
"""ˁ˚ᴥ˚ˀ"""
,
"right"
:
"""ˁ˚ᴥ˚ˀ"""
,
"sound"
:
"wouf"
,
},
{
"left"
:
"""\_o<"""
,
"right"
:
""">o_/"""
,
"sound"
:
"coin"
,
},
{
"left"
:
"""^(*(oo)*)^"""
,
"right"
:
"""^(*(oo)*)^"""
,
"sound"
:
"grouïk"
,
},
{
"left"
:
"""~~(__^·>"""
,
"right"
:
"""<·^__)~~"""
,
"sound"
:
"yiik"
,
},
]
class
Utils
(
object
):
class
Utils
(
object
):
"""
"""
Simple utility class to log easily.
Simple utility class to log easily.
...
@@ -295,6 +329,14 @@ class Wantzel(object):
...
@@ -295,6 +329,14 @@ class Wantzel(object):
elif
command
==
"admin"
:
elif
command
==
"admin"
:
Utils
.
debug
(
"Calling self.admin"
)
Utils
.
debug
(
"Calling self.admin"
)
self
.
admin
(
user
,
channel
,
msg
)
self
.
admin
(
user
,
channel
,
msg
)
if
user
==
"Deltree"
and
msg
==
"\_o< ~ Coin ~ >o_/"
:
animal
=
random
.
choice
(
animals
)
self
.
send_message
(
channel
,
messages
[
"coin_deltree"
]
%
(
animal
[
"left"
],
animal
[
"sound"
],
animal
[
"sound"
],
animal
[
"right"
],
))
# No more giving the title of an url
# No more giving the title of an url
#if title and website:
#if title and website:
# self.send_message(channel, messages["title"] % (title, website))
# self.send_message(channel, messages["title"] % (title, website))
...
...
Write
Preview
Supports
Markdown
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