diff --git a/doc/CHANGELOG b/doc/CHANGELOG index b7688c9..defeb69 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -3,6 +3,7 @@ Auto IRC Bot 3.0: Change Log 3.0 Indev =============================================================================== + * Ignore PRIVMSG's if they're from an invalid source. * Fixed an odd bug when viewing non-existent quotes. * You can now define how many results are returned by QDB SEARCH/MORE at a time with qdb_search_resnum in the config. diff --git a/lib/Parser/IRC.pm b/lib/Parser/IRC.pm index dee91b9..5bf1902 100644 --- a/lib/Parser/IRC.pm +++ b/lib/Parser/IRC.pm @@ -530,9 +530,12 @@ sub part sub privmsg { my ($svr, @ex) = @_; - my %data = API::IRC::usrc(substr($ex[0], 1)); + my %data = API::IRC::usrc(substr($ex[0], 1)); - my @argv; + # Ensure this is coming from a user rather than a server. + if ($ex[0] !~ m/!/xsm) { return; } + + my @argv; for (my $i = 4; $i < scalar(@ex); $i++) { push(@argv, $ex[$i]); }