fds
This commit is contained in:
parent
22b6450641
commit
fd5472b920
1 changed files with 2 additions and 1 deletions
|
@ -23,13 +23,14 @@ if SITE in ('pcmemes.net', 'localhost'):
|
||||||
@limiter.limit("5/second;30/minute")
|
@limiter.limit("5/second;30/minute")
|
||||||
@auth_required
|
@auth_required
|
||||||
def speak(data, v):
|
def speak(data, v):
|
||||||
|
data = data[:1000].strip()
|
||||||
if not data: abort(403)
|
if not data: abort(403)
|
||||||
|
|
||||||
data={
|
data={
|
||||||
"avatar": v.profile_url,
|
"avatar": v.profile_url,
|
||||||
"username":v.username,
|
"username":v.username,
|
||||||
"namecolor":v.namecolor,
|
"namecolor":v.namecolor,
|
||||||
"text":sanitize(data[:1000].strip()),
|
"text":sanitize(data),
|
||||||
"time": time.strftime("%d %b %Y at %H:%M:%S", time.gmtime(int(time.time())))
|
"time": time.strftime("%d %b %Y at %H:%M:%S", time.gmtime(int(time.time())))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue