refactor: trim irc helper exports · openclaw/openclaw@dc1d685
steipete
·
2026-05-01
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -11,7 +11,7 @@ import {
|
11 | 11 | const IRC_ERROR_CODES = new Set(["432", "464", "465"]); |
12 | 12 | const IRC_NICK_COLLISION_CODES = new Set(["433", "436"]); |
13 | 13 | |
14 | | -export type IrcPrivmsgEvent = { |
| 14 | +type IrcPrivmsgEvent = { |
15 | 15 | senderNick: string; |
16 | 16 | senderUser?: string; |
17 | 17 | senderHost?: string; |
@@ -39,7 +39,7 @@ export type IrcClientOptions = {
|
39 | 39 | onLine?: (line: string) => void; |
40 | 40 | }; |
41 | 41 | |
42 | | -export type IrcNickServOptions = { |
| 42 | +type IrcNickServOptions = { |
43 | 43 | enabled?: boolean; |
44 | 44 | service?: string; |
45 | 45 | password?: string; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -42,7 +42,7 @@ const IrcNickServSchema = z
|
42 | 42 | } |
43 | 43 | }); |
44 | 44 | |
45 | | -export const IrcAccountSchemaBase = z |
| 45 | +const IrcAccountSchemaBase = z |
46 | 46 | .object({ |
47 | 47 | name: z.string().optional(), |
48 | 48 | enabled: z.boolean().optional(), |
@@ -68,7 +68,7 @@ export const IrcAccountSchemaBase = z
|
68 | 68 | }) |
69 | 69 | .strict(); |
70 | 70 | |
71 | | -export const IrcAccountSchema = IrcAccountSchemaBase.superRefine((value, ctx) => { |
| 71 | +const IrcAccountSchema = IrcAccountSchemaBase.superRefine((value, ctx) => { |
72 | 72 | requireOpenAllowFrom({ |
73 | 73 | policy: value.dmPolicy, |
74 | 74 | allowFrom: value.allowFrom, |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -10,7 +10,7 @@ import type { RuntimeEnv } from "./runtime-api.js";
|
10 | 10 | import { getIrcRuntime } from "./runtime.js"; |
11 | 11 | import type { CoreConfig, IrcInboundMessage } from "./types.js"; |
12 | 12 | |
13 | | -export type IrcMonitorOptions = { |
| 13 | +type IrcMonitorOptions = { |
14 | 14 | accountId?: string; |
15 | 15 | config?: CoreConfig; |
16 | 16 | runtime?: RuntimeEnv; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -3,14 +3,14 @@ import { normalizeIrcAllowlist, resolveIrcAllowlistMatch } from "./normalize.js"
|
3 | 3 | import type { IrcAccountConfig, IrcChannelConfig } from "./types.js"; |
4 | 4 | import type { IrcInboundMessage } from "./types.js"; |
5 | 5 | |
6 | | -export type IrcGroupMatch = { |
| 6 | +type IrcGroupMatch = { |
7 | 7 | allowed: boolean; |
8 | 8 | groupConfig?: IrcChannelConfig; |
9 | 9 | wildcardConfig?: IrcChannelConfig; |
10 | 10 | hasConfiguredGroups: boolean; |
11 | 11 | }; |
12 | 12 | |
13 | | -export type IrcGroupAccessGate = { |
| 13 | +type IrcGroupAccessGate = { |
14 | 14 | allowed: boolean; |
15 | 15 | reason: string; |
16 | 16 | }; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -3,15 +3,15 @@ import { hasIrcControlChars, stripIrcControlChars } from "./control-chars.js";
|
3 | 3 | |
4 | 4 | const IRC_TARGET_PATTERN = /^[^\s:]+$/u; |
5 | 5 | |
6 | | -export type ParsedIrcLine = { |
| 6 | +type ParsedIrcLine = { |
7 | 7 | raw: string; |
8 | 8 | prefix?: string; |
9 | 9 | command: string; |
10 | 10 | params: string[]; |
11 | 11 | trailing?: string; |
12 | 12 | }; |
13 | 13 | |
14 | | -export type ParsedIrcPrefix = { |
| 14 | +type ParsedIrcPrefix = { |
15 | 15 | nick?: string; |
16 | 16 | user?: string; |
17 | 17 | host?: string; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -18,7 +18,7 @@ type SendIrcOptions = {
|
18 | 18 | client?: IrcClient; |
19 | 19 | }; |
20 | 20 | |
21 | | -export type SendIrcResult = { |
| 21 | +type SendIrcResult = { |
22 | 22 | messageId: string; |
23 | 23 | target: string; |
24 | 24 | }; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -66,7 +66,7 @@ export type IrcAccountConfig = {
|
66 | 66 | mediaMaxMb?: number; |
67 | 67 | }; |
68 | 68 | |
69 | | -export type IrcConfig = IrcAccountConfig & { |
| 69 | +type IrcConfig = IrcAccountConfig & { |
70 | 70 | accounts?: Record<string, IrcAccountConfig>; |
71 | 71 | defaultAccount?: string; |
72 | 72 | }; |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。