Fix .quote not actually working
parent
ddfa488140
commit
8b308fdd7c
|
@ -63,6 +63,7 @@ class Mod_Fun < Vrobot4::Module::Module
|
||||||
def c_quote m, argv
|
def c_quote m, argv
|
||||||
argv = argv.join(" ")
|
argv = argv.join(" ")
|
||||||
if argv.length == 0
|
if argv.length == 0
|
||||||
|
max = JSON.parse(open(QDB + "/interface.cgi").read)["numQuotes"]
|
||||||
m.reply_b open(QDB + "/q/" + (rand(max) + 1).to_s).read
|
m.reply_b open(QDB + "/q/" + (rand(max) + 1).to_s).read
|
||||||
elsif Vrobot4.is_num? argv
|
elsif Vrobot4.is_num? argv
|
||||||
m.reply_b open(QDB + "/q/" + argv.to_i.to_s).read
|
m.reply_b open(QDB + "/q/" + argv.to_i.to_s).read
|
||||||
|
|
Loading…
Reference in New Issue