mirror of
https://github.com/gissleh/irc.git
synced 2026-10-15 16:42:53 +00:00
Changed client status shorthand to avoid needless target lookp
This commit is contained in:
@@ -446,12 +446,7 @@ func (client *Client) Target(kind string, name string) Target {
|
|||||||
|
|
||||||
// Status gets the client's status target.
|
// Status gets the client's status target.
|
||||||
func (client *Client) Status() *Status {
|
func (client *Client) Status() *Status {
|
||||||
target := client.Target("status", "Status")
|
return client.status
|
||||||
if target == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
return target.(*Status)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Channel is a shorthand for getting a channel target and type asserting it.
|
// Channel is a shorthand for getting a channel target and type asserting it.
|
||||||
|
|||||||
Reference in New Issue
Block a user