mirror of
https://github.com/progval/irctest.git
synced 2025-04-07 07:49:52 +00:00
test for mute extban
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import datetime
|
||||
import re
|
||||
import secrets
|
||||
from collections import namedtuple
|
||||
|
||||
HistoryMessage = namedtuple('HistoryMessage', ['time', 'msgid', 'target', 'text'])
|
||||
@ -13,6 +14,9 @@ IRCV3_FORMAT_STRFTIME = "%Y-%m-%dT%H:%M:%S.%f%z"
|
||||
def ircv3_timestamp_to_unixtime(timestamp):
|
||||
return datetime.datetime.strptime(timestamp, IRCV3_FORMAT_STRFTIME).timestamp()
|
||||
|
||||
def random_name(base):
|
||||
return base + '-' + secrets.token_hex(8)
|
||||
|
||||
"""
|
||||
Stolen from supybot:
|
||||
"""
|
||||
@ -46,4 +50,4 @@ def normalizeWhitespace(s, removeNewline=True):
|
||||
s = ' ' + s
|
||||
if ends_with_space:
|
||||
s += ' '
|
||||
retur
|
||||
return s
|
||||
|
Reference in New Issue
Block a user