# # ::: Omsg Script by Tony Motakis / Terminal Velocity ::: # # Just put it in your X-Chat dir (usualy in ~/.xchat # or ~/.xchat2) and you're ready to use it next time # xchat loads, or you can use the command # "/py load omsg.py" to use it without restarting # X-Chat # # Written by Terminal-Velocity # http://www.tvelocity.eu/ # __module_name__ = "omsg" __module_version__ = "1.1" __module_description__ = "Omsg script by tvelocity" import xchat def omsg_get(word, word_eol, userdata): if word[2][:1] == '@': tab = xchat.find_context(channel=word[2][1:]) chan = word[2] nick = "" for char in word[0][1:]: if char<>'!': nick = nick + char else: break message = word_eol[3][1:] tab.emit_print("Channel Notice", nick, chan, message) return xchat.EAT_ALL xchat.hook_server("PRIVMSG", omsg_get) def omsg_send(word, word_eol, userdata): xchat.command("msg @" + xchat.get_info("channel") + " " + word_eol[1]) return xchat.EAT_ALL xchat.hook_command("OMSG", omsg_send, help="OMSG Sends an Op Message in the current channel") xchat.prnt("\0038:::\0033Omsg Script version 1.1 by tvelocity Loaded!\0038:::\003 if you care, come and visit me: http://www.tvelocity.eu/")