parent
51bf31e2a5
commit
7036bceeb0
|
@ -49,8 +49,7 @@ class McManiac(DatabasePlugin):
|
|||
if result:
|
||||
return '[{rank}/{total}] {item}'.format(**result)
|
||||
|
||||
# TODO: fix regex ("McFooiaC McBariaC" adds "Mc\S+iaC")
|
||||
@irc3.event(r'^:(?P<mask>\S+) PRIVMSG \S+ :.*?(?P<item>Mc\S+iaC).*')
|
||||
@irc3.event(r'^:(?P<mask>\S+) PRIVMSG \S+ :.*?\b(?P<item>Mc\S+iaC)\b.*')
|
||||
def save(self, mask: str, item: str):
|
||||
if IrcString(mask).nick != self.bot.nick:
|
||||
with self.con.cursor() as cur:
|
||||
|
|
|
@ -10,7 +10,7 @@ create table if not exists quotes (
|
|||
|
||||
create table if not exists mcmaniacs (
|
||||
id serial primary key,
|
||||
item text not null,
|
||||
item citext not null,
|
||||
unique (item)
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user