mirror of
https://github.com/42wim/matterbridge.git
synced 2024-12-24 12:12:39 +01:00
16 lines
421 B
Plaintext
16 lines
421 B
Plaintext
|
fmt := import("fmt")
|
||
|
os := import("os")
|
||
|
times := import("times")
|
||
|
|
||
|
if msgText != "" && msgUsername != "system" {
|
||
|
os.chdir("/var/www/matterbridge")
|
||
|
file := os.open_file("inmessage.log", os.o_append|os.o_wronly|os.o_create, 0644)
|
||
|
file.write_string(fmt.sprintf(
|
||
|
"[%s] <%s> %s\n",
|
||
|
times.time_format(times.now(), times.format_rfc1123),
|
||
|
msgUsername,
|
||
|
msgText
|
||
|
))
|
||
|
file.close()
|
||
|
}
|