Thumbnail

rani/matterbridge.git

Clone URL: https://git.buni.party/rani/matterbridge.git

Viewing file on branch master

1fmt := import("fmt")
2os := import("os")
3times := import("times")
4
5if msgText != "" && msgUsername != "system" {
6 os.chdir("/var/www/matterbridge")
7 file := os.open_file("inmessage.log", os.o_append|os.o_wronly|os.o_create, 0644)
8 file.write_string(fmt.sprintf(
9 "[%s] <%s> %s\n",
10 times.time_format(times.now(), times.format_rfc1123),
11 msgUsername,
12 msgText
13 ))
14 file.close()
15}
16