TheCodedProf | 309d618 | 2023-01-18 18:10:29 -0500 | [diff] [blame] | 1 | import { GuildChannel, AuditLogEvent, ChannelType, TextChannel, VoiceChannel, StageChannel } from 'discord.js'; |
| 2 | import type { GuildAuditLogsEntry } from 'discord.js'; |
| 3 | //@ts-expect-error |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 4 | import humanizeDuration from "humanize-duration"; |
PineaFan | e6ba788 | 2023-01-18 20:41:16 +0000 | [diff] [blame] | 5 | import type { NucleusClient } from "../utils/client.js"; |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 6 | import getEmojiByName from "../utils/getEmojiByName.js"; |
TheCodedProf | b493b8a | 2023-01-18 21:11:00 -0500 | [diff] [blame] | 7 | import c from "../utils/client.js"; |
PineaFan | 19dc9b8 | 2023-01-19 12:25:54 +0000 | [diff] [blame] | 8 | import { capitalize } from "../utils/generateKeyValueList.js"; |
| 9 | |
TheCodedProf | b493b8a | 2023-01-18 21:11:00 -0500 | [diff] [blame] | 10 | let entry = c.logger.entry; |
pineafan | 3276721 | 2022-03-14 21:27:39 +0000 | [diff] [blame] | 11 | |
TheCodedProf | 309d618 | 2023-01-18 18:10:29 -0500 | [diff] [blame] | 12 | const channelTypeEmoji: Record<number, string> = { |
| 13 | 0: "Text", // Text channel |
| 14 | 2: "Voice", // Voice channel |
| 15 | 5: "Announcement", // Announcement channel |
| 16 | 13: "Stage", // Stage channel |
| 17 | 15: "Forum", // Forum channel |
| 18 | 99: "Rules" // Rules channel |
| 19 | }; |
| 20 | |
| 21 | interface channelChanges { |
TheCodedProf | b493b8a | 2023-01-18 21:11:00 -0500 | [diff] [blame] | 22 | channelId: ReturnType<typeof entry>; |
| 23 | channel: ReturnType<typeof entry>; |
| 24 | edited: ReturnType<typeof entry>; |
| 25 | editedBy: ReturnType<typeof entry>; |
| 26 | type?: ReturnType<typeof entry>; |
| 27 | name?: ReturnType<typeof entry>; |
| 28 | position?: ReturnType<typeof entry>; |
| 29 | description?: ReturnType<typeof entry>; |
| 30 | nsfw?: ReturnType<typeof entry>; |
| 31 | slowmode?: ReturnType<typeof entry>; |
| 32 | topic?: ReturnType<typeof entry>; |
| 33 | bitrate?: ReturnType<typeof entry>; |
| 34 | userLimit?: ReturnType<typeof entry>; |
| 35 | rateLimitPerUser?: ReturnType<typeof entry>; |
| 36 | parent?: ReturnType<typeof entry>; |
| 37 | permissionOverwrites?: ReturnType<typeof entry>; |
| 38 | region?: ReturnType<typeof entry>; |
| 39 | maxUsers?: ReturnType<typeof entry>; |
TheCodedProf | 309d618 | 2023-01-18 18:10:29 -0500 | [diff] [blame] | 40 | } |
| 41 | |
| 42 | |
| 43 | |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 44 | export const event = "channelUpdate"; |
pineafan | 3276721 | 2022-03-14 21:27:39 +0000 | [diff] [blame] | 45 | |
PineaFan | e6ba788 | 2023-01-18 20:41:16 +0000 | [diff] [blame] | 46 | export async function callback(client: NucleusClient, oldChannel: GuildChannel, newChannel: GuildChannel) { |
| 47 | const config = await client.memory.readGuildInfo(newChannel.guild.id); |
TheCodedProf | b493b8a | 2023-01-18 21:11:00 -0500 | [diff] [blame] | 48 | const { getAuditLog, log, NucleusColors, renderDelta, renderUser, renderChannel } = client.logger; |
| 49 | entry = client.logger.entry; |
PineaFan | e6ba788 | 2023-01-18 20:41:16 +0000 | [diff] [blame] | 50 | if (newChannel.parent && newChannel.parent.id === config.tickets.category) return; |
pineafan | 3276721 | 2022-03-14 21:27:39 +0000 | [diff] [blame] | 51 | |
PineaFan | c4d6c3f | 2023-01-19 12:17:25 +0000 | [diff] [blame] | 52 | const auditLog: null | GuildAuditLogsEntry<AuditLogEvent.ChannelUpdate> = (await getAuditLog(newChannel.guild, AuditLogEvent.ChannelUpdate)) |
| 53 | .filter((entry: GuildAuditLogsEntry) => (entry.target as GuildChannel)!.id === newChannel.id)[0] as GuildAuditLogsEntry<AuditLogEvent.ChannelUpdate> | null; |
| 54 | if (!auditLog) return; |
TheCodedProf | 309d618 | 2023-01-18 18:10:29 -0500 | [diff] [blame] | 55 | if (auditLog.executor!.id === client.user!.id) return; |
pineafan | 3276721 | 2022-03-14 21:27:39 +0000 | [diff] [blame] | 56 | |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 57 | let emoji: string; |
| 58 | let readableType: string; |
| 59 | let displayName: string; |
TheCodedProf | 309d618 | 2023-01-18 18:10:29 -0500 | [diff] [blame] | 60 | const changes: channelChanges = { |
PineaFan | e6ba788 | 2023-01-18 20:41:16 +0000 | [diff] [blame] | 61 | channelId: entry(newChannel.id, `\`${newChannel.id}\``), |
| 62 | channel: entry(newChannel.id, renderChannel(newChannel)), |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 63 | edited: entry(new Date().getTime(), renderDelta(new Date().getTime())), |
TheCodedProf | 309d618 | 2023-01-18 18:10:29 -0500 | [diff] [blame] | 64 | editedBy: entry(auditLog.executor!.id, renderUser((await newChannel.guild.members.fetch(auditLog.executor!.id)).user)), |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 65 | }; |
PineaFan | e6ba788 | 2023-01-18 20:41:16 +0000 | [diff] [blame] | 66 | if (oldChannel.name !== newChannel.name) changes.name = entry([oldChannel.name, newChannel.name], `${oldChannel.name} -> ${newChannel.name}`); |
| 67 | if (oldChannel.position !== newChannel.position) |
TheCodedProf | 60a1f49 | 2023-01-18 16:59:20 -0500 | [diff] [blame] | 68 | changes.position = entry([oldChannel.position.toString(), newChannel.position.toString()], `${oldChannel.position} -> ${newChannel.position}`); |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 69 | |
PineaFan | e6ba788 | 2023-01-18 20:41:16 +0000 | [diff] [blame] | 70 | switch (newChannel.type) { |
TheCodedProf | 309d618 | 2023-01-18 18:10:29 -0500 | [diff] [blame] | 71 | case ChannelType.GuildText: { |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 72 | emoji = "CHANNEL.TEXT.EDIT"; |
| 73 | readableType = "Text"; |
| 74 | displayName = "Text Channel"; |
TheCodedProf | 309d618 | 2023-01-18 18:10:29 -0500 | [diff] [blame] | 75 | let oldTopic = (oldChannel as TextChannel).topic, |
| 76 | newTopic = (newChannel as TextChannel).topic; |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 77 | if (oldTopic) { |
| 78 | if (oldTopic.length > 256) |
Skyler Grey | 11236ba | 2022-08-08 21:13:33 +0100 | [diff] [blame] | 79 | oldTopic = `\`\`\`\n${oldTopic.replace("`", "'").substring(0, 253) + "..."}\n\`\`\``; |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 80 | else oldTopic = `\`\`\`\n${oldTopic.replace("`", "'")}\n\`\`\``; |
| 81 | } else { |
| 82 | oldTopic = "None"; |
| 83 | } |
| 84 | if (newTopic) { |
| 85 | if (newTopic.length > 256) |
Skyler Grey | 11236ba | 2022-08-08 21:13:33 +0100 | [diff] [blame] | 86 | newTopic = `\`\`\`\n${newTopic.replace("`", "'").substring(0, 253) + "..."}\n\`\`\``; |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 87 | else newTopic = `\`\`\`\n${newTopic.replace("`", "'")}\n\`\`\``; |
| 88 | } else { |
| 89 | newTopic = "None"; |
| 90 | } |
| 91 | const nsfw = ["", ""]; |
TheCodedProf | 309d618 | 2023-01-18 18:10:29 -0500 | [diff] [blame] | 92 | nsfw[0] = (oldChannel as TextChannel).nsfw ? `${getEmojiByName("CONTROL.TICK")} Yes` : `${getEmojiByName("CONTROL.CROSS")} No`; |
| 93 | nsfw[1] = (newChannel as TextChannel).nsfw ? `${getEmojiByName("CONTROL.TICK")} Yes` : `${getEmojiByName("CONTROL.CROSS")} No`; |
| 94 | if ((oldChannel as TextChannel).topic !== (newChannel as TextChannel).topic) |
| 95 | changes.description = entry([(oldChannel as TextChannel).topic ?? "", (newChannel as TextChannel).topic ?? ""], `\nBefore: ${oldTopic}\nAfter: ${newTopic}`); |
| 96 | if ((oldChannel as TextChannel).nsfw !== (newChannel as TextChannel).nsfw) changes.nsfw = entry([(oldChannel as TextChannel).nsfw ? "On" : "Off", (newChannel as TextChannel).nsfw ? "On" : "Off"], `${nsfw[0]} -> ${nsfw[1]}`); |
PineaFan | 638eb13 | 2023-01-19 10:41:22 +0000 | [diff] [blame] | 97 | if ((oldChannel as TextChannel).rateLimitPerUser !== (newChannel as TextChannel).rateLimitPerUser && (oldChannel as TextChannel).rateLimitPerUser !== 0) |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 98 | changes.rateLimitPerUser = entry( |
PineaFan | 638eb13 | 2023-01-19 10:41:22 +0000 | [diff] [blame] | 99 | [((oldChannel as TextChannel).rateLimitPerUser).toString(), ((newChannel as TextChannel).rateLimitPerUser).toString()], |
TheCodedProf | 309d618 | 2023-01-18 18:10:29 -0500 | [diff] [blame] | 100 | `${humanizeDuration((oldChannel as TextChannel).rateLimitPerUser * 1000)} -> ${humanizeDuration((newChannel as TextChannel).rateLimitPerUser * 1000)}` |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 101 | ); |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 102 | |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 103 | break; |
| 104 | } |
TheCodedProf | 309d618 | 2023-01-18 18:10:29 -0500 | [diff] [blame] | 105 | case ChannelType.GuildAnnouncement: { |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 106 | emoji = "CHANNEL.TEXT.EDIT"; |
TheCodedProf | 309d618 | 2023-01-18 18:10:29 -0500 | [diff] [blame] | 107 | readableType = "Announcement"; |
PineaFan | 638eb13 | 2023-01-19 10:41:22 +0000 | [diff] [blame] | 108 | displayName = "Announcement Channel"; |
TheCodedProf | 309d618 | 2023-01-18 18:10:29 -0500 | [diff] [blame] | 109 | let oldTopic = (oldChannel as TextChannel).topic, |
| 110 | newTopic = (newChannel as TextChannel).topic; |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 111 | if (oldTopic) { |
| 112 | if (oldTopic.length > 256) |
Skyler Grey | 11236ba | 2022-08-08 21:13:33 +0100 | [diff] [blame] | 113 | oldTopic = `\`\`\`\n${oldTopic.replace("`", "'").substring(0, 253) + "..."}\n\`\`\``; |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 114 | else oldTopic = `\`\`\`\n${oldTopic.replace("`", "'")}\n\`\`\``; |
| 115 | } else { |
| 116 | oldTopic = "None"; |
| 117 | } |
| 118 | if (newTopic) { |
| 119 | if (newTopic.length > 256) |
Skyler Grey | 11236ba | 2022-08-08 21:13:33 +0100 | [diff] [blame] | 120 | newTopic = `\`\`\`\n${newTopic.replace("`", "'").substring(0, 253) + "..."}\n\`\`\``; |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 121 | else newTopic = `\`\`\`\n${newTopic.replace("`", "'")}\n\`\`\``; |
| 122 | } else { |
| 123 | newTopic = "None"; |
| 124 | } |
TheCodedProf | 309d618 | 2023-01-18 18:10:29 -0500 | [diff] [blame] | 125 | if ((oldChannel as TextChannel).nsfw !== (newChannel as TextChannel).nsfw) |
| 126 | changes.nsfw = entry([(oldChannel as TextChannel).nsfw ? "On" : "Off", (newChannel as TextChannel).nsfw ? "On" : "Off"], `${(oldChannel as TextChannel).nsfw ? "On" : "Off"} -> ${(newChannel as TextChannel).nsfw ? "On" : "Off"}`); |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 127 | break; |
| 128 | } |
TheCodedProf | 309d618 | 2023-01-18 18:10:29 -0500 | [diff] [blame] | 129 | case ChannelType.GuildVoice: { |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 130 | emoji = "CHANNEL.VOICE.EDIT"; |
| 131 | readableType = "Voice"; |
| 132 | displayName = "Voice Channel"; |
TheCodedProf | 309d618 | 2023-01-18 18:10:29 -0500 | [diff] [blame] | 133 | if ((oldChannel as VoiceChannel).bitrate !== (newChannel as VoiceChannel).bitrate) |
| 134 | changes.bitrate = entry([(oldChannel as VoiceChannel).bitrate.toString(), (newChannel as VoiceChannel).bitrate.toString()], `${(oldChannel as VoiceChannel).bitrate} -> ${(newChannel as VoiceChannel).bitrate}`); |
| 135 | if ((oldChannel as VoiceChannel).userLimit !== (newChannel as VoiceChannel).userLimit) |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 136 | changes.maxUsers = entry( |
TheCodedProf | 309d618 | 2023-01-18 18:10:29 -0500 | [diff] [blame] | 137 | [(oldChannel as VoiceChannel).userLimit.toString(), (newChannel as VoiceChannel).userLimit.toString()], |
| 138 | `${(oldChannel as VoiceChannel).userLimit ? (oldChannel as VoiceChannel).userLimit : "Unlimited"} -> ${(newChannel as VoiceChannel).userLimit}` |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 139 | ); |
TheCodedProf | 309d618 | 2023-01-18 18:10:29 -0500 | [diff] [blame] | 140 | if ((oldChannel as VoiceChannel).rtcRegion !== (newChannel as VoiceChannel).rtcRegion) |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 141 | changes.region = entry( |
PineaFan | 19dc9b8 | 2023-01-19 12:25:54 +0000 | [diff] [blame] | 142 | [(oldChannel as VoiceChannel).rtcRegion ?? "automatic", (newChannel as VoiceChannel).rtcRegion ?? "automatic"], |
| 143 | `${capitalize((oldChannel as VoiceChannel).rtcRegion?.toUpperCase() ?? "automatic")} -> ${capitalize((newChannel as VoiceChannel).rtcRegion?.toUpperCase() ?? "automatic")}` |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 144 | ); |
| 145 | break; |
| 146 | } |
TheCodedProf | 309d618 | 2023-01-18 18:10:29 -0500 | [diff] [blame] | 147 | case ChannelType.GuildStageVoice: { |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 148 | emoji = "CHANNEL.VOICE.EDIT"; |
| 149 | readableType = "Stage"; |
| 150 | displayName = "Stage Channel"; |
TheCodedProf | 309d618 | 2023-01-18 18:10:29 -0500 | [diff] [blame] | 151 | let oldTopic = (oldChannel as StageChannel).topic, |
| 152 | newTopic = (newChannel as StageChannel).topic; |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 153 | if (oldTopic) { |
| 154 | if (oldTopic.length > 256) |
Skyler Grey | 11236ba | 2022-08-08 21:13:33 +0100 | [diff] [blame] | 155 | oldTopic = `\`\`\`\n${oldTopic.replace("`", "'").substring(0, 253) + "..."}\n\`\`\``; |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 156 | else oldTopic = `\`\`\`\n${oldTopic.replace("`", "'")}\n\`\`\``; |
| 157 | } else { |
| 158 | oldTopic = "None"; |
| 159 | } |
| 160 | if (newTopic) { |
| 161 | if (newTopic.length > 256) |
Skyler Grey | 11236ba | 2022-08-08 21:13:33 +0100 | [diff] [blame] | 162 | newTopic = `\`\`\`\n${newTopic.replace("`", "'").substring(0, 253) + "..."}\n\`\`\``; |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 163 | else newTopic = `\`\`\`\n${newTopic.replace("`", "'")}\n\`\`\``; |
| 164 | } else { |
| 165 | newTopic = "None"; |
| 166 | } |
TheCodedProf | 309d618 | 2023-01-18 18:10:29 -0500 | [diff] [blame] | 167 | if ((oldChannel as StageChannel).bitrate !== (newChannel as StageChannel).bitrate) |
| 168 | changes.bitrate = entry([(oldChannel as StageChannel).bitrate.toString(), (newChannel as StageChannel).bitrate.toString()], `${(oldChannel as StageChannel).bitrate} -> ${(newChannel as StageChannel).bitrate}`); |
| 169 | if ((oldChannel as StageChannel).userLimit !== (newChannel as StageChannel).userLimit) |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 170 | changes.maxUsers = entry( |
TheCodedProf | 309d618 | 2023-01-18 18:10:29 -0500 | [diff] [blame] | 171 | [(oldChannel as StageChannel).userLimit.toString(), (newChannel as StageChannel).userLimit.toString()], |
| 172 | `${(oldChannel as StageChannel).userLimit ? (oldChannel as StageChannel).userLimit : "Unlimited"} -> ${(newChannel as StageChannel).userLimit}` |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 173 | ); |
TheCodedProf | 309d618 | 2023-01-18 18:10:29 -0500 | [diff] [blame] | 174 | if ((oldChannel as StageChannel).rtcRegion !== (newChannel as StageChannel).rtcRegion) |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 175 | changes.region = entry( |
TheCodedProf | 309d618 | 2023-01-18 18:10:29 -0500 | [diff] [blame] | 176 | [(oldChannel as StageChannel).rtcRegion ?? "Automatic", (newChannel as StageChannel).rtcRegion ?? "Automatic"], |
PineaFan | 5d98a4b | 2023-01-19 16:15:47 +0000 | [diff] [blame^] | 177 | `${capitalize((oldChannel as StageChannel).rtcRegion?.toUpperCase() ?? "automatic")} -> ${capitalize((newChannel as StageChannel).rtcRegion?.toUpperCase() ?? "automatic")}` |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 178 | ); |
| 179 | break; |
| 180 | } |
TheCodedProf | 309d618 | 2023-01-18 18:10:29 -0500 | [diff] [blame] | 181 | case ChannelType.GuildCategory: { |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 182 | emoji = "CHANNEL.CATEGORY.EDIT"; |
| 183 | readableType = "Category"; |
| 184 | displayName = "Category"; |
| 185 | break; |
| 186 | } |
| 187 | default: { |
| 188 | emoji = "CHANNEL.TEXT.EDIT"; |
| 189 | readableType = "Channel"; |
| 190 | displayName = "Channel"; |
| 191 | } |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 192 | } |
PineaFan | 638eb13 | 2023-01-19 10:41:22 +0000 | [diff] [blame] | 193 | const ocType = channelTypeEmoji[oldChannel.type], |
TheCodedProf | 309d618 | 2023-01-18 18:10:29 -0500 | [diff] [blame] | 194 | ncType = channelTypeEmoji[newChannel.type]; |
PineaFan | e6ba788 | 2023-01-18 20:41:16 +0000 | [diff] [blame] | 195 | if (oldChannel.type !== newChannel.type) |
TheCodedProf | 309d618 | 2023-01-18 18:10:29 -0500 | [diff] [blame] | 196 | changes.type = entry([ocType!, ncType!], `${ocType!} -> ${readableType}`); |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 197 | if (!(Object.values(changes).length - 4)) return; |
| 198 | const data = { |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 199 | meta: { |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 200 | type: "channelUpdate", |
| 201 | displayName: displayName + " Edited", |
| 202 | calculateType: "channelUpdate", |
| 203 | color: NucleusColors.yellow, |
| 204 | emoji: emoji, |
TheCodedProf | 309d618 | 2023-01-18 18:10:29 -0500 | [diff] [blame] | 205 | timestamp: auditLog.createdTimestamp |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 206 | }, |
| 207 | list: changes, |
| 208 | hidden: { |
PineaFan | e6ba788 | 2023-01-18 20:41:16 +0000 | [diff] [blame] | 209 | guild: newChannel.guild.id |
pineafan | e625d78 | 2022-05-09 18:04:32 +0100 | [diff] [blame] | 210 | } |
pineafan | 63fc5e2 | 2022-08-04 22:04:10 +0100 | [diff] [blame] | 211 | }; |
| 212 | log(data); |
Skyler Grey | 75ea917 | 2022-08-06 10:22:23 +0100 | [diff] [blame] | 213 | } |