]> jfr.im git - irc/SurrealServices/srsv.git/commitdiff
Oops, send proper UUIDS for agents
authorerry <redacted>
Fri, 22 Jul 2011 14:14:37 +0000 (14:14 +0000)
committererry <redacted>
Fri, 22 Jul 2011 14:14:37 +0000 (14:14 +0000)
git-svn-id: http://svn.tabris.net/repos/srsv@3544 70d4eda1-72e9-0310-a436-91e5bd24443c

branches/0.5.0/SrSv/Insp/Send.pm

index 235a81f2a9d123c25d936dd833142d76802db5d2..c5b0a309e7b307cb6eaf4c3ff58f026099afd41f 100644 (file)
@@ -70,7 +70,6 @@ our %defer_mode;
 our %preconnect_defer_mode;
 our @userkill;
 our $unreal_protocol_version;
-our $count = 65;
 our %uuids; #NickServ -> AAAAAA
 our %reverse_uuids; #AAAAA -> NickServ
 addhandler('SEOS', undef(), undef(), 'ircd::eos', 1);
@@ -899,15 +898,21 @@ sub enable_cloakhost($$) {
        my ($src, $target) = @_;
        setumode($src, $target, '+x'); # only works in 3.2.6.
 }
-
+my $startInt = -1;
 sub agent_doconn ($$$$$) {
        my ($nick, $ident, $host, $modes, $gecos) = @_;
-       my $char = chr($count);
-       my $uuid = $main_conf{numeric} . "AAAAA" . $char; #FIXME - erry
+       my $uuid;
+       if ($startInt == -1) {
+               $uuid = $main_conf{numeric} . "AAAAAA";
+               $startInt = decodeUUID ($uuid);
+       }
+       else {
+               $uuid = encodeUUID($startInt);
+       }
        ircsend(":" . $main_conf{numeric} . " UID" . " $uuid " . time . " $nick $host $host $ident 127.0.0.1 ". (time+5) . " $modes " . ":$gecos" );
        setAgentUuid($nick,$uuid);
        setAgentRevUuid($uuid, $nick);
-       $count++;
+       $startInt++;
 }
 
 sub nolag($$@) {