__dirname + '/src/views/userbox.js',\r
__dirname + '/src/views/channeltools.js',\r
__dirname + '/src/views/channelinfo.js',\r
- __dirname + '/src/views/texttheme.js'\r
-\r
++ __dirname + '/src/views/texttheme.js',\r
+ __dirname + '/src/applets/settings.js',\r
+ __dirname + '/src/applets/chanlist.js',\r
+ __dirname + '/src/applets/scripteditor.js',\r
+ __dirname + '/src/applets/startup.js'\r
];\r
\r
\r
// Trim any whitespace off the name
channel_name = channel_name.trim();
+ // If not a valid channel name, display a warning
+ if (!that.isChannelName(channel_name)) {
+ that.panels.server.addMsg('', styleText('client_models_network_channel_invalid_name', {'%T': translateText('client_models_network_channel_invalid_name'), '%C': channel_name}));
+ _kiwi.app.message.text(channel_name + ' ' + _kiwi.global.i18n.translate('client_models_network_channel_invalid_name').fetch(), {timeout: 5000});
+ return;
+ // Add channel_prefix in front of the first channel if missing
+ if (that.get('channel_prefix').indexOf(channel_name[0]) === -1) {
+ // Could be many prefixes but '#' is highly likely the required one
+ channel_name = '#' + channel_name;
}
// Check if we have the panel already. If not, create it
panel = this.panels.server;
}
- panel.addMsg('[' + (event.nick||'') + ']', event.msg, 'notice', {time: event.time});
+ panel.addMsg('[' + (event.nick||'') + ']', styleText('notice', {'%T': event.msg}), 'notice', {time: event.time});
- // Show this notice to the active panel if it didn't have a set target
- if (!event.from_server && panel === this.panels.server && _kiwi.app.panels().active !== this.panels.server)
+ // Show this notice to the active panel if it didn't have a set target, but only in an active channel or query window
+ active_panel = _kiwi.app.panels().active;
+
+ if (!event.from_server && panel === this.panels.server && active_panel !== this.panels.server) {
+ if (active_panel.isChannel() || active_panel.isQuery())
- active_panel.addMsg('[' + (event.nick||'') + ']', event.msg, 'notice', {time: event.time});
+ _kiwi.app.panels().active.addMsg('[' + (event.nick||'') + ']', styleText('notice', {'%T': event.msg}), 'notice', {time: event.time});
+ }
}
display_params.shift();
}
- if (event.trailing)
- display_params.push(event.trailing);
-
- this.panels.server.addMsg('', '[' + event.command + '] ' + display_params.join(', ', ''));
+ this.panels.server.addMsg('', styleText('unknown_command', {'%T': '[' + event.command + '] ' + display_params.join(', ', '')}));
}
}
'src/views/topicbar.js',
'src/views/userbox.js',
'src/views/channeltools.js',
- 'src/views/channelinfo.js'
- ],
- [
+ 'src/views/channelinfo.js',
- 'src/views/texttheme.js'
++ 'src/views/texttheme.js',
+ 'src/applets/settings.js',
+ 'src/applets/chanlist.js',
+ 'src/applets/scripteditor.js',
+ 'src/applets/startup.js'
]
]);
}