Changeset 8473982fbfa276ced1394bf704e6de379a0f3e65
- Timestamp:
- 03/15/10 00:08:48 (5 months ago)
- Author:
- Robin H. Johnson <robbat2@…>
- Children:
- eb3e6265ef371eda4594f59c872fbb68e1998441
- Parents:
- 53c82a94714e439c63a65fccdaf2512383cffb7a
- git-author:
- Robin H. Johnson <robbat2@gentoo.org> 1268472688 +0000
- git-committer:
- Robin H. Johnson <robbat2@gentoo.org> 1268600928 +0000
- Message:
-
basics: implement a channel list status query
This gets the list of channels we think we are in (not what the server says we are in).
Signed-off-by: Robin H. Johnson <robbat2@…>
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r4ff73e4
|
r8473982
|
|
| 68 | 68 | @bot.part m.target if m.public? |
| 69 | 69 | end |
| | 70 | end |
| | 71 | |
| | 72 | def bot_channel_list(m, param) |
| | 73 | ret = _('I am in: ') |
| | 74 | # sort the channels by the base name and then map with prefixes for the |
| | 75 | # mode and display. |
| | 76 | ret << @bot.channels.compact.sort { |a,b| |
| | 77 | a.name.downcase <=> b.name.downcase |
| | 78 | }.map { |c| |
| | 79 | c.modes_of(@bot.myself).map{ |mo| |
| | 80 | m.server.prefix_for_mode(mo) |
| | 81 | }.to_s + c.name |
| | 82 | }.join(', ') |
| | 83 | m.reply ret |
| 70 | 84 | end |
| 71 | 85 | |
| … |
… |
|
| 213 | 227 | :defaults => {:chan => nil}, |
| 214 | 228 | :auth_path => 'move' |
| | 229 | basics.map "channels", |
| | 230 | :action => 'bot_channel_list', |
| | 231 | :auth_path => 'move' |
| 215 | 232 | basics.map "hide", |
| 216 | 233 | :action => 'bot_hide', |