From: erry Date: Fri, 22 Jul 2011 14:14:37 +0000 (+0000) Subject: Oops, send proper UUIDS for agents X-Git-Url: https://jfr.im/git/irc/SurrealServices/srsv.git/commitdiff_plain/9c9bf49a0c1b9471b01a59689f76cd9603bb6756 Oops, send proper UUIDS for agents git-svn-id: http://svn.tabris.net/repos/srsv@3544 70d4eda1-72e9-0310-a436-91e5bd24443c --- diff --git a/branches/0.5.0/SrSv/Insp/Send.pm b/branches/0.5.0/SrSv/Insp/Send.pm index 235a81f2..c5b0a309 100644 --- a/branches/0.5.0/SrSv/Insp/Send.pm +++ b/branches/0.5.0/SrSv/Insp/Send.pm @@ -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($$@) {