- show flags on dcc chat connection.
- set type on on_dcc*
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@202
c11ca15a-4712-0410-83d8-
924469b57eb5
- if (!exists $dcc{'CHAT'}{$nick}) {
+ if (!exists $dcc{'CHATvrfy'}{$nick}) {
$userHandle = &verifyUser($who, $nuh);
my $crypto = $userList{$userHandle}{'pass'};
my $success = 0;
$userHandle = &verifyUser($who, $nuh);
my $crypto = $userList{$userHandle}{'pass'};
my $success = 0;
} else {
&status("DCC CHAT: incorrect pass; closing connection.");
&DEBUG("chat: sock => '$sock'.");
} else {
&status("DCC CHAT: incorrect pass; closing connection.");
&DEBUG("chat: sock => '$sock'.");
+ $sock->close();
+ delete $dcc{'CHAT'}{$nick};
&DEBUG("chat: after closing sock. FIXME");
### BUG: close seizes bot. why?
}
if ($success) {
&status("DCC CHAT: user $nick is here!");
&DEBUG("chat: after closing sock. FIXME");
### BUG: close seizes bot. why?
}
if ($success) {
&status("DCC CHAT: user $nick is here!");
- $dcc{'CHAT'}{$nick} = $sock;
&DCCBroadcast("$nick ($uh) has joined the chat arena.");
&DCCBroadcast("$nick ($uh) has joined the chat arena.");
+ $dcc{'CHATvrfy'}{$nick} = 1;
+ if ($userHandle ne "default") {
+ &dccsay($nick,"Flags: $userList{$userHandle}{'flags'}");
+ }
# pity Net::IRC doesn't store nuh. Here's a hack :)
$self->whois($nick);
# pity Net::IRC doesn't store nuh. Here's a hack :)
$self->whois($nick);
if ($type eq 'SEND') { # GET for us.
# incoming DCC SEND. we're receiving a file.
if ($type eq 'SEND') { # GET for us.
# incoming DCC SEND. we're receiving a file.
&DEBUG("starting chat.");
$self->new_chat($event);
} else {
&DEBUG("starting chat.");
$self->new_chat($event);
} else {
- &status("${b_green}DCC $type$ob unknown ...");
+ &WARN("${b_green}DCC $type$ob (1)");
&status("${b_green}DCC CHAT$ob close from $b_cyan$nick$ob");
delete $dcc{'CHAT'}{$nick};
} else {
&status("${b_green}DCC CHAT$ob close from $b_cyan$nick$ob");
delete $dcc{'CHAT'}{$nick};
} else {
- &status("${b_green}DCC$ob UNKNOWN close from $b_cyan$nick$ob");
+ &status("${b_green}DCC$ob UNKNOWN close from $b_cyan$nick$ob (2)");
my $sock = ($event->to)[0];
$msgType = 'chat';
my $sock = ($event->to)[0];
$msgType = 'chat';
if ($type eq 'SEND') {
&status("${b_green}DCC lGET$ob established with $b_cyan$nick$ob");
} elsif ($type eq 'CHAT') {
if ($type eq 'SEND') {
&status("${b_green}DCC lGET$ob established with $b_cyan$nick$ob");
} elsif ($type eq 'CHAT') {
- &status("${b_green}DCC CHAT$ob established with $b_cyan$nick$ob ($nuh{$nick})");
+ &status("${b_green}DCC CHAT$ob established with $b_cyan$nick$ob $b_yellow($ob$nuh{$nick}$b_yellow)$ob");
$userHandle = &verifyUser($nick, $nuh{lc $nick});
my $crypto = $userList{$userHandle}{'pass'};
$userHandle = &verifyUser($nick, $nuh{lc $nick});
my $crypto = $userList{$userHandle}{'pass'};
+ $dcc{'CHAT'}{$nick} = $sock;
+
- $self->privmsg($sock,"Enter Password, $userHandle.");
+ &dccsay($nick,"Enter Password, $userHandle.");
- $self->privmsg($sock,"Welcome to blootbot DCC CHAT interface, $userHandle.");
+ &dccsay($nick,"Welcome to blootbot DCC CHAT interface, $userHandle.");
}
} elsif ($type eq 'SEND') {
&DEBUG("Starting DCC receive.");
}
} elsif ($type eq 'SEND') {
&DEBUG("Starting DCC receive.");
&DEBUG(" => '$_'.");
}
} else {
&DEBUG(" => '$_'.");
}
} else {
- &status("${b_green}DCC $type$ob unknown ...");
+ &WARN("${b_green}DCC $type$ob (3)");