Skip to content

Commit c97490f

Browse files
committed
Add statusmsg groups to 'irc error' events
1 parent c222b90 commit c97490f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/commands/handlers/generics.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,16 @@ module.exports = function AddCommandHandlers(command_controller) {
134134
}
135135
}
136136

137+
if (event_obj.channel) {
138+
// Extract the group from any errors targetted towards channels with a statusmsg prefix
139+
// Eg. @#channel
140+
var parsed = this.network.extractTargetGroup(event_obj.channel);
141+
if (parsed) {
142+
event_obj.channel = parsed.target;
143+
event_obj.target_group = parsed.target_group;
144+
}
145+
}
146+
137147
this.emit(generic.event, event_obj);
138148
});
139149
});

0 commit comments

Comments
 (0)