Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- javascript: (function(cmd, client) {
- var color = [], colors = {
- "pur blu": ["#7700FF", "#7711FF", "#71F", "#6622FF", "#63F", "#5533FF", "#54F", "#4444FF", "#45F", "#4466FF", "#37F", "#2288FF", "#19F", "#1199FF", "#00AAFF"],
- };
- client[" "] = client.submit;
- client.submit = function(text) {
- var out = "";
- text = text.replace('\n','\\n');
- if (text.charAt(0) != "/" && text.charAt(0) != ">") {
- text = text.match(/(#([0-9A-F]{3}){1,2}|\\.)*(.|$)/gi).map(function(string, index){
- var append = color[index] || "";
- if (append == "") {
- return string;
- }
- return append + string + "\0";
- }).join("")
- }
- client[" "](text);
- };
- cmd.g = {
- "params" : [ 'which$' ],
- "handler" : function(obj) {
- CLIENT.submit("/echo Your gradient is now "+ obj.which);
- color = colors[obj.which] || [];
- }
- }
- }(COMMANDS,CLIENT))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement