

Show HN: Hnguardian, a bot for the new #hackernews channel on Freenode - bramgg
https://github.com/bramgg/hnguardian

======
nerdy
It's exciting to have an IRC channel with like-minded people, I wasn't aware
of #startups either. The ability to link a HN username to an IRC handle is
also nice, however the bot is quite verbose in the channel.

Couldn't commands like !username be issued in private messages instead of the
public channel? Worse than the bot responding in public, it has two lines when
a nick doesn't have a username linked to it. In one example, someone was
looking for user information and was drowning out conversation in the channel
with bot messages (probably unintentionally), making 4 or 5 queries, most
without a linked username.

Another suggestion: stop the welcome /msg from hnguardian for people who
either don't have a HN handle or don't want to link it. I realize it may be
somewhat counter to goals of HN (since it would likely prefer people to both
have a handle _and_ link it) but for those who'd prefer otherwise it would be
a better experience. This is probably only possible with registered IRC
handles, but would be a step in the right direction.

~~~
bramgg
I agree with all your points. I made this bot quite quickly when the channel
was first made hoping it would keep things more tightly connected with HN, so
I didn't have time to think about everything. When I get home I'll try to make
those changes, or if anyone has some time it IS on GitHub.

EDIT: I've tried to fix/upgrade everything. Now all commands are strictly PM
based, except !show which works with both (obviously). Linking accounts should
no longer be an issue, the bot is using Algolia and takes into account it's
delay. The bot now only PM's people the first time they ever join #hackernews
(and only if they're on a registered account) just to let them know about it
once. If we end up getting moderators (dang plz[0]) this would also be a good
place to put a message about what sort of behavior is expected in the channel
and what's considered off-topic/etc.

[0]
[https://news.ycombinator.com/item?id=8254639](https://news.ycombinator.com/item?id=8254639)

~~~
ThatGeoGuy
I'm not entirely sure how you've set up managing sockets / clients, but have
you ever heard of pydle [0]? At the very least, it may make hacking on this
bot a little easier as it abstracts away from pure sockets.

[0] [https://github.com/Shizmob/pydle](https://github.com/Shizmob/pydle)

EDIT: fixed reference to [0]

------
bramgg
Note: If you have trouble connecting your account hnguardian might be facing
rate limit issues with Hacker News bios. I have to go AFK right now but I'll
look into that as soon as I get back. Cheers!

Edit: Switched to only using Algolia's API. Hopefully things are working now
:)

~~~
m-app
Seems that the Algolia API has some delay in it though (or is hitting the same
rate limit?). I've updated my bio some 10 minutes ago but it's still not
propagated.

Edit: Had a little more patience, which paid off.

------
e12e
Certainly an interesting approach to writing an ircbot, just using socket...
is this python3? 2? Seeing has how input (from irc server) strings are decoded
from utf8, but strings are sent raw? (Ie: what happens when someone supplies
an utf8 nick? (if that's even possible -- I'm not particularly familiar with
irc at the protocol level, nor freenode)...

Refreshingly simple, but I'm also a little afraid, now ;-)

------
jacquesm
I thought #startups was the IRC channel for hackernews?

~~~
davidw
Some of us are there, but there's nothing that is in any way official.

------
spindritf
Who set that channel up? It's not registered and has no ops. Is that by
design?

~~~
bramgg
It was set up without structure when decentrality suggested the channel in an
Ask HN post[0]. Because of its current state no one can claim ownership and
grant OP's. If someone affiliated with YC/HN emailed Freenode staff they would
grant them ownership and they could then give out OP's to trusted others
seeing as they probably don't have the time to moderate it. It would be great
if #hackernews stayed like Hacker News and didn't evolve to #startups. Not
ripping on #startups, but it would be great to have a slightly more "hardcore"
and on topic alternative.

[0]
[https://news.ycombinator.com/item?id=8249277](https://news.ycombinator.com/item?id=8249277)

~~~
darklajid
I admit that I didn't understand this explanation right away, so .. for people
that have the same issue, this is a different version:

It would be great it someone officially associated with HN could contact the
Freenode stuff (mail or maybe ask in #help first to understand what is
required) to claim that channel.

In an ideal world operator permissions wouldn't be required on IRC, but ...
I'm sure it won't be long before the channel will be flooded/attacked. Calling
for help in #help works in some cases, but having local users that are able to
intervene would be better.

Can I invoke kogir/dang to have a look at this maybe?

~~~
aranjedeath
I think the point is NOT to do that. Keep the power structure flat, until such
a time as somebody YC wants to intervene (by the aforementioned email).

~~~
darklajid
There is no power structure. Right now no one has any rights in that channel
and that's going to be the case forever.

01:26 -ChanServ(ChanServ@services.)- Channel #hackernews is not registered.

There's no Operator in there. No one will get operator permissions unless
_all_ people leave first, the first to rejoin will be the new 'owner'. A
different scenario is a split, where people might get to own the channel in a
segment of the network.

That's all fine, until the first trolls and spammers join the channel. Being
able to issue mutes/bans IS helpful on IRC.

Note that this is not related to the power structure. Flat is good. The idea
bramgg seems to suggest is that someone grabs the channel in his role as a
YC/HN representative and 'donates' it to the people inside. Give 5-10 people
permissions and .. leave it alone. THAT's the idea. Not HN staff patrolling
that channel.

------
malkia
Must be a moment of temporal dyslexia - but I've read it as Hungarian, and
thought for a moment of Hungarian notation, then saw what it is, since it did
not make any more sense (being hungarian that is)

------
RubyPinch
Why not just use nickserv metadata? it keeps the information directly
associated with the irc account it belongs to

