From 029c20cfe98490442b395281a1e1da8dd24a8f52 Mon Sep 17 00:00:00 2001 From: Brandon Cornejo Date: Mon, 11 Mar 2019 22:17:22 -0500 Subject: [PATCH] add timestamps to logged channels --- src/channels.tin | 42 +++++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/src/channels.tin b/src/channels.tin index 11c27e9..89a1cfe 100644 --- a/src/channels.tin +++ b/src/channels.tin @@ -1,48 +1,56 @@ #CLASS {channels} {kill}; #CLASS {channels} {open}; -#VARIABLE {talker_log_toggle} {1}; +#VARIABLE {talker_log_toggle} {0}; -#ACTION {^You {tell|ask|exclaim to} %1:%2} {#LINE {LOG} {$chat_file}}; -#ACTION {^%1 {tells|asks|exclaims to} %*you{|(?: in \w+)?}: %4} {#LINE {LOG} {$chat_file}}; -#ACTION {^[%1] %2{:|} %3} {#LINE {LOG} {$chat_file}}; +#FUNCTION {log_line_to_chat} { + #script {ts} {date +"%I:%M%P"}; + #line {log} {$chat_file} {$ts[1] \}; + #line {log} {$chat_file} +}; + +#ACTION {^You {tell|ask|exclaim to} %1:%2} {#return @log_line_to_chat{};}; +#ACTION {^%1 {tells|asks|exclaims to} %*you{|(?: in \w+)?}: %4} {#return @log_line_to_chat{};}; +#ACTION {^[%1] %2{:|} %3} {#return @log_line_to_chat{};}; -#ACTION {^(They Might Be Alts) } {#LINE {LOG} {$chat_file}}; +#ACTION {^(They Might Be Alts) } {#return @log_line_to_chat{};}; -#ACTION {^(newbiehelpers)} {#LINE {LOG} {$chat_file}}; -#ACTION {^You newbiehelper-tell:%1} {#LINE {LOG} {$chat_file}}; -#ACTION {^(newbie)} {#LINE {LOG} {$chat_file}}; -#ACTION {^You newbie-tell:%1} {#LINE {LOG} {$chat_file}}; -#ACTION {^You special-tell:%1} {#LINE {LOG} {$chat_file}}; -#ACTION {^You cre-tell:%1} {#LINE {LOG} {$chat_file}}; +#ACTION {^(newbiehelpers)} {#return @log_line_to_chat{};}; +#ACTION {^You newbiehelper-tell:%1} {#return @log_line_to_chat{};}; +#ACTION {^(newbie)} {#return @log_line_to_chat{};}; +#ACTION {^You newbie-tell:%1} {#return @log_line_to_chat{};}; +#ACTION {^You special-tell:%1} {#return @log_line_to_chat{};}; +#ACTION {^You cre-tell:%1} {#return @log_line_to_chat{};}; #ACTION {^(Playerkillers) %1 wisps{:|} %2} { #if {"$talker_log_toggle" == "1"} { - #LINE {LOG} {$chat_file} + #return @log_line_to_chat{}; }; }; #ACTION {^(Thieves) %1 wisps{:|} %2} { #if {"$talker_log_toggle" == "1"} { - #LINE {LOG} {$chat_file} + #return @log_line_to_chat{}; }; }; #ACTION {^(Wizards) %1 wisps{:|} %2} { #if {"$talker_log_toggle" == "1"} { - #LINE {LOG} {$chat_file} + #return @log_line_to_chat{}; }; }; #ACTION {^(Igame) %1 wisps{:|} %2} { #if {"$talker_log_toggle" == "1"} { - #LINE {LOG} {$chat_file} + #return @log_line_to_chat{}; }; }; #ALIAS {talker log %1} { - #if {%1 == "on"} { + #if {"%1" == "on"} { + #echo {<149>[Talker] Now logging talker chat to monitor.<099>}; #var {talker_log_toggle} {1}; }; - #if {%1 == "off"} { + #if {"%1" == "off"} { + #echo {<149>[Talker] No longer logging talker chat to monitor.<099>}; #var {talker_log_toggle} {0}; }; };