Created
February 13, 2009 20:28
-
-
Save kolen/64088 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__module_name__ = "quotes" | |
__module_version__ = "0.1" | |
__module_description__ = "Converts '\"' quotes to typographical" | |
import xchat, re | |
already_said=1 | |
regexii = [ re.compile('"(\s|\Z)'), | |
re.compile('(\s|\A)"') | |
] | |
def say_cb(word, word_eol, userdata): | |
global already_said | |
if already_said: | |
already_said = 0 | |
arg = word_eol[0] | |
arg = regexii[0].sub("б╩\\1", arg) | |
arg = regexii[1].sub("\\1б╚", arg) | |
xchat.command("SAY %s" % arg) | |
return xchat.EAT_ALL | |
else: | |
already_said = 1 | |
return None | |
xchat.hook_command("", say_cb, userdata=1, priority=xchat.PRI_LOWEST) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment