You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need some assistance. for some reason I can't get anything to match using
match/match_regex/
or any of the other forms of that feature in cinch. I even tried making my own cinch project in which I simple copied their demo of that feature and it still isn't working. Could I have something miss configured? could I be missing a prereq. I can't believe that this feature would need any other package since regex is built in.
Ok thank you. I now have it mostly working. It also defaults to
!leave-channel
is equivalent to
!leave-channel [current_channel]
Future work
I don't have user privelages done and I don't really know where to go on that.
how should we manage user privilages.
I don't understant irc at all yet so I don't know if there are any built in irc user roles or anything that we should use or wether it should all just be maintained by the bot.
check for failure due to malformed channel name or other error and inform the user.
rspec. I created an rspec template but I have to figure out how to write specs with cinch
Git?
I've updated my branch of the fork. will that be included in the pull request I issued earlier or will I need to request a pull again.
As for User Privileges. I think it can just be controlled by an ENV Var at start up, and a command for any privileged user to add another.
IRC does have a notion of a 'registered' user -- but that's per-server (eg, on freenode, you can register your nickname). Ideally, we only allow registered nicknames to do anything required by an approved user. I think you would need to learn Freenode's IRC API (a series of messages, usually sent to/received from the ChanServ and NickServ users). For a first pass, a series of hardcoded names should suffice.
When updating a branch associated with a pull request, any update is automatically propagated to the PR. Thus, if you intend to submit two separate PR's, you should have two separate branches. I recommend trying to only have one open at a time, because otherwise you'll end up in rebase hell.
I've got an issue I would like some help with. I'm trying to extend the Cinch::User class to contain something like
classCinch::Userroles=[:channel=>["colwem","jfredett"]]defrole?roleroles[role].include?selfendend#so that I can call do_role_actionifirc.user.role?:role
But I'm really at a loss for exactly how to do this. It's a matter of scope and I've never been very good at scope in ruby (I've never been very good at ruby actually).
I would like to share my code however I've run into a problem with my understanding of git and github. I've made a branch 'channel_changer' and I would like to push it to github so you can look at it. However I did
As for the first bit, I would recommend, emphatically, not monkey patching the Cinch::User class. since it's responsibility (representing an IRC user) is highly dissimilar from the responsibility of determine user capabilities. Essentially, the relationship between users and their 'approved' status is that of a "HAS_A", not an "IS_A" -- that is to say, it's not a property, but an association. A user may be associated with a "Role" of being approved. To accomplish this, I would structure it as follows:
This way also avoids any sort of weird scope bugs.
As for the git issue, you probably need to specify git push origin channel_changer, git push -- iirc -- will not, by default, push branches. I could be wrong on that, but it's usually better to do 'git push origin ' (even in the case of master) -- so that you never accidentally push the wrong branch.
After that, there is a 'branch' dropdown in the upper lefthand corner of the directory listing, should be able to push that and see where the branch lives.
Activity
colwem commentedon Jul 22, 2012
Starting work on this issue.
colwem commentedon Jul 22, 2012
I need some assistance. for some reason I can't get anything to match using
or any of the other forms of that feature in cinch. I even tried making my own cinch project in which I simple copied their demo of that feature and it still isn't working. Could I have something miss configured? could I be missing a prereq. I can't believe that this feature would need any other package since regex is built in.
jfredett commentedon Jul 22, 2012
Hmm, do you have your code up in a fork somewhere?
One thing to make sure is that you're loading the plugin in the
rake startcommand. In the plugin list.jfredett commentedon Jul 22, 2012
Ah- I see (looked at your fork) -- you don't need to add the ! at the beginning of the command. Cinch will add that for you.
colwem commentedon Jul 22, 2012
Ok thank you. I now have it mostly working. It also defaults to
is equivalent to
Future work
Git?
I've updated my branch of the fork. will that be included in the pull request I issued earlier or will I need to request a pull again.
jfredett commentedon Jul 22, 2012
Cool.
As for User Privileges. I think it can just be controlled by an ENV Var at start up, and a command for any privileged user to add another.
IRC does have a notion of a 'registered' user -- but that's per-server (eg, on freenode, you can register your nickname). Ideally, we only allow registered nicknames to do anything required by an approved user. I think you would need to learn Freenode's IRC API (a series of messages, usually sent to/received from the ChanServ and NickServ users). For a first pass, a series of hardcoded names should suffice.
When updating a branch associated with a pull request, any update is automatically propagated to the PR. Thus, if you intend to submit two separate PR's, you should have two separate branches. I recommend trying to only have one open at a time, because otherwise you'll end up in rebase hell.
colwem commentedon Jul 23, 2012
I've got an issue I would like some help with. I'm trying to extend the Cinch::User class to contain something like
But I'm really at a loss for exactly how to do this. It's a matter of scope and I've never been very good at scope in ruby (I've never been very good at ruby actually).
I would like to share my code however I've run into a problem with my understanding of git and github. I've made a branch 'channel_changer' and I would like to push it to github so you can look at it. However I did
But I can't find branch on github. How do I push the branch such that I can get it on github?
jfredett commentedon Jul 23, 2012
As for the first bit, I would recommend, emphatically, not monkey patching the Cinch::User class. since it's responsibility (representing an IRC user) is highly dissimilar from the responsibility of determine user capabilities. Essentially, the relationship between users and their 'approved' status is that of a "HAS_A", not an "IS_A" -- that is to say, it's not a property, but an association. A user may be associated with a "Role" of being approved. To accomplish this, I would structure it as follows:
This way, you code becomes:
(mod API mistakes on my part).
We could then naturally extend that
UserRoleobject to include other roles. Also, we could do:This way, we alter the API to look like:
Which I think reads a little nicer.
This way also avoids any sort of weird scope bugs.
As for the git issue, you probably need to specify
git push origin channel_changer,git push-- iirc -- will not, by default, push branches. I could be wrong on that, but it's usually better to do 'git push origin ' (even in the case of master) -- so that you never accidentally push the wrong branch.After that, there is a 'branch' dropdown in the upper lefthand corner of the directory listing, should be able to push that and see where the branch lives.
colwem commentedon Jul 23, 2012
Ok jfredett I've added a UserRole class with one class method approved?. I've pushed it with git push origin channel_changer.