#!/usr/bin/env python

"""
High five hook
"""

import re
import sys

# import hackabot utility classes
from hook import Hook

class HighFive(Hook):

    def __init__(self):

        # call the base constructor to set up everything
        super(HighFive, self).__init__('highfive')

    def main(self):

        if re.match(r'^\s*%s:?\s+(o\/|\\o)\s*$' % self._current_nick, self._msg):
            c = re.match(r'^\s*%s:?\s+(o\/|\\o)\s*$' % self._current_nick, self._msg)
            if c.group(1) == 'o/':
                print >> sys.stdout, 'send %s \\o' % self._nick
            else:
                print >> sys.stdout, 'send %s o/' % self._nick

        return None

if __name__ == "__main__":
    hook = HighFive()
    sys.exit(hook.main())

fd7f8b134466ba71ed915f7f7234448407fc19dc
<mask token>

<mask token>


class HighFive(Hook):

    def __init__(self):
        super(HighFive, self).__init__('highfive')

    def main(self):
        if re.match('^\\s*%s:?\\s+(o\\/|\\\\o)\\s*$' % self._current_nick,
            self._msg):
            c = re.match('^\\s*%s:?\\s+(o\\/|\\\\o)\\s*$' % self.
                _current_nick, self._msg)
            if c.group(1) == 'o/':
                print >> sys.stdout, 'send %s \\o' % self._nick
            else:
                print >> sys.stdout, 'send %s o/' % self._nick
        return None


<mask token>

<mask token>


class HighFive(Hook):

    def __init__(self):
        super(HighFive, self).__init__('highfive')

    def main(self):
        if re.match('^\\s*%s:?\\s+(o\\/|\\\\o)\\s*$' % self._current_nick,
            self._msg):
            c = re.match('^\\s*%s:?\\s+(o\\/|\\\\o)\\s*$' % self.
                _current_nick, self._msg)
            if c.group(1) == 'o/':
                print >> sys.stdout, 'send %s \\o' % self._nick
            else:
                print >> sys.stdout, 'send %s o/' % self._nick
        return None


if __name__ == '__main__':
    hook = HighFive()
    sys.exit(hook.main())

<mask token>
import re
import sys
from hook import Hook


class HighFive(Hook):

    def __init__(self):
        super(HighFive, self).__init__('highfive')

    def main(self):
        if re.match('^\\s*%s:?\\s+(o\\/|\\\\o)\\s*$' % self._current_nick,
            self._msg):
            c = re.match('^\\s*%s:?\\s+(o\\/|\\\\o)\\s*$' % self.
                _current_nick, self._msg)
            if c.group(1) == 'o/':
                print >> sys.stdout, 'send %s \\o' % self._nick
            else:
                print >> sys.stdout, 'send %s o/' % self._nick
        return None


if __name__ == '__main__':
    hook = HighFive()
    sys.exit(hook.main())

#!/usr/bin/env python

"""
High five hook
"""

import re
import sys

# import hackabot utility classes
from hook import Hook

class HighFive(Hook):

    def __init__(self):

        # call the base constructor to set up everything
        super(HighFive, self).__init__('highfive')

    def main(self):

        if re.match(r'^\s*%s:?\s+(o\/|\\o)\s*$' % self._current_nick, self._msg):
            c = re.match(r'^\s*%s:?\s+(o\/|\\o)\s*$' % self._current_nick, self._msg)
            if c.group(1) == 'o/':
                print >> sys.stdout, 'send %s \\o' % self._nick
            else:
                print >> sys.stdout, 'send %s o/' % self._nick

        return None

if __name__ == "__main__":
    hook = HighFive()
    sys.exit(hook.main())
