start of DCC implementation
(server side) small refactoring and added speed calculation fixup! small refactoring and added speed calculation download progress fixup! download progress
This commit is contained in:
parent
9581a63e81
commit
ed2e56948e
7 changed files with 248 additions and 1 deletions
|
@ -70,6 +70,9 @@ func connectIRC(server *storage.Server, state *State, srcIP []byte) *irc.Client
|
|||
}
|
||||
}
|
||||
|
||||
i.DownloadFolder = cfg.DownloadFolder
|
||||
i.Autoget = cfg.Autoget
|
||||
|
||||
state.setIRC(server.Host, i)
|
||||
i.Connect(address)
|
||||
go newIRCHandler(i, state).run()
|
||||
|
|
|
@ -63,6 +63,8 @@ func (i *ircHandler) run() {
|
|||
} else if state.Connected {
|
||||
i.log("Connected")
|
||||
}
|
||||
case progress := <-i.client.Progress:
|
||||
i.state.sendJSON("progress", progress.ToJSON())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue