Made the AI module use the global nick settings

This commit is contained in:
Izaya 2016-01-13 02:25:11 +11:00
parent a09faa268e
commit 12edd5c5a2

View File

@ -1,6 +1,6 @@
nick,chan,message = ... nick,chan,message = ...
local serialization = require "serialization" local serialization = require "serialization"
lnick = "yukichan" lnick = config.nick
--print(lnick,nick,chan,message) --print(lnick,nick,chan,message)
if string.find(message,lnick) ~= nil and nick ~= "Shocky" then if string.find(message,lnick) ~= nil and nick ~= "Shocky" then
-- print("Message addressed to AI!") -- print("Message addressed to AI!")
@ -37,7 +37,7 @@ if string.find(message,lnick) ~= nil and nick ~= "Shocky" then
selstring = aitab[selection][1][1] selstring = aitab[selection][1][1]
if type(selstring) == "table" then if type(selstring) == "table" then
for k,v in pairs(selstring) do for k,v in pairs(selstring) do
print(k.."="..v) --print(k.."="..v)
end end
end end
print("Selected response: " .. selstring) print("Selected response: " .. selstring)