totallymike / ircnode

Extensible IRC bot written with node.js
https://github.com/totallymike/ircnode/wiki
MIT License
4 stars 2 forks source link

Authorization using hostnames #45

Closed sigv closed 12 years ago

sigv commented 12 years ago

This is a proposed solution to #40.

Entries are added to the hosts file (config_path/hosts.json) with syntax of "host": "auth_level". The bot first looks for matches inside host list and if there is a match for the host, it will not look at users.json file.

{
  "unaffiliated/thatvalterguy": "owner",
  "pdpc/supporter/active/someone": "admin",
  "example.com": "admin",
  "255.255.255.256": "admin"
}
totallymike commented 12 years ago

Merging. I think eventually we should merge hosts and users, but this is a workable solution for the moment, and it's good.