Perl 6 - the future is here, just unevenly distributed

IRC log for #ilbot, 2014-07-03

| Channels | #ilbot index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
15:28 furanshishouco joined #ilbot
15:28 furanshishouco hi all
16:16 pdurbin furanshishouco: hi
17:16 furanshishouco i'm trying to mute a bot for the logger, but i can't do it
17:16 furanshishouco I've added to bot.conf a new line : ignore_list = OneNick
17:16 furanshishouco And in ilbot2.pl this lines :
17:16 furanshishouco my $ignore = $conf->{ignore_list} // undef;
17:16 furanshishouco in my $bot = Ilbot::Logger->new(
17:16 furanshishouco ignore_list => $ignore,
17:16 furanshishouco But it doesn't works
17:16 furanshishouco What am I doing wrong? Any other way?
17:24 furanshishouco By removing the above and putting only:
17:24 furanshishouco ignore_list => [qw(nick)],
17:24 furanshishouco in my $bot ... not work either
17:27 moritz furanshishouco: it that doesn't work, it likely means that feature from Bot::BasicBot doesn't work
17:28 moritz furanshishouco: but you can put a    return if $who eq 'nick'; in dbwrite
17:31 furanshishouco eq is =~???
17:33 moritz eq is equality comparison
17:33 moritz =~ is regex match
17:40 furanshishouco sub dbwrite {
17:40 furanshishouco my ($channel, $who, $line) = @_;
17:40 furanshishouco return unless $channel =~ /\A#\S+\z/;
17:40 furanshishouco $channel =~ s/\A##/#/;
17:40 furanshishouco # remove leading BOMs. Some clients seem to send them.
17:41 furanshishouco $line =~ s/\A\x{ffef}//;
17:41 furanshishouco return if $line =~ /^\[off\]/i;
17:41 furanshishouco if ($who eq 'Icebot') {
17:41 furanshishouco return if $line =~ /^¡Hola/i;
17:41 furanshishouco }
17:41 furanshishouco return unless $log_joins || length($who // '');
17:41 furanshishouco $backend->log_line(
17:41 furanshishouco channel => $channel,
17:41 furanshishouco nick => $who,
17:41 furanshishouco line => $line,
17:41 furanshishouco );
17:41 furanshishouco }
17:41 furanshishouco Use of uninitialized value $who in string eq at /usr/local/cw/ilbot/bin/ilbot2.pl line 28.
17:42 moritz make the condition   if (defined $who && $who eq 'Icebot') {
17:45 furanshishouco if i put say "Icebot spoke"; within the if, is ok? must works?
17:49 moritz what do you want it to do?
17:50 furanshishouco know if the if is working :D
17:50 moritz well, test it
17:52 furanshishouco Already save changes and restarted log, but no messages in console apart Launching logger and trying to connect
17:55 moritz supper&
17:57 furanshishouco String found where operator expected at /usr/local/cw/ilbot/bin/ilbot2.pl line 30, near "say "Icebot spoke""
17:57 furanshishouco (Do you need to predeclare say?)
18:12 furanshishouco got
18:12 furanshishouco A little dirty, but it works
18:12 furanshishouco return if (defined $who && $who eq 'Icebot' && $line =~ /Hola/i);
18:13 furanshishouco thanks for help moritz :D
18:17 moritz back
18:17 moritz furanshishouco: you're welcome
18:17 moritz a, for say() you need to   use 5.010;   declaration at the top
18:17 moritz it's not available in older versions of perl
20:26 furan_cw joined #ilbot
21:15 furan_cw left #ilbot

| Channels | #ilbot index | Today | | Search | Google Search | Plain-Text | summary