\r
members.bind("remove", function (member, members, options) {\r
var show_message = _kiwi.global.settings.get('show_joins_parts');\r
-\r
-\r
var msg = (options.message) ? '(' + options.message + ')' : '';\r
\r
if (options.type === 'quit' && show_message) {\r
- \r
this.addMsg(' ', '== ' + member.displayNick(true) + ' has quit ' + msg, 'action quit');\r
-\r
} else if(options.type === 'kick') {\r
- \r
- if (!options.kicked) {\r
- \r
- if (show_message || options.kicker) { \r
- this.addMsg(' ', '== ' + member.displayNick(true) + ' was kicked by ' + options.by + ' ' + msg, 'action kick');\r
- \r
+ if (!options.current_user_kicked) {\r
+ //If user kicked someone, show the message regardless of settings.\r
+ if (show_message || options.current_user_initiated) { \r
+ this.addMsg(' ', '== ' + member.displayNick(true) + ' was kicked by ' + options.by + ' ' + msg, 'action kick');\r
+ }\r
+ } else {\r
+ this.addMsg(' ', '== You have been kicked by ' + options.by + ' '+msg, 'action kick');\r
}\r
- \r
- } else {\r
- this.addMsg(' ', '=== You have been kicked by ' + options.by + ' '+msg, 'action kick');\r
- }\r
- \r
} else if (show_message) {\r
this.addMsg(' ', '== ' + member.displayNick(true) + ' has left ' + msg, 'action part');\r
}\r
part_options.type = 'kick';
part_options.by = event.nick;
part_options.message = event.message || '';
- part_options.kicked = (event.kicked == this.get('nick'))
- part_options.kicker = (event.nick == this.get('nick'))
+ part_options.current_user_kicked = (event.kicked == this.get('nick'))
+ part_options.current_user_initiated = (event.nick == this.get('nick'))
channel = this.panels.getByName(event.channel);
if (!channel) return;
members.remove(user, part_options);
- if (part_options.kicked) {
+ if (part_options.current_user_kicked) {
members.reset([]);
}
}