remove unneeded Client.Who(); update todos

This commit is contained in:
Liam Stanley 2016-12-10 05:56:52 -05:00
parent c95d531783
commit b32ff05c0a
3 changed files with 4 additions and 14 deletions

@ -18,14 +18,14 @@
## TODO
- [ ] implement `Who()` which actually returns results
- [ ] make sure client can easily be garbage collected
- [ ] write more function-specific examples as the api becomes much more stable
- [ ] would be cool to track things like `SERVERNAME`, `VERSION`, `UMODES`, `CMODES`, etc. also see `Config.DisableCapTracking`. [e.g. here](https://github.com/lrstanley/Code/blob/master/core/triggers.py#L40-L67)
- [ ] client should support ping tracking (sending `PING`'s to the server)
- [ ] with this, we can potentially find lag. `Client.Lag()` would be useful
- [ ] users need to be exposed in state somehow (other than `GetChannels()`)
- [ ] `User.Age()`? (`FirstActive()`?) (time since first seen)
- [ ] add `Client.IsInChannel()`? and/or basic channel list
- [ ] add `Client.Topic(topic string)`
- [ ] `MODE` tracking on a per-channel basis
- [ ] `Client.AddTmpCallback()` for one time use callbacks?

@ -448,16 +448,6 @@ func (c *Client) IsInChannel(channel string) bool {
return inChannel
}
// Who tells the client to update it's channel/user records. Does not update
// internal state if tracking is disabled.
func (c *Client) Who(target string) error {
if !IsValidNick(target) && !IsValidChannel(target) {
return &ErrInvalidTarget{Target: target}
}
return c.Send(&Event{Command: WHO, Params: []string{target, "%tcuhn,1"}})
}
// Join attempts to enter an IRC channel with an optional password.
func (c *Client) Join(channel, password string) error {
if !IsValidChannel(channel) {

@ -73,12 +73,12 @@ func handleJOIN(c *Client, e Event) {
if e.Source.Name == c.GetNick() {
// If it's us, don't just add our user to the list. Run a WHO which
// will tell us who exactly is in the channel.
c.Who(e.Params[0])
c.Send(&Event{Command: WHO, Params: []string{e.Params[0], "%tcuhn,1"}})
return
}
// Create the user in state. Only WHO the user, which is more efficient.
c.Who(e.Source.Name)
c.Send(&Event{Command: WHO, Params: []string{e.Source.Name, "%tcuhn,1"}})
}
// handlePART ensures that the state is clean of old user and channel entries.