
import plugin

from twisted.python import log

class Invitejoiner(plugin.Plugin):

    def __init__(self):
        plugin.Plugin.__init__(self, "Invitejoiner")

    def invited(self, server_id, channel):
        log.msg("Invited to: ", channel)
        self.join(server_id, channel)

Invitejoiner.run()



import plugin

from twisted.python import log

class Invitejoiner(plugin.Plugin):

    def __init__(self):
        plugin.Plugin.__init__(self, "Invitejoiner")

    def invited(self, server_id, channel):
        log.msg("Invited to: ", channel)
        self.join(server_id, channel)

if __name__ == "__main__":
    sys.exit(Invitejoiner.run())


Fix starting the Invitejoiner plugin
Fix starting the Invitejoiner plugin

  
  import plugin
  
  from twisted.python import log
  
  class Invitejoiner(plugin.Plugin):
  
      def __init__(self):
          plugin.Plugin.__init__(self, "Invitejoiner")
  
      def invited(self, server_id, channel):
          log.msg("Invited to: ", channel)
          self.join(server_id, channel)
  
- Invitejoiner.run()
+ if __name__ == "__main__":
+     sys.exit(Invitejoiner.run())
  
  
Fix starting the Invitejoiner plugin
## Code Before:

import plugin

from twisted.python import log

class Invitejoiner(plugin.Plugin):

    def __init__(self):
        plugin.Plugin.__init__(self, "Invitejoiner")

    def invited(self, server_id, channel):
        log.msg("Invited to: ", channel)
        self.join(server_id, channel)

Invitejoiner.run()


## Instruction:
Fix starting the Invitejoiner plugin
## Code After:

import plugin

from twisted.python import log

class Invitejoiner(plugin.Plugin):

    def __init__(self):
        plugin.Plugin.__init__(self, "Invitejoiner")

    def invited(self, server_id, channel):
        log.msg("Invited to: ", channel)
        self.join(server_id, channel)

if __name__ == "__main__":
    sys.exit(Invitejoiner.run())

