hashbang / irc-bot

IRC Bot
MIT License
3 stars 6 forks source link

Remove highlighting of user during url-shortening #15

Closed tilpner closed 7 years ago

tilpner commented 7 years ago

This is completely unnecessary: It will only ping me when I just sent a URL, and I'll already know I sent a URL, there's no need to remind me about that.

I also don't need to be reminded of the title, so this is just annoying.

tilpner commented 7 years ago

And it should possibly not send a PRIVMSG, but a NOTICE, as is common practice to avoid bot loops...

daurnimator commented 7 years ago

This was done to make sure that a user can correlate who sent what link to which shortended version it is. Otherwise when two people are talking at once it can become confusing.

RyanSquared commented 7 years ago

In that case, there should be a no-width space put in the nick (nick:gsub("(.)(.+)", "%1<nwsp>%2")).

tilpner commented 7 years ago

That's a good reason to include some sort of id, but it doesn't have to be my nick. In most cases, somehow mentioning the domain would be enough to correlate full URLs to shortened ones.

Alternatively, a no-width space sounds good, but that would require testing for client compatibility (lest a client ignores that due to low edit-distance).

I'm currently unable to run this bot locally, so I'll close this PR for now.

tilpner commented 7 years ago

I tested Ryans suggestion on #!, it doesn't highlight me (weechat), but displays oddly on mlterm due to misconfigured fonts (I assume).

The sent line is now quite long, we might want to keep that down to avoid it displaying as multiple lines on narrow clients

tilpner commented 7 years ago

This appears to work with weechat 1.7.1, KVIrc 4.9.2, and HexChat 2.12.4.

tilpner commented 7 years ago

How about now?