Policy File Request To Connect Custom IRC Flash Overlay

I’m developing a flash plugin to connect to the twitch IRC channel that will show the chat on the stream in a neat and safe way.

I previously accomplished this by running a python script on a HexChat IRC client that would relay the messages from that client to a flash file running actionscript 3.0 that was listening for the strings on a TCP socket. Because it was flash it also had to receive a policy file before every connection for some security reason that escapes me.

Anyway, this worked but was quite unstable and the Hexchat client crashed periodically probably down to my mediocre coding. So, I have decided to try to just get the flash “plugin” to work without the need for a second relay program.

The problem is; that the flash document requires the policy file to be sent to it before it will accept the IRC communication. Can the programmers at twitch suggest how I can get around this or if you have a policy server setup for this kind of thing.

The strange thing is that the IRC library I am using connects to twitch irc channels just fine when I am developing in Flash Pro CS6, however the moment I execute the same .swf file in a standalone player or xsplit OBS/enviroment it stops being able to communicate.

Here is some information on the issue:



I think I need twitch to host this file on the domain irc.twitch.tv:

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
	<allow-access-from domain="*" />
	<site-control permitted-cross-domain-policies="master-only"/>

on port : 843

Please can a twitch developer get back to me on this: I have asked a professional actionscript programmer and he seems to think that this won’t create any security problems for anyone.

As mentioned by Ossareh in IRC, this will not happen due to the security hole it provides.

If you’re familiar with Adobe AIR, you could create an AIR app to connect to the Twitch IRC server. AIR does not have the cross domain security restriction a normal Flash swf has.

You could then use a LocalConnection to relay messages from the Air application to your Flash swf.