forked from External/ergo
Make channel and privmsg replies more useful for logged-out users.
This commit is contained in:
parent
fd814bf969
commit
f24bb5ee7d
3 changed files with 19 additions and 13 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue