Skip to content

Commit 0786d43

Browse files
authored
Merge pull request #176 from matrix-org/hs/fix-confusing-irc-message
Fix confusing irc message
2 parents b2737af + 022033a commit 0786d43

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/commands/IrcPlumbCommand.ts

Lines changed: 5 additions & 5 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[]) {
@@ -105,8 +107,6 @@ export class IrcPlumbCommand implements ICommand {
105107
return client.sendNotice(roomId, "Could not join that room, is the bot invited?");
106108
}
107109

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

0 commit comments

Comments
 (0)