|
|
@@ -474,7 +474,7 @@ void stream_writeuserfile(bd::Stream& stream, const struct userrec *bu, bool old
|
|
|
/* Rewrite the entire user file. Call USERFILE hook as well, probably
|
|
|
* causing the channel file to be rewritten as well.
|
|
|
*/
|
|
|
-int write_userfile(int idx)
|
|
|
+int real_write_userfile(int idx)
|
|
|
{
|
|
|
if (!userlist) {
|
|
|
return 1;
|
|
|
@@ -515,6 +515,24 @@ int write_userfile(int idx)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+int write_userfile(int idx) {
|
|
|
+ if (idx >= 0) {
|
|
|
+ return real_write_userfile(idx);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!do_write_userfile) {
|
|
|
+ do_write_userfile = 3;
|
|
|
+ } else if (do_write_userfile == 15) {
|
|
|
+ do_write_userfile = 0;
|
|
|
+ return real_write_userfile(idx);
|
|
|
+ } else {
|
|
|
+ ++do_write_userfile;
|
|
|
+ }
|
|
|
+
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
int change_handle(struct userrec *u, char *newh)
|
|
|
{
|
|
|
if (!u)
|