oftc / oftc-ircservices

OFTC's IRC Services
https://www.oftc.net/CodingProjects/
GNU General Public License v2.0
33 stars 22 forks source link

nickserv UNLINK doesn't work #37

Open df7cb opened 6 years ago

df7cb commented 6 years ago

UNLINK fails because it can't create a new account for the unlinked nick:

2018-05-30 11:37:38 GMT [5464-2373855] ircservices@ircservices ERROR:  duplicate key value violates unique constraint "account_primary_nick_idx"
2018-05-30 11:37:38 GMT [5464-2373856] ircservices@ircservices DETAIL:  Key (primary_nick)=(193637) already exists.
2018-05-30 11:37:38 GMT [5464-2373857] ircservices@ircservices STATEMENT:  INSERT INTO account (primary_nick, password, salt, url, email, cloak, flag_enforce, flag_secure, flag_verified, flag_cloak_enabled, flag_admin, flag_email_verified, flag_private, language, last_host, last_realname, last_quit_msg, last_quit_time, reg_time) SELECT primary_nick, password, salt, url, email, cloak, flag_enforce, flag_secure, flag_verified, flag_cloak_enabled, flag_admin, flag_email_verified, flag_private, language, last_host, last_realname, last_quit_msg, last_quit_time, reg_time FROM account WHERE id=$1

At the moment it reports "$masternick is now unlinked" when unlinking $nick, but that might be a follow-up error from the above.

df7cb commented 3 years ago

We disabled the command for now so it doesn't cause problems: https://github.com/oftc/oftc-ircservices/commit/104bdb58be1f64449df63e228ed45bf4b46539aa

#0  0xb7548c20 in ?? () from /lib/i386-linux-gnu/libc.so.6
#1  0xb7548aa9 in strtol () from /lib/i386-linux-gnu/libc.so.6
#2  0x004951e9 in atoi (__nptr=0x0) at /usr/include/stdlib.h:363
#3  nickname_unlink (nick=0x9df6470) at nickname.c:537
#4  0xb6882df3 in m_unlink (service=0xb72d9010, client=0xb3d5772c, parc=0, parv=0x629840 <servpara>)
    at nickserv.c:1396
#5  0xb7198776 in m_privmsg (client=0xb721592c, source=0xb3d5772c, parc=3, parv=0x629880 <para>) at irc.c:843
#6  0x004977af in handle_command (hpara=0x629880 <para>, i=3, from=0xb3d5772c, client=0xb721592c, 
    mptr=0xb719e280 <privmsg_msgtab>) at parse.c:375
#7  parse (client=0xb721592c, pbuffer=0x625820 <readBuf> ":9J5AABX0P", bufend=0x625843 <readBuf+35> "")
    at parse.c:341
#8  0x00496d31 in client_dopacket (length=<optimized out>, buffer=0x625820 <readBuf> ":9J5AABX0P", 
    client=0xb721592c) at packet.c:150
#9  parse_client_queued (client=0xb721592c) at packet.c:150
#10 read_packet (fd=0x165191c, data=0xb721592c) at packet.c:184
#11 0x0049fdf0 in comm_select () at poll.c:202
#12 0x00486195 in main (argc=<optimized out>, argv=<optimized out>) at services.c:291