Skip to content

Commit

Permalink
No history for any command by any profile
Browse files Browse the repository at this point in the history
  • Loading branch information
nishithshah2211 committed Jan 30, 2015
1 parent c3f795e commit df3b88e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions chatlogger.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
function OnStartup()
tConfig, tChatHistory = {
sBotName = SetMan.GetString( 21 ) or "PtokaX",
sProfiles = "012", -- No history for commands from users with profiles
sLogsPath = "/www/ChatLogs/",
iMaxLines = 100,
}, { "Hi!" }
Expand All @@ -21,7 +20,7 @@ function ChatArrival( tUser, sMessage )
local sCmd, sData = sMessage:match( "%b<> [-+*/?!#](%w+)%s?(.*)|" )
local sTime = os.date( "%I:%M:%S %p" )
local sChatLine = "["..sTime.."] "..sMessage:sub( 1, -2 )
if not( sCmd and tConfig.sProfiles:find(tUser.iProfile) ) then
if not sCmd then
table.insert( tChatHistory, sChatLine )
if tChatHistory[tConfig.iMaxLines + 1] then
table.remove( tChatHistory, 1 )
Expand Down

0 comments on commit df3b88e

Please sign in to comment.