Skip to content

Commit 5b6fb09

Browse files
committed
Only log success message on success
1 parent b2737af commit 5b6fb09

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/commands/IrcPlumbCommand.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,18 @@ export class IrcPlumbCommand implements ICommand {
6666
await this.ircBridge.plumbChannelToRoom(channel, resolvedRoomId);
6767
} catch (ex) {
6868
LogService.warn("IrcPlumbCommand", ex);
69-
return await logMessage(LogLevel.WARN, "IrcPlumbCommand", `Could not plumb channel to room ${resolvedRoomId}`);
69+
return logMessage(LogLevel.WARN, "IrcPlumbCommand", `Could not plumb channel to room ${resolvedRoomId}`);
7070
}
7171

7272
try {
7373
// The bridge needs the ability to kick KLINED users.
7474
await client.setUserPowerLevel(this.ircBridge.botUserId, resolvedRoomId, KickPowerLevel);
7575
} catch (ex) {
7676
LogService.warn("IrcPlumbCommand", ex);
77-
return await logMessage(LogLevel.WARN, "IrcPlumbCommand", `Could not plumb channel to room ${resolvedRoomId}: could not set AS power level`);
77+
return logMessage(LogLevel.WARN, "IrcPlumbCommand", `Could not plumb channel to room ${resolvedRoomId}: could not set AS power level`);
7878
}
79+
80+
logMessage(LogLevel.INFO,"IrcPlumbCommand", `Plumbed channel ${channel} to ${resolvedRoomId}`);
7981
}
8082

8183
public async run(conference: Conference, client: MatrixClient, roomId: string, event: any, args: string[]) {
@@ -106,7 +108,5 @@ export class IrcPlumbCommand implements ICommand {
106108
}
107109

108110
await this.plumbOne(client, resolvedRoomId, channel);
109-
110-
return client.sendNotice(roomId, "Plumbed channel");
111111
}
112112
}

0 commit comments

Comments
 (0)