Fixed an odd bug when viewing non-existent quotes.

This commit is contained in:
Elijah Perrault committed 2011-02-20 19:44:18 -07:00
1 parent 9ad245fc79
commit 35f58bf5b7
3 files changed
+5 -1

No files matched your search

+1 -1
View File
@@ -20,7 +20,7 @@ In this alpha5 release, we have added:
Bug fixes:
None
* Fixed a bug when viewing non-existent quotes.
Incompatibilities:
+1
View File
@@ -3,6 +3,7 @@ Auto IRC Bot 3.0: Change Log
3.0 Indev
===============================================================================
* 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.
* Added SEARCH and MORE to QDB.
+3
View File
@@ -81,6 +81,9 @@ sub cmd_qdb
$dbq->execute($argv[1]) or notice($src->{svr}, $src->{nick}, trans('An error occurred').'. Quote might not exist.') and return;
my @data = $dbq->fetchrow_array;
# Check for an unusual issue.
if (!defined $data[1]) { notice($src->{svr}, $src->{nick}, trans('An error occurred').'. Quote might not exist.'); return; }
# Send it back.
privmsg($src->{svr}, $src->{chan}, "\002Submitted by\002 $data[1] \002on\002 ".POSIX::strftime('%F', localtime($data[2]))." \002at\002 ".POSIX::strftime('%I:%M %p', localtime($data[2])));
privmsg($src->{svr}, $src->{chan}, $data[3]);