'channel';
this.emit(namespace + ' ' + command.params[0] + ' notice', {
- from_server: command.prefix ? true : false,
- nick: command.nick || command.prefix || undefined,
+ from_server: command.prefix === this.irc_connection.server_name ? true : false,
+ nick: command.nick || undefined,
ident: command.ident,
hostname: command.hostname,
target: command.params[0],
var handlers = {
RPL_WELCOME: function (command) {
var nick = command.params[0];
+
+ // Get the server name so we know which messages are by the server in future
+ this.irc_connection.server_name = command.prefix;
+
this.cap_negotiation = false;
this.emit('server ' + this.irc_connection.irc_host.hostname + ' connect', {
nick: nick