Skip to content

Instantly share code, notes, and snippets.

@kolen
Created February 13, 2009 20:28
Show Gist options
  • Save kolen/64088 to your computer and use it in GitHub Desktop.
Save kolen/64088 to your computer and use it in GitHub Desktop.
__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