-- Wordy 1.0
-- Another pointless script brought to you by Madman
-- Now Children, what can we learn by this?
-- The danger of reading IRC quotes in the night @ bash.org //Madman
Word2Count = "devil"
function Main()
SetTimer(1000*60*60*24)
StartTimer()
wCount = 0
end
function ChatArrival(curUser, data)
local data = string.sub(data, 1, -2)
local s,e,data = string.find(data, "%b<>%s+(.*)")
local data,c = string.gsub(data , "(%w+)", function(word) return Count(word) end)
end
function Count(text)
local Word = string.lower(text)
if Word == Word2Count then
wCount = wCount+1
end
end
function OnTimer()
SendToAll("Wordy", "The word " ..Word2Count.. " was mentioned " ..wCount.. " time(s) in the last 24 hours")
wCount = 0
end
nice one m8