]>
jfr.im git - irc/SurrealServices/srsv.git/blob - tags/0.4.3.1-pre2/auspice/nickslurp.pl
3 # This file is part of SurrealServices.
5 # SurrealServices is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
10 # SurrealServices is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with SurrealServices; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 $dbh = DBI-
>connect("DBI:mysql:services", "services", "yQ0AaCLdMhfEBTpxwc0OWw", { AutoCommit
=> 1, RaiseError
=> 1 });
23 $register = $dbh->prepare("INSERT IGNORE INTO nickreg SET nick=?, pass=?, email=?, regd=?, last=?, flags=1, ident=?, vhost=?, gecos=?, quit=?");
24 $create_alias = $dbh->prepare("INSERT IGNORE INTO nickalias SET root=?, alias=?");
30 while(@in = split(/;/, <FILE
>)) {
31 next unless($in[2] eq 'slave:no');
33 my ($ident, $host) = split('@', $in[3]) or ('', '');
36 @data = ($in[0], $in[1], $in[6], $in[4], $time, $ident, $host, $in[17], $in[16]);
37 print join(', ', @data), "\n";
38 $register->execute(@data);
39 $create_alias->execute($in[0], $in[0]);
44 while(@in = split(/;/, <FILE
>)) {
45 next unless($in[2] eq 'slave:yes');
47 @data = ($in[3], $in[0]);
48 print join(', ', @data), "\n";
49 $create_alias->execute(@data);