diff options
| author | Hubert Hirtz <hubert@hirtzfr.eu> | 2020-08-25 23:16:54 +0200 |
|---|---|---|
| committer | Hubert Hirtz <hubert@hirtzfr.eu> | 2020-08-26 17:53:40 +0200 |
| commit | e91396fe94643b2745e6350210d3637d9770d5b4 (patch) | |
| tree | 23fdbd7a0eb9ae7d6409c0d0aed31f4512d51bc8 /irc/events.go | |
| parent | Allow /part with a reason (diff) | |
General refactor yay
- Centralize message formatting
- Make line formatting more flexible
- Provide more information in irc events
- Refactor command handling
- Add a /help command
- Make /me reply to last query if from home
- Enforce argument for /me
- Make BufferList and Editor public
- Batch processing of IRC events
Diffstat (limited to '')
| -rw-r--r-- | irc/events.go | 49 |
1 files changed, 21 insertions, 28 deletions
diff --git a/irc/events.go b/irc/events.go index cd26369..62622b4 100644 --- a/irc/events.go +++ b/irc/events.go @@ -16,13 +16,12 @@ type RegisteredEvent struct{} type SelfNickEvent struct { FormerNick string - NewNick string Time time.Time } type UserNickEvent struct { + User *Prefix FormerNick string - NewNick string Time time.Time } @@ -31,7 +30,7 @@ type SelfJoinEvent struct { } type UserJoinEvent struct { - Nick string + User *Prefix Channel string Time time.Time } @@ -41,38 +40,32 @@ type SelfPartEvent struct { } type UserPartEvent struct { - Nick string - Channels []string - Time time.Time -} - -type QueryMessageEvent struct { - Nick string - Target string - Command string - Content string + User *Prefix + Channel string Time time.Time } -type ChannelMessageEvent struct { - Nick string - Channel string - Command string - Content string - Time time.Time +type UserQuitEvent struct { + User *Prefix + Channels []string + Time time.Time } -type QueryTagEvent struct { - Nick string - Typing int - Time time.Time +type MessageEvent struct { + User *Prefix + Target string + TargetIsChannel bool + Command string + Content string + Time time.Time } -type ChannelTagEvent struct { - Nick string - Channel string - Typing int - Time time.Time +type TagEvent struct { + User *Prefix + Target string + TargetIsChannel bool + Typing int + Time time.Time } type HistoryEvent struct { |
