- $userHandle = ""; # reset.
- $who = lc $nick;
- $message = $msg;
- $orig{who} = $nick;
- $orig{message} = $msg;
- $nuh = $nuh{$who};
- $uh = (split /\!/, $nuh)[1];
- $h = (split /\@/, $uh)[1];
- $addressed = 1;
- $msgType = 'chat';
-
- if (!exists $dcc{'CHATvrfy'}{$nick}) {
- $userHandle = &verifyUser($who, $nuh);
- my $crypto = $users{$userHandle}{PASS};
- my $success = 0;
-
- if ($userHandle eq "_default") {
- &WARN("DCC CHAT: _default/guest not allowed.");
- return;
- }
-
- ### TODO: prevent users without CRYPT chatting.
- if (!defined $crypto) {
- &TODO("dcc close chat");
- &msg($who, "nope, no guest logins allowed...");
- return;
- }
-
- if (&ckpasswd($msg, $crypto)) {
- # stolen from eggdrop.
- $conn->privmsg($sock, "Connected to $ident");
- $conn->privmsg($sock, "Commands start with '.' (like '.quit' or '.help')");
- $conn->privmsg($sock, "Everything else goes out to the party line.");
-
- &dccStatus(2) unless (exists $sched{"dccStatus"}{RUNNING});
-
- $success++;
-
- } else {
- &status("DCC CHAT: incorrect pass; closing connection.");
- &DEBUG("chat: sock => '$sock'.");
+ $userHandle = ''; # reset.
+ $who = lc $nick;
+ $message = $msg;
+ $orig{who} = $nick;
+ $orig{message} = $msg;
+ $nuh = $nuh{$who};
+ $uh = ( split /\!/, $nuh )[1];
+ $h = ( split /\@/, $uh )[1];
+ $addressed = 1;
+ $msgType = 'chat';
+
+ if ( !exists $dcc{'CHATvrfy'}{$nick} ) {
+ $userHandle = &verifyUser( $who, $nuh );
+ my $crypto = $users{$userHandle}{PASS};
+ my $success = 0;
+
+ if ( $userHandle eq '_default' ) {
+ &WARN('DCC CHAT: _default/guest not allowed.');
+ return;
+ }
+
+ ### TODO: prevent users without CRYPT chatting.
+ if ( !defined $crypto ) {
+ &TODO('dcc close chat');
+ &msg( $who, 'nope, no guest logins allowed...' );
+ return;
+ }
+
+ if ( &ckpasswd( $msg, $crypto ) ) {
+
+ # stolen from eggdrop.
+ $conn->privmsg( $sock, "Connected to $ident" );
+ $conn->privmsg( $sock,
+ 'Commands start with "." (like ".quit" or ".help")' );
+ $conn->privmsg( $sock,
+ 'Everything else goes out to the party line.' );
+
+ &dccStatus(2) unless ( exists $sched{'dccStatus'}{RUNNING} );
+
+ $success++;
+
+ }
+ else {
+ &status('DCC CHAT: incorrect pass; closing connection.');
+ &DEBUG("chat: sock => '$sock'.");