Hi, there. This topic has been written many, many times, and there is not much new you can tell.
Script code is open for anyone to read, and the writter of mIRC likes it that way. If you don't want your code to be copied or ripped the best solution is not to put it public... that's my advice.
I wrote this post for those who don't want to listen, so they want to put their code on some web page, and still have "some kind" of protection from ripping. I'll give you some ideas how can you "protect" your script (or just some part) from those users who are not very good in coding. Protection from a good scripter is NOT posibile (like I said before). I'll start with some stupid (but still working as protection from those users who are new in mirc/scripting) ideas.
1. Changing the font (for alias/popups/remote) Note: Works only if ripper is extremly stupid, or just new in mIRC.
Open the remote, go to File/Font... and change the font to Wingdings (or some other non letter font).
Now, if ripper doesn't know why cann't he read you remotes, or doesn't know that's posible to change font, your code is safe from reading in mirc enviroment. Still, he can use some text editor to read your files, but, I guess if somebody doesn't know about the fonts, he doesn't know about the files either. Read the note above.
2. Checking for some variables If you have some variable that contains your script name, you can check if somebody changed it.
Let's say you have a variable %scrnm This is a script made by blabla!
Somewhere in your code (in some on op, on deop, on join, event) add this line:
if (%scrnm != This is a script made by blabla!) {
remove script.mrc
echo -s You changed my code, now you die!
}
replace script.mrc with your own filename.
You can also add this code instead of above:
if (%scrnm != $decode(@5&AI<R!I<R!A('-C<FEP="!M861E(&)Y(&)L86)L82$`)) remove script.mrc
where @5&AI<R!I<R!A('-C<FEP="!M861E(&)Y(&)L86)L82$` is what I get from //echo -s $encode(This is a script made by blabla!)
3. Checking for code lengthYou can always check if your code has been changed, all you need to do is check the length of your script file.
In some part of your code (on op, on join, whatever) add this code:
if ($file(script.mrc).size == 10000) {
remove script.mrc
echo -s You changed my code, now you die!
}
replace script.mrc with your own filename, replace 10000 with your own file size which you get by doing this //echo -s $file(script.mrc).size
BE CAREFUL: when you change anything in you code (10000 with 1000 example) the filesize will change.
Some notes:
Replace my "remove script.mrc" and echo line with the commands you want to be executed when somebody change the code.
I am not responsible for any demage that you can make to yourself, or to the others by using this codes, THESE ARE JUST EXAMPLES!
One more thing, I like open source, people can learn from it.