- if (1) { # old
- &dbSet("rootwarn", { nick => lc($nick) }, { attempt => $attempt });
- &dbSet("rootwarn", { nick => lc($nick) }, { time => time() });
- &dbSet("rootwarn", { nick => lc($nick) }, { host => $user."\@".$host });
- &dbSet("rootwarn", { nick => lc($nick) }, { channel => $chan });
- } else { # new. replace.
- &dbSet("rootwarn", "nick", lc($nick), "attempt", $attempt);
- &dbSet("rootwarn", "nick", lc($nick), "time", time());
- &dbSet("rootwarn", "nick", lc($nick), "host", $user."\@".$host);
- &dbSet("rootwarn", "nick", lc($nick), "channel", $chan);
- }
+ # ok... don't record the attempt if nick==root.
+ return if ($nick eq "root");
+
+ &sqlSet("rootwarn", { nick => lc($nick) }, {
+ attempt => $attempt,
+ time => time(),
+ host => $user."\@".$host,
+ channel => $chan,
+ } );