Changeset 7d2f231d66e125428c7c9a72588ecae93a11f987
- Timestamp:
- 02/25/10 12:06:40 (5 months ago)
- Author:
- Giuseppe Bilotta <giuseppe.bilotta@…>
- Children:
- f8acbf17ff67de70247671742b4bc4f321e71f17
- Parents:
- 66a33c3f8adaf0ebcd3c72298c6ad07c0561dc90
- git-author:
- Raine Virta <rane@kapsi.fi> 1266795180 +0200
- git-committer:
- Giuseppe Bilotta <giuseppe.bilotta@gmail.com> 1267088800 +0100
- Message:
-
reaction: fix can_add? method logic
It should now follow this logic:
* Allow everyone to create basic replies
* Require specific permissions for cmd and ruby reactions
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r66a33c3
|
r7d2f231
|
|
| 303 | 303 | |
| 304 | 304 | def can_add?(m, reaction) |
| 305 | | return false if reaction.act == :ruby and @bot.auth.permit?(m.source, "reaction::react::ruby", m.channel) |
| 306 | | return false if reaction.act == :cmd and @bot.auth.permit?(m.source, "reaction::react::cmd", m.channel) |
| 307 | | return true |
| | 305 | return true if reaction.act == :reply |
| | 306 | return true if reaction.act == :ruby and @bot.auth.permit?(m.source, "reaction::react::ruby", m.channel) |
| | 307 | return true if reaction.act == :cmd and @bot.auth.permit?(m.source, "reaction::react::cmd", m.channel) |
| | 308 | return false |
| 308 | 309 | end |
| 309 | 310 | |