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

+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]);