<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def on_chanmsg(self, from_, channel, message):
 """ Event handler for channel messages. """

        if message == 'hello':
            self.privmsg(channel, 'Hello, %s!' % from_[0])
            print('%s said hello!' % from_[0])
        elif message == '!quit':
            self.quit('Bye!')