Skip to content
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

enabled channel-wide highlight #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

licnep
Copy link

@licnep licnep commented Dec 8, 2011

Hi,
I added a snippet so that if you have /#channelname/ among the highlight words you will be notified of all messages in that channel (the messages are not colored).

I needed this personally, cause I watch some very low-activity channels, where people sometimes pop in and I have to promptly respond to them before they disconnect.
Not sure if it's needed by anyone else, and maybe there are better ways to do this. Anyway I'm asking for the pull, feel free whether to pull my code or not.

Also, I didn't add anything documentation-wise, but it probably would be needed for users to know about this functionality.

Bye

@meebey
Copy link
Owner

meebey commented Dec 16, 2011

This is a neat idea but I would prefere a different implementation. The format should allow to match against the chat ID (which is the channel name in the case of IRC). So a highlight defintion could look like this:

<#smuxi>/.*/

The string inside the <> would match against the chat ID then, if not specified it defaults to any chat ID. Possibly this could be extended with protocol and network like this:

<IRC/OFTC/#smuxi>/.*/

@licnep
Copy link
Author

licnep commented Dec 16, 2011

Yes, this seems indeed a better solution (given smuxi's multi-protocol and multi-server nature), my implementation was more of a quick hack. It's probably better if you or someone familiar with smuxi's source try to implement this improved version, though. If you prefer I can give it a try myself, although I'm not very familiar with smuxi's source, and could end up putting the checks in the wrong places, or writing code that needs to be heavily edited. I leave it up to you. As far as I'm concerned this pull request can be closed now.

@meebey
Copy link
Owner

meebey commented Dec 21, 2011

I think its pretty easy to implement, the key is in ProtocolManagerBase.ContainsHighlight() that needs a new parameter ChatModel, then the chat matching can be done and nothing else needs to be touched.

@meebey
Copy link
Owner

meebey commented Dec 21, 2011

I would prefere if you could look into it as I am busy right now with the pending 0.8.9 release, see http://www.smuxi.org/versions/show/15

@licnep
Copy link
Author

licnep commented Dec 21, 2011

Ok. I'll try to give it a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants