-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Badge request: IRC channel name + user count #627
Comments
This is an interesting idea, but difficult. In order to do this reasonably you'd need to find an existing IRC indexer with an API to expose this information. And as far as I'm aware, none exist. There are IRC indexers, but, as far as I'm aware, none with an API. Might be interesting to approach them and ask if they'd be interested in exposing one... |
That's a really nice idea, and I'd love to see it done. If we want to generalize to any IRC network, I'm not sure we can use HTTP. Something as simple as this gives us the answer, if we parse it: var net = require('net');
function getUsers(host, port, channel, cb) {
var client = net.createConnection({host:host, port:port},
function() {
client.write('NICK shields\nUSER shields.io 8 * : shields\nJOIN ' + channel + '\n');
});
var data;
client.on('data', function(buffer) {
data += '' + buffer;
// Parse the data.
client.end();
});
client.on('end', function() { cb(data); });
}
getUsers('irc.freenode.net', 6667, '#ubuntu', function(data) {console.log(data)}); It is way too slow, will cause nick collisions, doesn't escape the channel name, and the IRC servers wouldn't be able to handle the load. We would want to use a much more lightweight way to access that data. Ideally, we'd want to talk to Freenode about it, but their website does not present a way to contact them. I left an unmoderated comment on http://blog.freenode.net/2016/02/recent-events-and-future-changes, we'll see how things go. |
You don't have to join the room to get the user count. The LIST command returns a list of all channels with user count for each one. You could have a single server do a LIST command on freenode every 5 minutes or so and then cache the results in a table. |
I tried, but I didn't get any user. Do you have a minimal script similar to the one I wrote that produces that result? |
I want to reiterate that printing the count of users in the channel would be likely to increase engagement. |
I like the badge of @olstenlarck. Maye also |
@koppor agree :) |
It looks like we would need some help from Freenode on this. @koppor would you like to reach out to them? |
@paulmelnikow why? @espadrine gives good example #627 (comment) which i believe will work. |
I talked in
"basically: every piece of information that users could not gather from outside of the channel should not be published without channel owner consent" |
@olstenlarck I think, the above JavaScript statements do a) join a channel (which may be disallowed by channel operators as this is an automated operation) b) are only OK when executed on the shield servers in a cronjob and not on every request by a user. |
@paulmelnikow There is http://irc.netsplit.de/ with some user data; maybe, that can be used? (Even though, not all channels seem to be available here) Example: http://irc.netsplit.de/channels/details.php?room=%23eclipse&net=freenode |
Is it possible that Freenode could add a separate API for this, maybe even an HTTP API? |
At this stage i would be glad to see even only a clickable URI link like |
I'd like to see info from logbot.info eg: https://freenode.logbot.info/twisted-dev/stats |
I'm not sure exactly what shields is, but this seems like a nice place to find out if anyone has already thought of / implemented this idea:
I'd like a shield that displays the IRC channel of my project, and tells the number of people that are currently in the channel. I think that would make it more likely for people to want to join and chat if they see that the room is not empty.
The text was updated successfully, but these errors were encountered: