feat: implement Tier 3 utility IRC commands (USERHOST, VERSION, ADMIN, INFO, TIME, KILL, WALLOPS) (closes #87) #96

Open
clawbot wants to merge 13 commits from feature/87-tier3-utility-commands into next
2 changed files with 8 additions and 6 deletions
Showing only changes of commit edbbdc9ca5 - Show all commits
+1 -1
View File
@@ -161,7 +161,7 @@ func (c *Conn) Disconnect(reason string) {
func (c *Conn) notifyKilledAndClose(
nick, host, reason string,
) {
defer c.conn.Close() //nolint:errcheck,gosec
defer c.conn.Close() //nolint:errcheck
c.sendWithin(
killWriteWindow,
+7 -5
View File
@@ -1070,20 +1070,22 @@ func isKnownUserModeChar(modeChar rune) bool {
// defence-in-depth only.
func collapseUserModeOps(
ops []userModeOp,
) (wallops, oper *bool, err error) {
) (*bool, *bool, error) {
unknownFlag := &IRCError{
Code: irc.ErrUmodeUnknownFlag,
Params: nil,
Message: "Unknown MODE flag",
}
for _, op := range ops {
switch op.char {
var wallops, oper *bool
for _, modeOp := range ops {
switch modeOp.char {
case 'w':
val := op.adding
val := modeOp.adding
wallops = &val
case 'o':
if op.adding {
if modeOp.adding {
return nil, nil, unknownFlag
}