This repository has been archived by the owner on Jul 24, 2018. It is now read-only.
Add feature to get categories, filters, rules in the IRC backend itself #54
Merged
ralphbean
merged 11 commits into
fedora-infra:develop
from
sayanchowdhury:irc-notifications
Mar 28, 2015
Merged
Add feature to get categories, filters, rules in the IRC backend itself #54
ralphbean
merged 11 commits into
fedora-infra:develop
from
sayanchowdhury:irc-notifications
Mar 28, 2015
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is really neat :) Thanks for working on it! In review, I found a couple bugs though.
diff --git a/fmn/consumer/backends/irc.py b/fmn/consumer/backends/irc.py
index bbf76f7..5c1f4b5 100644
--- a/fmn/consumer/backends/irc.py
+++ b/fmn/consumer/backends/irc.py
@@ -253,6 +253,7 @@ class IRCBackend(BaseBackend):
if pref is None:
self.send(nick,
'The nick is not configured with Fedora Notifications')
+ sess.close()
return
subcmd_string = message.rsplit(None, 1)[1].lower()
@@ -277,6 +278,7 @@ class IRCBackend(BaseBackend):
filtr = pref.get_filter_name(sess, subcmd_string)
except ValueError:
self.send(nick, 'Not a valid filter')
+ sess.close()
return
rules = filtr.rules
@@ -302,6 +304,7 @@ class IRCBackend(BaseBackend):
value=value
))
self.send(nick, '-*'*10)
+ sess.close()
def cmd_help(self, nick, message):
self.log.info("CMD help: %r sent us %r" % (nick, message))
@@ -421,7 +424,7 @@ class IRCBackend(BaseBackend):
class IRCBackendProtocol(twisted.words.protocols.irc.IRCClient):
- lineRate = 0.6
+ lineRate = 0.9
sourceURL = "http://github.com/fedora-infra/fmn"
@property
Can you have it say "you have 6 filter(s)" instead of "you have 6 rule filter(s)". People seem to get reasonably confused about the difference between filters and rules.. and if we can help keep them separate and distinct in all the UI language, that might help.
|
@ralphbean i fixed the bugs you reported. Now both |
Looks good to me @sayanchowdhury. Let's merge it! |
ralphbean
added a commit
that referenced
this pull request
Mar 28, 2015
Add feature to get categories, filters, rules in the IRC backend itself
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.