Engine mod name		: Quakespasm-IRC-0.2

Date of completion	: 2016/06/23
-------------------------
Author			: Shamblernaut
E-mail address		: ben.yeates@gmail.com

-------------------------
Description		: This engine mod adds IRC support to Quakespasm 0.91.0. So far only rudimentary
			  commands are support. 

-------------------------
Additional credits	: id software for Quake source, John Fitzgibbons, Eric Wasylishen, and others
			  for Quakespasm source.
			  George Yunaev for his libircclient source.
			  

Thank yous		: EricW, Baker, Grummlor and others who both helped and encouraged me with this
			  project. You guys rock.


* Construction *

Base			: Quakespasm-0.91.0
Editor/Laguage used	: CodeBlocks IDE, Notepadqq and GCC.
Build time		: 3 weeks.
Required libries	: libircclient by George Yunaev.
Known bugs		: Extended charactersets are not supported and may display (garbled) in quakes 
			  alternate colour fonts.
			  Technically you can connect to multiple channels at once, however at present
			  only supports chatting to one channel.
			  May not play nice with other internal message modes. 
			  If the connection fails the terminal may loop error messages. This can be 
			  stopped by using the irc_disconnect command. 

Compile utilities	: GCC


* INSTALL AND USE *

If installing from source, download and compile libircclient from github
(https://sourceforge.net/projects/libircclient/). Once compiled copy libircclient.o to the "Quake" 
source directory inside the Quakespasm-IRC archive. Open up a terminal, navigate to the "Quake" source
directory and type "make release". Copy the newly created Quakespasm binary to your quake directory
consider renaming it rather than replacing your existing binaries. 

Usage.
Launch the executable as per normal. There are a number of new commands that upon load will be 
available from the console. It is strongly suggested that the command messagemode3 gets bound to a
key for use in game. This can be performed by typing "bind x messagemode3", where x is the key of
your choice.

Once connected with the commands below, IRC communications will appear both in the console and will
be echoed on the top of the play screen. You can communicate to the IRC channel in game with the 
key you bound to messagemode3. Output of the IRC connection is saved to ircout.log in the quake root 
directory. 

Setup Commands:
"irc_server (arg)"	: Echoes the server name stored in config.cfg or sets it with the text 
			  following (Either as IP or as hostname, at this stage SSL is not supported).
"irc_password (arg)"	: Default is Will not echo to console, but will set it from the text following
			  (Note that the password is set in plaintext in the config.cfg, so don't 
			  share it and don't set it on stream). If no password is required it can be 
			  set to null with "".
"irc_port (arg)"	: Default is 6667. Echoes the IRC port stored in config.cfg or sets it with 
			  the text following.
"irc_nick (arg)"	: Default is "Player". Echoes the IRC nick stored in config.cfg or sets it with 
			  the text following.
"irc_channel (arg)"	: Default is "#Default". Echoes the IRC channel stored in config.cfg or sets it
			  with the text following. Requires "#" to preceed the channel name.


Usage Commands:

"irc_connect"		: Connects to the server specified during setup.
"irc_disconnect"	: Disconnects the server.
"irc_join (arg)" 	: Joins the channel specified in setup OR join the channel in the text 
			  following. 
"irc_part (arg)"	: Leaves the channel specified in setup OR leaves the channel in the text 
			  following.


Twitch Instructions:

To connect to twitch you need to use the following:
"irc_server"		: "irc.chat.twitch.tv"
"irc_port"		: "6667"
"irc_nick"		: Must be your twitch username
"irc_password" 		: Must be an OAuth token (accessible here: http://www.twitchapps.com/tmi/)
"irc_channel"		: Your channel name (note this is case sensitive)


* PLEASE NOTE *

Neither I, the developers of Quakespasm or id Software, are responsible for any damage these files 
may or may not cause.  However, it is highly unlikely that any damage will be caused as a direct result
from these files.

Other developers are permitted to use this source code as a base to build and expand this concept.



* COPYRIGHT NOTICES and PERMISSIONS *

By extracting files from this archive or otherwise using this archive or
the files contained within it, you agree to abide by this statement:

This engine modification is copyright 2016 by Ben Yeates. All rights reserved.
Distribution of the file Quakespasm-IRC-0.2.zip outside of the original archive
Quakespasm-IRC-0.1.zip without prior written consent is strictly prohibited.  
Permission to use, copy and distribute unedited copies of this file
-- Quakespasm-IRC-0.2.zip -- is hereby granted, provided that no fee is 
charged for the use or availability of this file (other than the normal 
connection costs for on-line services, if applicable). The above copyright 
notice and this permission notice must be left intact in all copies of this file.

Commercial distribution of this file, in whole or in part, requires 
prior written consent from the author. Commercial distribution includes 
any means by which the user is required to pay either for the support 
(e.g. book, newsletter or CD-ROM) or for the file itself.  Unauthorized 
commercial distribution is prohibited.

If you wish to commercially distribute this file, note the following:

(1)  This file contains intellectual property owned solely by Id 
     Software (www.idsoftware.com), and is subject to any and all 
     copyrights held by them.  The author does not have authority 
     or permission, either expressed or implied, to grant usage of 
     Id's copyright, and, by granting permission to use this executable 
     in a single commercial release, does not claim or waive their 
     rights thereby.

(2)  Permission is granted by the author for the one-time commercial
     distribution of this file if all of the following conditions are
     met:

     (a)  The author is notified by email prior to the file's inclusion 
          on any commercial release;
     (b)  The author is provided with one (1) "contributor's copy" of
          the finished product upon it's release.  Said "contributor's 
          copy" is to be sent to the author using the shipping address 
          specified by the author in his/her reply to the publisher's 
          initial email notification, and is to be provided at no cost 
          to the author;
     (c)  This file (including this copyright notice) is not to be 
          modified in any way, and shall be distributed as the author 
          intended;
     (d)  The author retains all relevant and proper copyrights to this 
          work both prior to and subsequent to the commercial release of 
          this file;
     (e)  The publisher obtains prior written consent from the author.

(3)  By requesting a shipping address from the author, the publisher
     signifies acceptance of, and agrees to abide by, these conditions.
     By returning a valid shipping address to the publisher, the author
     thereby grants the publisher one-time usage of the author's 
     copyrighted work for commercial purposes.

Thank you for your interest in this work.

