return ('PING', undef, undef, WF_NONE, $1);
}
sub UID ($) {
- #:583 UID 583AAAAAJ 1307703236 erry__ localhost localhost errietta 127.0.0.1 1307703241 + :errietta
- $_[0] =~ /^(:\S+) UID (\S+) (\d+) (\S+) (\S+) (\S+) (\S+) (\S+) (\d+) (\S+) :(.*)$/;
- my ($server, $uid, $stamp, $nick, $host, $vhost, $ident, $IP, $ts, $modes, $gecos) = ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12);
- print "UID $uid " . decodeUUID($uid) . "\n";
- my $user = { NICK => $nick, ID => decodeUUID($uid) };
- return ('NICKCONN', undef, undef, WF_NICK, $user, 0, $ts, $ident, $host, $server, $stamp, $modes, $vhost, $gecos,
+ if ($_[0] =~ /^(:\S+) UID (\S+) (\d+) (\S+) (\S+) (\S+) (\S+) (\S+) (\d+) (\S+) :(.*)$/) {
+ print "1111111111111\n";
+ #:583 UID 583AAAAAJ 1307703236 erry__ localhost localhost errietta 127.0.0.1 1307703241 + :errietta
+ my ($server, $uid, $stamp, $nick, $host, $vhost, $ident, $IP, $ts, $modes, $gecos) = ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12);
+ print "UID $uid " . decodeUUID($uid) . "\n";
+ my $user = { NICK => $nick, ID => decodeUUID($uid) };
+ return ('NICKCONN', undef, undef, WF_NICK, $user, 0, $ts, $ident, $host, $server, $stamp, $modes, $vhost, $gecos,
join('.', unpack('C4', MIME::Base64::decode($IP))));
+ }
+ elsif ($_[0] =~ /^(:\S+) UID (\S+) (\d+) (\S+) (\S+) (\S+) (\S+) (\S+) (\d+) (\S+) (\S+) :(.*)$/) {
+ print "2222222\n";
+ #:965 UID 965AAAAAG 1311863295 erry arceus.pokemonlake.com IceFyre/NetAdmin/erry ~erry 216.14.116.138 1311863255 +IWhiosw +ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz :erry
+ my ($server, $uid, $stamp, $nick, $host, $vhost, $ident, $IP, $ts, $modes, $snomasks, $gecos) = ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12);
+ $modes .= $snomasks;
+ print "UID $uid " . decodeUUID($uid) . "\n";
+ my $user = { NICK => $nick, ID => decodeUUID($uid) };
+ return ('NICKCONN', undef, undef, WF_NICK, $user, 0, $ts, $ident, $host, $server, $stamp, $modes, $vhost, $gecos,
+ join('.', unpack('C4', MIME::Base64::decode($IP))));
+ }
}
sub EOS($) {
my $event;
- print "EOS\n";
if ($_[1] != "ENDBURST") {
$_[0] =~ /^(@|:)(\S+) (?:EOS|ES)/; # Sometimes there's extra crap on the end?
my $server;
return ("ENDBURST", undef, undef, WF_ALL, $1);
}
}
-
+our %servIds;
sub SERVER($) {
#ircd::debug($_[0]) if $debug;
return ('SERVER', undef, undef, WF_ALL, $1, $2, $3, $4);
# src, serverName, numHops, infoLine
}
- elsif ($_[0] =~ /SERVER (\S+) (\S+) (\d+) (\S+) :(.*)$/) {
+ elsif ($_[0] =~ /^:(\S+) SERVER (\S+) (\S+) (\d+) (\S+) :(.*)$/) {
+ #:irc.icefyre.org SERVER Services.IceFyre.Org * 1 00B :IceFyre IRC Services
+ my $id = $servIds{$1};
+ create_server($5, $id);
+ return ('SERVER', undef, undef, WF_ALL, $1, $5, $4, $6);
+ }
+ elsif ($_[0] =~ /^SERVER (\S+) (\S+) (\d+) (\S+) :(.*)$/) {
+ print "RIGHT ONE WHOO\n";
#SERVER inspircd.erry.omg mypass 0 583 :erry World
+ #SERVER irc.icefyre.org mypass 0 965 :IceFyre IRC Hub
+
#SERVER servername password hopcount SID :Server Desc
$remoteserv = $4;
create_server ($4);
#since from now on we'll be getting commands as sent from the SID it's much wiser to keep that than the name.
+ $servIds{$1} = $4;
return ("SERVER", undef, undef, WF_ALL, undef, $1, $3, $5, $4);
}
}