X-Git-Url: http://www.git.cypherpunks.ru/?p=goircd.git;a=blobdiff_plain;f=events.go;h=95760e8a6ceeaf0efe139c5d3e8d295d685c7b13;hp=6fdf1e79b3318052d319878457459d9ca22ccc55;hb=de49f5eeba0117dd09fcdc290ef99ba6a5e2656d;hpb=1f4a463c0a9fb411827916c0df60df4538702307 diff --git a/events.go b/events.go index 6fdf1e7..95760e8 100644 --- a/events.go +++ b/events.go @@ -60,7 +60,7 @@ type LogEvent struct { // Logging events logger itself // Each room's events are written to separate file in logdir // Events include messages, topic and keys changes, joining and leaving -func Logger(logdir string, events chan LogEvent) { +func Logger(logdir string, events <-chan LogEvent) { mode := os.O_CREATE | os.O_WRONLY | os.O_APPEND perm := os.FileMode(0660) var format string @@ -93,7 +93,7 @@ type StateEvent struct { // Room state events saver // Room states shows that either topic or key has been changed // Each room's state is written to separate file in statedir -func StateKeeper(statedir string, events chan StateEvent) { +func StateKeeper(statedir string, events <-chan StateEvent) { mode := os.O_CREATE | os.O_TRUNC | os.O_WRONLY perm := os.FileMode(0660) for event := range events {