Fixed an odd bug when viewing non-existent quotes.
This commit is contained in:
1 parent
9ad245fc79
commit
35f58bf5b7
3 files changed
+5
-1
No files matched your search
@@ -20,7 +20,7 @@ In this alpha5 release, we have added:
|
|||||||
|
|
||||||
Bug fixes:
|
Bug fixes:
|
||||||
|
|
||||||
None
|
* Fixed a bug when viewing non-existent quotes.
|
||||||
|
|
||||||
Incompatibilities:
|
Incompatibilities:
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ Auto IRC Bot 3.0: Change Log
|
|||||||
|
|
||||||
3.0 Indev
|
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
|
* You can now define how many results are returned by QDB SEARCH/MORE at a
|
||||||
time with qdb_search_resnum in the config.
|
time with qdb_search_resnum in the config.
|
||||||
* Added SEARCH and MORE to QDB.
|
* Added SEARCH and MORE to QDB.
|
||||||
|
|||||||
@@ -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;
|
$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;
|
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.
|
# 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}, "\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]);
|
privmsg($src->{svr}, $src->{chan}, $data[3]);
|
||||||
|
|||||||
Reference in new issue
Block a user