Skip to content

Commit

Permalink
Enabled logging
Browse files Browse the repository at this point in the history
  • Loading branch information
abramhindle committed Jul 16, 2010
1 parent 19f32dc commit d3dfef1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bot.pl
Expand Up @@ -194,7 +194,7 @@ sub irc_public {
$heap->{irc}->yield(privmsg => ${$channels}[0] => $_) for @lines;
#$heap->{irc}->yield(privmsg => ${$channels}[0] => $_) for (split (/\n/,$out));
} else {
append_chat_lines( $heap, $channel, log_line($nick, $mask, $message) );
append_chat_line( $heap, $channel, log_line($nick, $mask, $message) );
}
}

Expand Down
14 changes: 10 additions & 4 deletions lib/Shittybot/TCL.pm
Expand Up @@ -108,12 +108,18 @@ sub call {

# update the log
if (ref($loglines)) {
ddx("loglines! ".scalar(@$loglines));
my $add_to_log = tcl_escape("cache put irc chanlist $chanlist");
my @log = map {
"pubm:smeggdrop_log_line $nick $mask $handle $channel $line";
my @cmds = map {
my ($time,$nick,$mask,$line) = @{$_};
$line = tcl_escape( $line );
my $cmd = "pubm:smeggdrop_log_line $nick $mask $handle $channel $line";
ddx($cmd);
$cmd
} @$loglines;
my $logcmd = join(@log,$/);
$tcl->Eval("$logcmd");
my $logcmd = join($/, @cmds);
ddx($logcmd);
ddx($tcl->Eval($logcmd));
}
# update the chanlist
my $update_chanlist = tcl_escape("cache put irc chanlist $chanlist");
Expand Down

0 comments on commit d3dfef1

Please sign in to comment.