[IRCServices Coding] Solution to the nickgroup 0 problem.

Mark Hetherington mark at ctcp.net
Tue Mar 12 14:52:19 PST 2002


After much fiddling, I have finally both removed the 0 nickgroups from my 
database and upgraded to services 5.0a24 :)

For anyone affected by this bug, the following steps should remove the 
erroneous names and allow you to upgrade to the new version:

1) Make sure you are running version 5.0a23 which has code to not write 
nickgroup 0 nicknames to the database file. 
2) Identify those nicknames with a nickgroup of 0. I suggest using the 
httpd module and the XML download feature. IME this does not display all 
nicknames in the database, but nickgroup 0 seemed to always be the first 
entry and always list correctly. 
3) Drop the nicknames identified as being of nickgroup 0. In my case they 
were forbidden nicks so this affected no users. If the nickname is valid, 
it is likely not working correctly so although you might want to warn the 
users affected, they are likely not using those names anyway. 
4) Shutdown services with /os shutdown so it saves the new database.
5) Restart Services 5.0a23, ensuring you do not get any warnings in 
services.log for your current database (both on startup and on first write 
which you can force with an /os update). Also check that the XML download 
does not report any more nickgroup zero entries. If any remain, goto 2 and 
repeat until you have cleared them out.
6) Backup your databases. This is important. Even though the startup fails, 
I had problems with completely trashed databases when services segfaulted. 
7) Install Services 5.0a24 and start them. If they bootup, the nickgroup 
bug is now cured. If not, restore your backup and return to version 5.0a23 
and goto 2 to find the erroneous entry. 

I know at least one other person on the list has problems with this bug, so 
HTH. 

-- 
Mark.