Created
December 8, 2018 23:04
-
-
Save ariedro/7afa4c5492ec194e004599e97920d766 to your computer and use it in GitHub Desktop.
Color randomizer by word for IRC messages
This file contains hidden or 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
int main(int argc, char* argv[]) { | |
srand(time(NULL)); | |
int i = 0; | |
printf("/eval "); | |
while (argv[1][i] != '\0') | |
if (argv[1][i] == ' ' || i == 0) | |
printf("${\\x03}%d%c", rand() % 14 + 2,argv[1][i++]); | |
else | |
printf("%c",argv[1][i++]); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment