Duke777 Posted August 24, 2014 Share Posted August 24, 2014 Is there a way of getting chat logs out of silent mod? Quote Link to comment Share on other sites More sharing options...
Management gaoesa Posted August 24, 2014 Management Share Posted August 24, 2014 You can parse those from server log. Quote Link to comment Share on other sites More sharing options...
Duke777 Posted August 25, 2014 Author Share Posted August 25, 2014 I have the server.log open and don't see any conversations. Could you be more specific, I am new to silent mod. Quote Link to comment Share on other sites More sharing options...
Management gaoesa Posted August 25, 2014 Management Share Posted August 25, 2014 Lines that start with "say:", "sayteam:", "saybuddy:", "privmsg:", "tprivmsg:", "mprivmsg:" and "adminchat:" are player chats. Saybuddy is fireteam chats, privmsg is normal private message, tprivmsg is private message to team and mprimsg is private message sent with the private message dialog and it can have multiple recipients. EDIT:I forgot to mention, to see private messages in the log, you need to have g_tyranny enabled. Quote Link to comment Share on other sites More sharing options...
Duke777 Posted August 25, 2014 Author Share Posted August 25, 2014 (edited) Okay thanks, I used Notpad++ and typed say (under the find icon which looks like binoculars) until I found the chats amongst the omni-bot chatter. I want to thank everyone for helping me learn the ins and outs of silent mod. Edited August 25, 2014 by Duke777 Quote Link to comment Share on other sites More sharing options...
Purple Posted August 25, 2014 Share Posted August 25, 2014 Or if you want to make it 3000000000000000x easier just download etsnitch and it auto parses your logs. :* Ray 1 Quote Link to comment Share on other sites More sharing options...
Management hellreturn Posted August 25, 2014 Management Share Posted August 25, 2014 You can also use chat log LUA. I will submit it in download section sometime tonight. It should be also available on SD forums in one topic. Ray 1 Quote Link to comment Share on other sites More sharing options...
Purple Posted August 26, 2014 Share Posted August 26, 2014 (edited) That's pretty much what i did with lua my self for pm logging. I log my pms via date/ip/name/name/message and i use "|" as a seperater and then just remove some stuff from the string and print it out via php. Heres an example of how i have it setup. http://gyazo.com/63a8518e10d3b031895fae08913aae99 (very basic setup atm just started working on it a few nights ago will add visuals and tables to make it look cleaner) Edited August 26, 2014 by Purple hellreturn 1 Quote Link to comment Share on other sites More sharing options...
Management hellreturn Posted August 26, 2014 Management Share Posted August 26, 2014 http://mygamingtalk.com/forums/files/file/43-chat-logging/ That will log all the chats in a separate file. Feel free to modify it as per your needs. Quote Link to comment Share on other sites More sharing options...
Management hellreturn Posted August 26, 2014 Management Share Posted August 26, 2014 That's pretty much what i did with lua my self for pm logging. I log my pms via date/ip/name/name/message and i use "|" as a seperater and then just remove some stuff from the string and print it out via php. Heres an example of how i have it setup. http://gyazo.com/63a8518e10d3b031895fae08913aae99 (very basic setup atm just started working on it a few nights ago will add visuals and tables to make it look cleaner) You can also submit your own version in download section so if any admin who needs it can download it and use it Thank you! Quote Link to comment Share on other sites More sharing options...
Purple Posted August 27, 2014 Share Posted August 27, 2014 (edited) Here i made something up real quick should work haven't tested it though. --[[ Chat logger v.1 by Purple (DRi*VJ*) 8/27/2014 Info: All logs are logged in a seperate file including PM, regular chat and team chat. They will be in your silent directory. If you would like to organize them put them into a folder called anything and change pm_logs = "pm_logs.txt" say_logs = "say_logs.txt" say_team_logs = "say_team_logs.txt" To your directory destination e.g. pm_logs = "logs/pm_logs.txt" Note: The file names must be the same in order for this to work. --]] pm_logs = "pm_logs.txt" say_logs = "say_logs.txt" say_team_logs = "say_team_logs.txt" date_fmt = "%Y-%m-%d, %H:%M:%S" version = "0.1" temp_name = {} c_Name = {} temp_sguid = {} temp_ip = {} pm = {} say = {} say_team = {} function et_InitGame(levelTime, randomSeed, restart) et.RegisterModname("pm_logs.lua "..version.." "..et.FindSelf()) maxclients = tonumber(et.trap_Cvar_Get("sv_maxclients")) for i = 0, maxclients - 1 do pm[i] = "" say[i] = "" say_team[i] = "" end end function et_ClientBegin( clientNum ) temp_name[clientNum] = et.Info_ValueForKey( et.trap_GetUserinfo( clientNum ), "name" ) temp_sguid[clientNum] = et.Info_ValueForKey( et.trap_GetUserinfo( clientNum ), "sil_guid" ) temp_ip[clientNum] = et.Info_ValueForKey( et.trap_GetUserinfo( clientNum ), "ip" ) c_Name[clientNum] = et.Q_CleanStr( temp_name[clientNum] ) end function et_ClientCommand(clientNum, command) if command == "m" then if et.trap_Argc() > 1 then for i = 2, et.trap_Argc() - 1, 1 do pm[clientNum] = pm[clientNum] .. et.trap_Argv(i) .. " " end local sender = string.lower(et.trap_Argv(1)) info = os.date("%x %I:%M:%S%p") .. " | IP: [" .. temp_ip[clientNum] .. "] | From: "..playerName(clientNum).." | To: " .. sender .. " | Pm: [ " .. pm[clientNum] .. "] " .."\n" fd,len = et.trap_FS_FOpenFile(pm_logs, et.FS_APPEND) count = et.trap_FS_Write(info, string.len(info), fd) et.trap_FS_FCloseFile(fd) fd = nil for i = 0, maxclients - 1 do pm[i] = "" end end return 0 end if command == "say" then if et.trap_Argc() > 1 then for i = 1, et.trap_Argc() - 1, 1 do say[clientNum] = say[clientNum] .. et.trap_Argv(i) .. " " end info = os.date("%x %I:%M:%S%p") .. " | IP: [" .. temp_ip[clientNum] .. "] | Player: "..playerName(clientNum).." | say: [ " .. say[clientNum] .. "] " .."\n" fd,len = et.trap_FS_FOpenFile(say_logs, et.FS_APPEND) count = et.trap_FS_Write(info, string.len(info), fd) et.trap_FS_FCloseFile(fd) fd = nil for i = 0, maxclients - 1 do say[i] = "" end end return 0 end if command == "say_team" then if et.trap_Argc() > 1 then for i = 1, et.trap_Argc() - 1, 1 do say_team[clientNum] = say_team[clientNum] .. et.trap_Argv(i) .. " " end info = os.date("%x %I:%M:%S%p") .. " | IP: [" .. temp_ip[clientNum] .. "] | Player: "..playerName(clientNum).." | say_team: [ " .. say_team[clientNum] .. "] " .."\n" fd,len = et.trap_FS_FOpenFile(say_team_logs, et.FS_APPEND) count = et.trap_FS_Write(info, string.len(info), fd) et.trap_FS_FCloseFile(fd) fd = nil for i = 0, maxclients - 1 do say_team[i] = "" end end return 0 end return 0 end function playerName(id) local name = et.Info_ValueForKey(et.trap_GetUserinfo(id), "name") if name == "" then return "*unknown*" end return name end Edited August 27, 2014 by Purple hellreturn 1 Quote Link to comment Share on other sites More sharing options...
Purple Posted August 27, 2014 Share Posted August 27, 2014 <?php $file_handle = fopen("pm_logs.txt","rb"); while(!feof($file_handle)){ $get_userinfo = fgets($file_handle); $userinfo = explode('|', $get_userinfo); $find[] = ']'; $find[] = '['; $replace[] = ''; $replace[] = ''; $userinfo = str_replace($find, $replace, $userinfo); print $userinfo[0] . $userinfo[1] . $userinfo[2] . $userinfo[3] . $userinfo[4]. "<BR>"; } fclose($file_handle); ?> heres also the php script for the simple parsing which i showed in my screen shot earlier. Quote Link to comment Share on other sites More sharing options...
Dookie Posted August 27, 2014 Share Posted August 27, 2014 Ok this script works without any probs! Thanks purple! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.