Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#137 commands.py: Add 'channelOrGlobal' converter

wont-fix
James McCoy
None
4
2012-12-31
2012-10-31
Valentin Lorentz
No

Hi,

I added a new converter that takes either a channel name or the keyword 'global' (or nothing, which defaults to the current channel):
https://github.com/ProgVal/Limnoria/commit/d3da0c2efc790c2418f90fea4f9ceab5f2bfa7a2

If you want to see a use case: https://github.com/ProgVal/Limnoria/commit/a565b7f7d7c24c0b18e293be21287fcd534b030e

Regards,
Valentin

Discussion

  • James McCoy
    James McCoy
    2012-11-03

    • assigned_to: James McCoy
     
  • James McCoy
    James McCoy
    2012-11-03

    Isn't this just first(('literal', ['global']), 'channel')?

     
    Last edit: James McCoy 2012-11-03
  • Oh, I did not think of that.

     
  • James McCoy
    James McCoy
    2012-12-31

    • status: open --> wont-fix
     
  • James McCoy
    James McCoy
    2012-12-31

    I'm going to close this out. It's trivial to define such a converter local to your plugin and I don't see much value in having this be part of commands.py.