Skip to content

Commit

Permalink
Track the type of ircd to networkinfo
Browse files Browse the repository at this point in the history
  • Loading branch information
prawnsalad committed Feb 9, 2019
1 parent eb3e150 commit bea9787
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/commands/handlers/registration.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,18 @@ var handlers = {
},


RPL_YOURHOST: function(command) {
// Your host is ircd.network.org, running version InspIRCd-2.0
let param = command.params[1] || '';
let m = param.match(/running version (.*)$/);
if (!m) {
this.network.ircd = '';
} else {
this.network.ircd = m[1];
}
},


RPL_ISUPPORT: function(command) {
var options = command.params;
var i;
Expand Down
3 changes: 3 additions & 0 deletions src/networkinfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ function NetworkInfo() {
// Name of the connected server
this.server = '';

// The reported IRCd type
this.ircd = '';

// Network provided options
this.options = {
PREFIX: [
Expand Down

0 comments on commit bea9787

Please sign in to comment.