I'm looking for an online game with a persistent world where you are allowed to code (and add) your own 'players' (it can be in any language / script).
A sort of RTS but for bots.
Does that even exist?
Yes, there is. It's called Robocode, and you basically program your own bot in Java, and fight with other people. You can battle against other AI bots, or play multiplayer over the Internet.
Here's the link to their homepage: http://robocode.sourceforge.net/.
Since recently Heroes of Newerth has the ability to program bots: https://plus.google.com/u/0/112989499300264805049/posts/idAYrvc9Awn
There is also the Ai Sandbox, which is by the creators of AiGameDev (http://aigamedev.com/) Here is the link: http://aisandbox.com/
It isn't actually released yet though, but I for one am quite excited about it :)
Carnage Heart on the Playstation 1 was a similar example: http://en.wikipedia.org/wiki/Carnage_Heart
Not online nor in a persistent world, but it did have an interesting flowchart-based programming model and was quite impressive for it's time.