
import grp


class User(object):
    """Something, something, something darkside...."""

    def __init__(self, settingsInstance, commandInstance, cmdName, *args):
        super(User, self).__init__()
        self.settingsInstance = settingsInstance
        self.commandInstance = commandInstance
        if cmdName is not None:
            if args[0] is not None:
                getattr(self, cmdName)(*args)
            else:
                getattr(self, cmdName)()
    
    def test(self):
        self.commandInstance.replyWithMessage(
            self.commandInstance.user
        )

    def users(self):
        """Get a list of users in the users group."""
        self.commandInstance.replyWithMessage(self._users())

    def _users(self, output='string'):
        for group in grp.getgrall():
            if group.gr_name == 'users':
                members = group.gr_mem
        if output == 'list':
            return members
        else:
            return ', '.join(members)



import grp


class User(object):
    """Something, something, something darkside...."""

    def __init__(self, settingsInstance, commandInstance, cmdName, *args):
        super(User, self).__init__()
        self.settingsInstance = settingsInstance
        self.commandInstance = commandInstance
        if cmdName is not None:
            if args[0] is not None:
                getattr(self, cmdName)(*args)
            else:
                getattr(self, cmdName)()
    
    def testuser(self):
        self.commandInstance.replyWithMessage(
            self.commandInstance.user
        )

    def testchannel(self):
        self.commandInstance.replyWithMessage(
            self.commandInstance.channel
        )

    def users(self):
        """Get a list of users in the users group."""
        self.commandInstance.replyWithMessage(self._users())

    def _users(self, output='string'):
        for group in grp.getgrall():
            if group.gr_name == 'users':
                members = group.gr_mem
        if output == 'list':
            return members
        else:
            return ', '.join(members)


Test if you can return the channel.
Test if you can return the channel.

  
  import grp
  
  
  class User(object):
      """Something, something, something darkside...."""
  
      def __init__(self, settingsInstance, commandInstance, cmdName, *args):
          super(User, self).__init__()
          self.settingsInstance = settingsInstance
          self.commandInstance = commandInstance
          if cmdName is not None:
              if args[0] is not None:
                  getattr(self, cmdName)(*args)
              else:
                  getattr(self, cmdName)()
      
-     def test(self):
+     def testuser(self):
          self.commandInstance.replyWithMessage(
              self.commandInstance.user
+         )
+ 
+     def testchannel(self):
+         self.commandInstance.replyWithMessage(
+             self.commandInstance.channel
          )
  
      def users(self):
          """Get a list of users in the users group."""
          self.commandInstance.replyWithMessage(self._users())
  
      def _users(self, output='string'):
          for group in grp.getgrall():
              if group.gr_name == 'users':
                  members = group.gr_mem
          if output == 'list':
              return members
          else:
              return ', '.join(members)
  
  
Test if you can return the channel.
## Code Before:

import grp


class User(object):
    """Something, something, something darkside...."""

    def __init__(self, settingsInstance, commandInstance, cmdName, *args):
        super(User, self).__init__()
        self.settingsInstance = settingsInstance
        self.commandInstance = commandInstance
        if cmdName is not None:
            if args[0] is not None:
                getattr(self, cmdName)(*args)
            else:
                getattr(self, cmdName)()
    
    def test(self):
        self.commandInstance.replyWithMessage(
            self.commandInstance.user
        )

    def users(self):
        """Get a list of users in the users group."""
        self.commandInstance.replyWithMessage(self._users())

    def _users(self, output='string'):
        for group in grp.getgrall():
            if group.gr_name == 'users':
                members = group.gr_mem
        if output == 'list':
            return members
        else:
            return ', '.join(members)


## Instruction:
Test if you can return the channel.
## Code After:

import grp


class User(object):
    """Something, something, something darkside...."""

    def __init__(self, settingsInstance, commandInstance, cmdName, *args):
        super(User, self).__init__()
        self.settingsInstance = settingsInstance
        self.commandInstance = commandInstance
        if cmdName is not None:
            if args[0] is not None:
                getattr(self, cmdName)(*args)
            else:
                getattr(self, cmdName)()
    
    def testuser(self):
        self.commandInstance.replyWithMessage(
            self.commandInstance.user
        )

    def testchannel(self):
        self.commandInstance.replyWithMessage(
            self.commandInstance.channel
        )

    def users(self):
        """Get a list of users in the users group."""
        self.commandInstance.replyWithMessage(self._users())

    def _users(self, output='string'):
        for group in grp.getgrall():
            if group.gr_name == 'users':
                members = group.gr_mem
        if output == 'list':
            return members
        else:
            return ', '.join(members)

