Fixed missing lower() in waifu/husbando insert
This commit is contained in:
parent
3e86c605f8
commit
dba70a7910
|
@ -111,7 +111,7 @@ class Useless(DatabasePlugin):
|
||||||
insert into
|
insert into
|
||||||
users (nick, waifu)
|
users (nick, waifu)
|
||||||
values
|
values
|
||||||
(%s, %s)
|
(lower(%s), %s)
|
||||||
on conflict (nick) do update set
|
on conflict (nick) do update set
|
||||||
waifu = excluded.waifu
|
waifu = excluded.waifu
|
||||||
''', [mask.nick, waifu])
|
''', [mask.nick, waifu])
|
||||||
|
@ -148,17 +148,21 @@ class Useless(DatabasePlugin):
|
||||||
if nick.startswith('='):
|
if nick.startswith('='):
|
||||||
nick = nick[1:]
|
nick = nick[1:]
|
||||||
|
|
||||||
self.cur.execute('''
|
try:
|
||||||
insert into
|
self.cur.execute('''
|
||||||
users (nick, husbando)
|
insert into
|
||||||
values
|
users (nick, husbando)
|
||||||
(%s, %s)
|
values
|
||||||
on conflict (nick) do update set
|
(lower(%s), %s)
|
||||||
husbando = excluded.husbando
|
on conflict (nick) do update set
|
||||||
''', [mask.nick, nick])
|
husbando = excluded.husbando
|
||||||
|
''', [mask.nick, nick])
|
||||||
|
|
||||||
self.bot.notice(mask.nick, 'Husbando set to: {husbando}'
|
self.bot.notice(mask.nick, 'Husbando set to: {husbando}'
|
||||||
.format(husbando=nick))
|
.format(husbando=nick))
|
||||||
|
except Error:
|
||||||
|
print(ex)
|
||||||
|
self.con.rollback()
|
||||||
else:
|
else:
|
||||||
self.cur.execute('''
|
self.cur.execute('''
|
||||||
select
|
select
|
||||||
|
|
Loading…
Reference in New Issue
Block a user