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)

Reply
 
Thread Tools Display Modes
  #1  
Old 07-29-2009, 10:29 PM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,449
Default

And the rest of it~

Code:
Index: EQEmuConfig.cpp
===================================================================
--- EQEmuConfig.cpp	(revision 832)
+++ EQEmuConfig.cpp	(working copy)
@@ -128,6 +128,26 @@
 	text=ParseTextBlock(ele,"port",true);
 	if (text)
 		ChatPort=atoi(text);
+	
+	text=ParseTextBlock(ele,"channeltooutput",true);
+	if (text)
+		ChannelToOutput=text;
+
+	text=ParseTextBlock(ele,"eqchanneltooutput",true);
+	if (text)
+		EQChannelToOutput=text;
+
+	text=ParseTextBlock(ele,"chatirchost",true);
+	if (text)
+		ChatIRCHost=text;
+
+	text=ParseTextBlock(ele,"chatircport",true);
+	if (text)
+		ChatIRCPort=atoi(text);
+
+	text=ParseTextBlock(ele,"chatircnick",true);
+	if (text)
+		ChatIRCNick=text;
 }
 		
 void EQEmuConfig::do_mailserver(TiXmlElement *ele) {
@@ -323,6 +343,16 @@
 		return(ChatHost);
 	if(var_name == "ChatPort")
 		return(itoa(ChatPort));
+	if(var_name == "ChannelToOutput")
+		return (ChannelToOutput);
+	if(var_name == "EQChannelToOutput")
+		return (EQChannelToOutput);
+	if(var_name == "ChatIRCHost")
+		return(ChatIRCHost);
+	if(var_name == "ChatIRCPort")
+		return(itoa(ChatIRCPort));
+	if(var_name == "ChatIRCNick")
+		return(ChatIRCNick);
 	if(var_name == "MailHost")
 		return(MailHost);
 	if(var_name == "MailPort")
@@ -386,6 +416,11 @@
 	cout << "WorldHTTPEnabled = " << WorldHTTPEnabled << endl;
 	cout << "ChatHost = " << ChatHost << endl;
 	cout << "ChatPort = " << ChatPort << endl;
+	cout << "ChannelToOutput = " << ChannelToOutput << endl;
+	cout << "EQChannelToOutput = " << EQChannelToOutput << endl;
+	cout << "ChatIRCHost = " << ChatIRCHost << endl;
+	cout << "ChatIRCPort = " << ChatIRCPort << endl;
+	cout << "ChatIRCNick = " << ChatIRCNick << endl;
 	cout << "MailHost = " << MailHost << endl;
 	cout << "MailPort = " << MailPort << endl;
 	cout << "DatabaseHost = " << DatabaseHost << endl;
Index: EQEmuConfig.h
===================================================================
--- EQEmuConfig.h	(revision 832)
+++ EQEmuConfig.h	(working copy)
@@ -46,7 +46,12 @@
 	// From <chatserver/>
 	string ChatHost;
 	uint16 ChatPort;
-	
+	string ChannelToOutput;
+	string EQChannelToOutput;
+	string ChatIRCHost;
+	uint16 ChatIRCPort;
+	string ChatIRCNick;
+
 	// From <mailserver/>
 	string MailHost;
 	uint16 MailPort;
@@ -110,7 +115,7 @@
 		LoginHost="eqemulator.net";
 		LoginPort=5998;
 
-		// World
+		// Worldstrcpy(lsi->name, Config->LongName.c_str());
 		Locked=false;
 		WorldTCPPort=9000;
 		TelnetEnabled=false;
@@ -122,7 +127,13 @@
 		// Mail
 		ChatHost="eqchat.eqemulator.net";
 		ChatPort=7778;
+		ChannelToOutput="#eqemuchattest";
+		EQChannelToOutput="General";
+		ChatIRCHost="eqnet.eqemulator.net";
+		ChatIRCPort=6667;
+		ChatIRCNick="Secretsbot";
 
+
 		// Mail
 		MailHost="eqmail.eqemulator.net";
 		MailPort=7779;
Reply With Quote
  #2  
Old 07-29-2009, 11:20 PM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,449
Default

Replace this for a crash fix with packet length and sending packets to the client, it's hackish but it fixes it

Code:
		if(Message.length() > 100)
			return;
in

Code:
ChatChannel::SendMessageToChannelFromIRC
below

Code:
					Client *ChannelClient = iterator.GetData();
Reply With Quote
  #3  
Old 07-30-2009, 02:56 AM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,449
Default

After further looking, that's not the case. Also, I realized that UCS is a better place to do my coding in as it has SoF support. I tested this to work on both SoF and Titanium.

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

Also, linux support is still not in. I do not have a linux box so I would appreciate if someone took the the time to look into that. Thanks!

Can a mod update the first link with this file as well?

If you are interested in the fix for the actual crash, it's

Code:
	if(strstr(params,"%s"))
	{
		return 0;
	}
in

Code:
int triggers(char*params,irc_reply_data*hostd,void*conn) /* hooks privmsg to your specified channel */
above

Code:
	if(!strcmp(params,":!rejoin"))
	{
		irc_conn->join(name);
	}

Last edited by Secrets; 07-30-2009 at 11:00 AM..
Reply With Quote
  #4  
Old 07-30-2009, 06:59 PM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,449
Default

Gonna try and get a linux version of this today and then it will be SVN-ready. Also, I figured out the crash issue (for reals this time!) and it's related to sprintf in MiscFunctions.h -- If "%whatever" is provided, it crashes the app, so I just did sprintf("%s"), string instead in MiscFunctions.h to fix it. When I finish Linux support, this will be added in.
Reply With Quote
  #5  
Old 07-30-2009, 10:42 PM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,449
Default

Quote:
Originally Posted by Secrets View Post
Gonna try and get a linux version of this today and then it will be SVN-ready. Also, I figured out the crash issue (for reals this time!) and it's related to sprintf in MiscFunctions.h -- If "%whatever" is provided, it crashes the app, so I just did sprintf("%s"), string instead in MiscFunctions.h to fix it. When I finish Linux support, this will be added in.
I can't figure out what's wrong my linux port, so someone else is going to have to port it.
Reply With Quote
  #6  
Old 08-02-2009, 06:42 AM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

I've got a working port (see the attachment for a diff), but I think we may want to take a moment to figure out the scope for this.

On Live, chat channels could be for the local server (General), another server (tgc.General), or serverwide (serverwide.General). In addition, we could also send tells the same way (;tell tcg.Cavedude). I think we should consider what we could do to accomplish all 3 scenarios.

I think we may need 2 things: a local list of servers / IRC servers (including shortnames, like tgc) to connect to (primarily to choose what IRC server you would want to connect to), plus a master list of Emu servers via the login server (both public & private). That way, we can communicate to virtually anyone anywhere at any time.
Attached Files
File Type: zip ucs_with_IRC.zip (29.3 KB, 5 views)
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote
  #7  
Old 08-03-2009, 07:36 PM
Yeormom
Discordant
 
Join Date: Apr 2004
Location: 127.0.0.1
Posts: 402
Default

Should be cautioned when integrated IRC services, depending on your network. If you're using a real server, most datacenter resellers prohibit the use of IRC on their networks.
__________________
Yeorwned
Bane of Life [Custom Classic/PvP]
Reply With Quote
Reply

Thread Tools
Display Modes

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 04:13 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 - 2026, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3