timmers_uk

[1.2.0] Internet Relay Chat Continued - 0.18.1.7 [30/10/16]

Recommended Posts

With kind permission of @blizzy78 , and continuing on from his excellent work, I've taken on this plugin that allows to use Internet Relay Chat (IRC) from within KSP. Now you can chat with friends without ever putting KSP into the background.

screenshot7.png

Download

GitHub

Spacedock

Source code on GitHub: https://github.com/timmersuk/ksp_irc

Please note that this is an early version. It's not as comfortable as it can be, and it surely has its quirks. Let me know what you think about the plugin!

Configuration

Since this is just an early version, you need to configure the plugin via its config file, then (re)start KSP. This will be changed to something more comfortable in a future version.

You can still edit your config manually and (re)start KSP every time, but my one contribution of newness so far is to add a config window - if you don't have valid config it will ping up on start, but if you do have config you can select config from the chat window any time in order to update your config. Edit to your heart's content, and when you have the correct changes, press confirm, and the client will save the settings changes and reconnect (even if nothing has changed right now).

Edit the following lines in <KSP_FOLDER>\GameData\KSPIRC\irc.cfg

 

 
host = <hostname of IRC server>
port = <port number of IRC server>
nick = <the nick name you wish to use>
serverPassword = <server password, optional>

 

For example, to join the official KSP channel, use this:

 

 
host = irc.esper.net
port = 6667
nick = <whatever you like>

 

The official KSP channel name on Esper.net is #KSPOfficial

Commands

You may currently use the following commands by entering them into the text field at the bottom of the window:

/J <channel> - Joins channel <channel>. (synonym for /JOIN)

/ME <action> - Sends "<your nick name> <action>" into the current channel or to the current user (depending on tab.)

/MSG <user> <message> - Sends <message> to <user>.

All unknown commands will be sent to the server verbatim (/NICK or /JOIN, for example.)

Operator commands:

/DEOP <user> - Removes operator status from user <user> in the current channel.

/DEVOICE <user> - Removes voice status from user <user> in the current channel.

/KICK <user> [<reason>] - Kicks user <user> from the current channel (with optional reason <reason>.)

/OP <user> - Grants operator status to user <user> in the current channel.

/TOPIC <topic> - Sets the current channel's topic to <topic>.

/VOICE <user> - Grants voice status to user <user> in the current channel.

 


Change Log

This mod includes version checking using MiniAVC. If you opt-in, it will use the internet to check whether there is a new version available. Data is only read from the internet and no personal information is sent. For a more comprehensive version checking experience, please download the KSP-AVC Plugin.

 

 
0.18.1.7
- Applied fix for toolbar wrapper assembly parsing

0.18.0.6
- Rebuilt for KSP 1.2.0

0.17.0.5
- Updated to remove foreach loops according to performance recommendations.
- Added explicit support for twitch - see https://blog.bashtech.net/a-guide-to-twitch-irc/ for details, specifically use of http://www.twitchapps.com/tmi/ to generate an irc password to use - use your twitch handle as nick + username.
- Made password entry field a password UI component to avoid leaking passwords so easily.


0.16.7.4
- Rebuilt for 1.1.3

0.16.5.2
- Reuilbt for 1.1.0 prerelease.

0.15.5.2
- Rebuilt for 1.0.5 and updated compatibility in version info

0.14.5.2
- Rebuilt on 1.0.4 and updated compatibility in version info

0.14.5.1
- Rebuilt for KSP 1.0.3

0.14.4.2
- Fixed nasty issues caused by moving KSPIRC to sit mostly in a ScenarioModule - scenario module now just used to trigger save of config on transitions.

0.1.4.4.1
- Fixed issue with window position saving.

0.14.3.1
- Fixed exception when reloading saved window positions.

0.14.2.1
- Gave text input what should be a globally unique name to resolve selection issues.
- Re-enable auto-focus of the input box on mouseover, and did an ugly fix for the 'select all' bug this induces by waiting till the next draw loop to clear selection/position.
- Move initialization to the SpaceCenter scene to avoid signing in until interaction is actually possible.

0.14.1.1
- Added optional Text to Speech (windows only) - should just disable on mac/linux - let me know if it has bees on those platforms - switch on/off and set TTS volume in config window.
- Replaced button textures with DDS versions.
- Fixed 'highlight all the things' bug in unput textbox focus capture code.

0.13.1.1
- Added plain renderer used if force simple rendering is set in config - still supports links, just does zero rich text stuff.
- Set inputlocks when mouse is over chat input box, and hold focus on chat input when mouse is over chat input.
- Added code to try to drag focus back to input box when new chat is received.
 -Enabled SSL support even though unity/ksp seem to always generate certificate error - use at own risk (of MITM compromising the privacy of your connection).

0.12.1.1
- Reworked the rendering code - now supports some IRC markup stuff (notably not underlining). Should support use of bold, italic, and colors (though some combinations go spang due to limitations of unity rich text support ... I'll get there though).
- Fixed recently introduced layout/performance hit by moving back to a single GUILayout.label per message (but using rich text in said label for pretties).
- Added support for integrated display of image links via an in-game popup window - you can still open in external browser, and if what's downloaded isn't an image it'll open externally, but images ... will generally show up (as long as KSP supports the format).
- Removed some of the bees
- No SSL support yet

0.11.1.1
- Updated handling of HTTP URLs in message text - individual URLs on a message are now clickable, rather than the whole message, and more than 1 URL per message line is supported.
- Made use of blizzy's toolbar optional - if toolbar is not present, KSPIRC adds itself to the applauncher toolbar instead.
- Added auto-join support - add channels to auto-join on connection to the config, comma separated, and don't forget the '#' at the start of the channel names.
- Added auto-join cooldown + anti-spam - waits 5 seconds after connecting before attempting to auto-join, only auto-joins once per connection, and force a 60 second cooldown across reconnects between auto-joins.
- Added connection retry limiting - initial connection attempts do not retry, and auto-reconnects are limited to 5 goes before giving up on auto-reconnects - after this a restart or config save will be required before connections will be attempted again.

0.9.1.1
- Updated for KSP 1.0.2 - no other changes

0.9.0.1
- Updated for KSP 1.0.0

0.8.0.1
- Updated for KSP 0.90.0

0.7.1.1
- Under new ownership! Many thanks to Blizzy78 for the opportunity to take this on from his excellent baseline
- Added in-game configuration support
- Switched to KSP-AVC
- Tried to add SSL support, found KSP's Unity is too old to successfully connect to most IRC servers - boo!

0.6.3, 2013-12-17
- Updated for Toolbar Plugin 1.2.0 (included) and KSP 0.23.0.

0.6.2, 2013-12-11
- Changed IRC button to use the Toolbar Plugin (included in download.)
- The IRC button will now display in a different color if a user joins,
  leaves, or quits, to differentiate from regular messages.
- The window resize mouse cursor should now display correctly.
- The plugin will now respond to CTCP VERSION messages.

0.6.1, 2013-11-27
- Fixed a bug that prevented sending unknown commands the server.

0.6.0, 2013-11-26
- You can now click on HTTP/HTTPS links in messages. (Note that this will
  only work for the first link in the message.)
- The plugin will now try to reconnect to the server when connection was lost.
- All unknown user commands will now be sent to the server verbatim.
- Added a "user" parameter to the configuration file to let you configure
  the IRC server user account. This can be useful when using a bouncer.

0.5.0, 2013-11-24
- Pressing the TAB key will now auto-complete user names in the input
  text field.
- The last seen indicator line should now always be drawn in the correct
  places.
- You can now add a new line "debug = true" in the configuration file
  to see all client-server communication.

0.4.0, 2013-11-23
- Added the /TOPIC, /OP, /DEOP, /VOICE, /DEVOICE, and /KICK user commands.
- The users list can now be hidden.
- Added an indicator to see which messages are new since you last left a
  channel tab.
- The window will no longer reset its size when clicking on another chat tab.
- The "IRC" button and the window will now hide in the space center scene
  to avoid the UI acting up.
- Moved the "IRC" button higher up in all scenes except the editors, mainly to
  not clash with the Kerbal face cams in the flight scene.

0.3.0, 2013-11-23
- The input text field will no longer grow if you type in a long text.
- Channel tabs will be highlighted in a different color now when there are
  new messages. The "IRC" button will also be highlighted if the IRC
  window is currently hidden.
- You can resize the window now.

0.2.0, 2013-11-22
- Added the /NICK command to change your nickname.
- Added the /J user command as a synonym for /JOIN.
- User channel modes (op, voice) are updated correctly now.
- Other users joining the same channel are updated correctly now.
- The number of users in the channel is displayed now.
- The channel topic is displayed now.
- A server password can be supplied in the config file now.

0.1.0, 2013-11-21
- Initial public release.

 

The Internet Relay Chat plugin is licensed under the GNU GPL v3.

Edited by timmers_uk
0.18.1.7

Share this post


Link to post
Share on other sites

This could be great for those waiting times between burns in the emptiness of space. It is on CKAN, I see, so people who uses it has more probablities to see it while searching on CKAN for new mods.

I, for one, will be using it from now on.

Share this post


Link to post
Share on other sites
I'm surprised this hasn't got more attention. It's a must in my list.

Because a lot of players use teamspeak or mumble or ventrillo, Why type when you can talk!

Share this post


Link to post
Share on other sites
Can this work with Twitch chat?

I don't know, but will give it a go.

- - - Updated - - -

Quick bump as I've pushed a rebuild of KSPIRC for 1.0.0 KSP - no noticeable dramas rebuilding, but let me know if you have any issues.

Timmers

Share this post


Link to post
Share on other sites
Because a lot of players use teamspeak or mumble or ventrillo, Why type when you can talk!

I can't talk at work, but I can sometimes leave KSP running.

Actually now I think of it I can't talk at home either because Mrs Timmers takes the merciless rise out of me mumbling into a mic, or I wake up the dog, who then needs taking outside at the most inconvenient moments (still, at least I can pause KSP unlike Elite Dangerous).

- - - Updated - - -

Can this work with Twitch chat?

I've just checked, and this KSP IRC works with twitch chat.

You have to remember to check the upper/lower case-ishness on the channel name, and you have to grab an OAuth token to use as your password, e.g. from http://www.twitchapps.com/tmi.

I'm using server irc.twitch.tv, port 443 (port 6667 didn't work for me but probably because of firewall issues my side), and use my twitch username as my nick, and username, and pasted the whole OAuth token including the word 'oauth' into the password field (which overflowed in a slightly ugly fashion but you can't have everything).

As always, YMMV, so let me know if this works for you.

Share this post


Link to post
Share on other sites

I wasted so much of my life on IRC in the 90's (Yea, I'm that old...Undernet forever!)

Share this post


Link to post
Share on other sites
I wasted so much of my life on IRC in the 90's (Yea, I'm that old...Undernet forever!)

Undernet? ISTR being around before the original split, where all this was fields (efnet I think).

Anyway ... recompiled a new build for 1.0.2. No other exciting changes.

Share this post


Link to post
Share on other sites

After an embarrassing mishap during development resulting in my join-spamming #KSPOfficial, I have a new release...

New release 0.11.1.1 -

  • Updated handling of HTTP URLs in message text - individual URLs on a message are now clickable, rather than the whole message, and more than 1 URL per message line is supported.
  • Made use of blizzy's toolbar optional - if toolbar is not present, KSPIRC adds itself to the applauncher toolbar instead.
  • Added auto-join support - add channels to auto-join on connection to the config, comma separated, and don't forget the '#' at the start of the channel names.
  • Added auto-join cooldown + anti-spam - waits 5 seconds after connecting before attempting to auto-join, only auto-joins once per connection, and force a 60 second cooldown across reconnects between auto-joins.
  • Added connection retry limiting - initial connection attempts do not retry, and auto-reconnects are limited to 5 goes before giving up on auto-reconnects - after this a restart or config save will be required before connections will be attempted again.

Download links on first page.

Share this post


Link to post
Share on other sites

not having much luck connecting to kspcofficial with port6697? I get connection established then nothing ?

Share this post


Link to post
Share on other sites

Is this with it in the autojoin config? and did you include the #?

Any chance you can try a different port to irc.esper.net such as 5555, 80, or 443 (iirc they all connect to their irc server)

Share this post


Link to post
Share on other sites

More fun about to hit KerbalStuff/GitHub.

  • Reworked the rendering code - now supports some IRC markup stuff (notably not underlining). Should support use of bold, italic, and colors (though some combinations go spang due to limitations of unity rich text support ... I'll get there though).
  • Fixed recently introduced layout/performance hit by moving back to a single GUILayout.label per message (but using rich text in said label for pretties).
  • Added support for integrated display of image links via an in-game popup window - you can still open in external browser, and if what's downloaded isn't an image it'll open externally, but images ... will generally show up (as long as KSP supports the format).
  • Removed some of the bees
  • No SSL support yet

Download etc on first post.

Share this post


Link to post
Share on other sites

Quick update ... it looks like things in SSL-land have progressed somewhat since the last time I tested out whether SSL support was working.

I can enable SSL support, but it looks like the certificate validation always fails (possibly due to KSP/unity not having require SSL Root CAs installed) - would people want to have SSL as an option with a caveat that it will allow you to connect despite cert validation errors (and hence potential for MiTM etc)?

Let me know your thoughts.

Share this post


Link to post
Share on other sites

Hi timmers_uk!

I love your mod but I have a problem. Running KSP on OpenGL gives you the proper icons on the toolbar (you see the bubble and the different colors once you receive a message and everything), now when running on normal mode (no OpenGL), the icon on the toolbar turns to a black square that doesn`t change shape to the bubble or color...

Cheers for the good work ;)

Share this post


Link to post
Share on other sites

Weird - not sure what would be causing that - I don't run OpenGL myself so I'd generally see issues with directx mode.

Do you have anything like active texture management running, or have you used DDS4KSP or somesuch to convert the icons to dds maybe?

Either way, if you could send an outputlog.txt (from KSP_DATA dir) I may be able to look into it.

Tim

- - - Updated - - -

Quick update...

0.13.1.1 dropped

  • Added plain renderer used if force simple rendering is set in config - still supports links, just does zero rich text stuff.
  • Set inputlocks when mouse is over chat input box, and hold focus on chat input when mouse is over chat input.
  • Added code to try to drag focus back to input box when new chat is received.
  • Enabled SSL support even though unity/ksp seem to always generate certificate error - use at own risk (of MITM compromising the privacy of your connection).

Share this post


Link to post
Share on other sites
Weird - not sure what would be causing that - I don't run OpenGL myself so I'd generally see issues with directx mode.

Do you have anything like active texture management running, or have you used DDS4KSP or somesuch to convert the icons to dds maybe?

Either way, if you could send an outputlog.txt (from KSP_DATA dir) I may be able to look into it.

Tim

- - - Updated - - -

Quick update...

0.13.1.1 dropped

  • Added plain renderer used if force simple rendering is set in config - still supports links, just does zero rich text stuff.
  • Set inputlocks when mouse is over chat input box, and hold focus on chat input when mouse is over chat input.
  • Added code to try to drag focus back to input box when new chat is received.
  • Enabled SSL support even though unity/ksp seem to always generate certificate error - use at own risk (of MITM compromising the privacy of your connection).

EDIT: I don`t have any texture reduction pack!

Here is the output log (With the updated version you just uploaded): https://drive.google.com/open?id=0By...ckU&authuser=0

Image of the problem (Note this pic is a bit old I barely have any other mods now and the problem continues):

2015_05_14_00001.jpg

Edited by GunTuga

Share this post


Link to post
Share on other sites
EDIT: I don`t have any texture reduction pack!

Here is the output log (With the updated version you just uploaded): https://drive.google.com/open?id=0By...ckU&authuser=0

Image of the problem (Note this pic is a bit old I barely have any other mods now and the problem continues):

http://s12.postimg.org/f6tmzydaj/2015_05_14_00001.jpg

Unfortunately the link provided isnt publicly accessible. Could you unlock it do I can see the log?

Thanks

tim

edit : looking at that screenshot maybe tge issue is showing in relation to a non default theming of your toolbar? I've not tried that

Edited by timmers_uk

Share this post


Link to post
Share on other sites
yep. Unfortunately im just about to turn in for the night so it'll have to be tomorrow now

Alright I will come here to see if you made progress ;)

Share this post


Link to post
Share on other sites
Alright I will come here to see if you made progress ;)

Well I think the output log shows your having a problem loading those textures :-

Load(Texture): KSPIRC/button-join

(Filename: C:/buildslave/unity/build/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 56)

[TR.Loader] Compressed KSPIRC/button-join [24x20 RGBA32 -> DXT5]

(Filename: C:/buildslave/unity/build/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 56)

d3d: failed to create 2D texture id=1391 w=12 h=10 mips=4 d3dfmt=894720068 [invalid call]
Load(Texture): KSPIRC/button-message

(Filename: C:/buildslave/unity/build/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 56)

[TR.Loader] Compressed KSPIRC/button-message [24x20 RGBA32 -> DXT5]

(Filename: C:/buildslave/unity/build/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 56)

d3d: failed to create 2D texture id=1393 w=12 h=10 mips=4 d3dfmt=894720068 [invalid call]
Load(Texture): KSPIRC/button-pm

(Filename: C:/buildslave/unity/build/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 56)

[TR.Loader] Compressed KSPIRC/button-pm [24x20 RGBA32 -> DXT5]

(Filename: C:/buildslave/unity/build/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 56)

d3d: failed to create 2D texture id=1395 w=12 h=10 mips=4 d3dfmt=894720068 [invalid call]
Load(Texture): KSPIRC/button-regular

(Filename: C:/buildslave/unity/build/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 56)

[TR.Loader] Compressed KSPIRC/button-regular [24x20 RGBA32 -> DXT5]

(Filename: C:/buildslave/unity/build/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 56)

d3d: failed to create 2D texture id=1397 w=12 h=10 mips=4 d3dfmt=894720068 [invalid call]
Load(Texture): KSPIRC/resize-cursor

(Filename: C:/buildslave/unity/build/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 56)

[TR.Loader] Compressed KSPIRC/resize-cursor [15x15 RGBA32 -> DXT5]

(Filename: C:/buildslave/unity/build/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 56)

d3d: failed to create 2D texture id=1399 w=7 h=7 mips=4 d3dfmt=21 [invalid call]

I couldn't comment on D3D vs OpenGL though - for me in openGL I get this :-

HGTrmliE2yilA3t7Xcb1-BBs1TI-tr4twMWXQFJxJ0mEEkRp6-XgKmAL446GvwWozuuu7ieErLXVwhU=w1896-h827-rw

I have run a quick test build with the icons switched from TGA to DDS, in case the problem is the unreliable TGA loading :-

https://drive.google.com/file/d/0B3p-HtV_3uFfT0xmbWZvcUtMMUE/view?usp=sharing

If you can try that, I'll probably be making the next release use DDS anyway, but it would be useful to know if this helps you at all, as its probably not enough by itself to justify a rev.

Timmers

Edited by timmers_uk

Share this post


Link to post
Share on other sites
This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.