Skip to content

Client caused panic - DEOP user from channel #2345

@k4ct0

Description

@k4ct0

Version

https://github.com/squidowl/halloy/releases/tag/2026.3

Users

  1. myUser (Channel founder of #the_corner)
  2. LeeroyJenkins (Just a normal user)

Action

User LeeroyJenkins is not part of the channel and myUser attempted to remove him from OP at that channel

/cs op #the_corner myUser
15:50 <ChanServ> Successfully granted operator privileges
/cs op #the_corner myUser
15:51 <ChanServ> Successfully granted operator privileges
...
/cs op #the_corner LeeroyJenkins
15:56 <ChanServ> Successfully granted operator privileges
/cs op #the_corner myUser
15:56 <ChanServ> Successfully granted operator privileges
/cs deop #the_corner LeeroyJenkins
15:56  connection to server lost (Connection closed)
15:57  connection to server restored

Result

Server log from ./ergo run

2026-03-01T14:50:29.954Z : info  : services   : Client myUser op'd [myUser] in channel #the_corner
2026-03-01T14:51:05.256Z : info  : services   : Client myUser op'd [myUser] in channel #the_corner
2026-03-01T14:56:26.856Z : info  : services   : Client myUser op'd [LeeroyJenkins] in channel #the_corner
2026-03-01T14:56:35.401Z : info  : services   : Client myUser op'd [myUser] in channel #the_corner
2026-03-01T14:56:58.344Z : error : internal   : Client caused panic: runtime error: invalid memory address or nil pointer dereference
goroutine 116 [running]:
runtime/debug.Stack()
	runtime/debug/stack.go:26 +0x5e
github.com/ergochat/ergo/irc.(*Client).run.func1()
	github.com/ergochat/ergo/irc/client.go:672 +0x58
panic({0x9ad700?, 0xf082b0?})
	runtime/panic.go:783 +0x132
github.com/ergochat/ergo/irc.(*Channel).ClientStatus(0xc0004289e0?, 0xc00024066f?)
	github.com/ergochat/ergo/irc/channel.go:554 +0xd3
github.com/ergochat/ergo/irc.csDeopHandler(0xf167a0, 0xc000428908, 0xc000004c08, {0xc0001c37b0?, 0x4181d4?}, {0xc00010b610, 0x2, 0x240?}, 0xc0001dc400)
	github.com/ergochat/ergo/irc/chanserv.go:384 +0xf5
github.com/ergochat/ergo/irc.serviceRunCommand(0xf167a0, 0xc000428908, 0xc000004c08, 0xc000236240, {0xc00024065e, 0x4}, {0xc00010b610, 0x2, 0x3}, 0xc0001dc400)
	github.com/ergochat/ergo/irc/services.go:229 +0x3b6
github.com/ergochat/ergo/irc.serviceCmdHandler(0xc000428908, 0xc000004c08, {{0x0, 0x0}, {0xc00024065b, 0x2}, {0xc00010b600, 0x3, 0x4}, 0x0, ...}, ...)
	github.com/ergochat/ergo/irc/services.go:143 +0x436
github.com/ergochat/ergo/irc.(*Command).Run.func1(0xc0001dc400, 0xc000004c08, 0x40b4d5?, 0xc000428908, {{0x0, 0x0}, {0xc00024065b, 0x2}, {0xc00010b600, 0x3, ...}, ...}, ...)
	github.com/ergochat/ergo/irc/commands.go:65 +0x25f
github.com/ergochat/ergo/irc.(*Command).Run(0xc0001c3c68, 0xc000428908, 0xc000004c08, 0xc0001c6a88, {{0x0, 0x0}, {0xc00024065b, 0x2}, {0xc00010b600, 0x3, ...}, ...})
	github.com/ergochat/ergo/irc/commands.go:66 +0x158
github.com/ergochat/ergo/irc.(*Client).run(0xc000004c08, 0xc0001c6a88)
	github.com/ergochat/ergo/irc/client.go:775 +0x965
github.com/ergochat/ergo/irc.(*Server).RunClient(0xc000428908, {0xb4e8e0, 0xc0000782a0})
	github.com/ergochat/ergo/irc/client.go:428 +0xc65
created by github.com/ergochat/ergo/irc.(*NetListener).serve in goroutine 23
	github.com/ergochat/ergo/irc/listeners.go:103 +0x352

2026-03-01T14:56:58.345Z : error : internal   : Disconnecting client and attempting to recover
2026-03-01T14:56:58.345Z : info  : connect-ip : s00003 : Disconnecting session of myUser from XXX.XXX.XXX.XXX
2026-03-01T14:56:58.345Z : info  : quit       : myUser is no longer on the server
2026-03-01T14:57:08.360Z : info  : connect-ip : s00004 : Client connecting: real IP XXX.XXX.XXX.XXX, proxied IP <nil>
2026-03-01T14:57:08.518Z : info  : accounts   : s00004 : * : logged into account : myUser


---- Other test ---- using only /CS DEOP <CHANNEL> LeeroyJenkins
2026-03-01T15:02:38.043Z : error : internal   : Client caused panic: runtime error: invalid memory address or nil pointer dereference
goroutine 197 [running]:
runtime/debug.Stack()
	runtime/debug/stack.go:26 +0x5e
github.com/ergochat/ergo/irc.(*Client).run.func1()
	github.com/ergochat/ergo/irc/client.go:672 +0x58
panic({0x9ad700?, 0xf082b0?})
	runtime/panic.go:783 +0x132
github.com/ergochat/ergo/irc.(*Channel).ClientStatus(0xc0004289e0?, 0xc00024012f?)
	github.com/ergochat/ergo/irc/channel.go:554 +0xd3
github.com/ergochat/ergo/irc.csDeopHandler(0xf167a0, 0xc000428908, 0xc000004c08, {0xc0001c37b0?, 0x4181d4?}, {0xc00010b090, 0x2, 0x240?}, 0xc00022a100)
	github.com/ergochat/ergo/irc/chanserv.go:384 +0xf5
github.com/ergochat/ergo/irc.serviceRunCommand(0xf167a0, 0xc000428908, 0xc000004c08, 0xc000236240, {0xc00024011e, 0x4}, {0xc00010b090, 0x2, 0x3}, 0xc00022a100)
	github.com/ergochat/ergo/irc/services.go:229 +0x3b6
github.com/ergochat/ergo/irc.serviceCmdHandler(0xc000428908, 0xc000004c08, {{0x0, 0x0}, {0xc00024011b, 0x2}, {0xc00010b080, 0x3, 0x4}, 0x0, ...}, ...)
	github.com/ergochat/ergo/irc/services.go:143 +0x436
github.com/ergochat/ergo/irc.(*Command).Run.func1(0xc00022a100, 0xc000004c08, 0x40b4d5?, 0xc000428908, {{0x0, 0x0}, {0xc00024011b, 0x2}, {0xc00010b080, 0x3, ...}, ...}, ...)
	github.com/ergochat/ergo/irc/commands.go:65 +0x25f
github.com/ergochat/ergo/irc.(*Command).Run(0xc0001c3c68, 0xc000428908, 0xc000004c08, 0xc0001c7c08, {{0x0, 0x0}, {0xc00024011b, 0x2}, {0xc00010b080, 0x3, ...}, ...})
	github.com/ergochat/ergo/irc/commands.go:66 +0x158
github.com/ergochat/ergo/irc.(*Client).run(0xc000004c08, 0xc0001c7c08)
	github.com/ergochat/ergo/irc/client.go:775 +0x965
github.com/ergochat/ergo/irc.(*Server).RunClient(0xc000428908, {0xb4e8e0, 0xc0004aa300})
	github.com/ergochat/ergo/irc/client.go:428 +0xc65
created by github.com/ergochat/ergo/irc.(*NetListener).serve in goroutine 23
	github.com/ergochat/ergo/irc/listeners.go:103 +0x352

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions