mirror of
https://github.com/jeremyd/ergo.git
synced 2026-07-02 06:48:55 -07:00
Make channel and privmsg replies more useful for logged-out users.
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
|
||||
type Command interface {
|
||||
Client() *Client
|
||||
User() *User
|
||||
Source() Identifier
|
||||
HandleServer(*Server)
|
||||
}
|
||||
@@ -44,6 +45,13 @@ func (command *BaseCommand) Client() *Client {
|
||||
return command.client
|
||||
}
|
||||
|
||||
func (command *BaseCommand) User() *User {
|
||||
if command.Client() == nil {
|
||||
return nil
|
||||
}
|
||||
return command.User()
|
||||
}
|
||||
|
||||
func (command *BaseCommand) SetClient(c *Client) {
|
||||
command.client = c
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user