Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-29-2009, 09:48 PM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,450
Default EQEmu ChatServer w/ IRC (Win32)

Here's the source for what i've been working on the last few days. You will need to add some entries to the chatserver section of eqemu_config.xml or it will *not* work.

The IRC.cpp and IRC.h are modified versions of iainsheppard's IRC class.
You can download the original copy at: http://www.nongnu.org/cpirc/

Also, if it never joins your channel, just PM the bot saying !rejoin and it will rejoin the channel from the XML file.

It does NOT do automatic reconnection. The support for auto-reconnect is in the class, though.

Nickserv stuff can also be added in the triggers function, if needed.

Here's the bot:

http://www.sendspace.com/file/w3an9e

The needed XML stuff examples:

Code:
		<channeltooutput>#EQEmu</channeltooutput>
		<eqchanneltooutput>General</eqchanneltooutput>
		<chatirchost>eqnet.eqemulator.net</chatirchost>
		<chatircport>6667</chatircport>
		<chatircnick>SecretsBot</chatircnick>
First, channeltooutput. This puts all chat from the application to this IRC channel.

Next, EQChannelToOutput. This channel must already exist, otherwise it will crash on the iterator. It outputs all IRC talk to this channel in-game.

Next, ChatIRCHost. This field specifies which IRC server to connect to. I suggest using eqnet.eqemulator.net.

Next, ChatIRCPort. This tells which port to connect to on ChatIRCHost.

Finally, ChatIRCNick. This is your bot's nickname. Currently, there is no nickserv support, however that can be added at a later date.



Note: Win32 is only supported because it uses Winsock & windows threading. I am willing to bet if you use the source from http://www.nongnu.org/cpirc/ it will compile with the files replaced. (the reason i'm doing this is because Winsock does not support fdopen) I do not have a linux box otherwise i'd make a linux version.

Enjoy!

(ps: thanks for the help on this KLS and AndMetal!)

(ps: it's my first hack, so be easy on me :P)

Last edited by Secrets; 07-30-2009 at 05:53 AM..
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 11:38 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3