Skip to content

Instantly share code, notes, and snippets.

@sim642 sim642/colorspam.py Secret
Created Oct 3, 2018

Embed
What would you like to do?
colorspam weechat script
# -*- coding: utf-8 -*-
from __future__ import print_function
SCRIPT_NAME = "colorspam"
SCRIPT_AUTHOR = "Simmo Saan <simmo.saan@gmail.com>"
SCRIPT_VERSION = "1.0"
SCRIPT_LICENSE = "GPL3"
SCRIPT_DESC = ""
SCRIPT_COMMAND = SCRIPT_NAME
IMPORT_OK = True
try:
import weechat
except ImportError:
print("This script must be run under WeeChat.")
print("Get WeeChat now at: http://www.weechat.org/")
IMPORT_OK = False
def command_cb(data, buffer, args):
for fg in range(16, 48):
s = ""
for bg in range(16, 48):
s += weechat.color(str(fg) + "," + str(bg)) + "X"
weechat.prnt(weechat.current_buffer(), s)
return weechat.WEECHAT_RC_OK
if __name__ == "__main__" and IMPORT_OK:
if weechat.register(SCRIPT_NAME, SCRIPT_AUTHOR, SCRIPT_VERSION, SCRIPT_LICENSE, SCRIPT_DESC, "", ""):
weechat.hook_command(SCRIPT_COMMAND, SCRIPT_DESC, "", "", "", "command_cb", "")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.