Page 1 of 1
Quick question regarding text output to an IRC server
Posted: Fri Dec 10, 2004 6:36 pm
by Zamiel
I searched a bit and couldn't really find anything. I probably deserved to be slapped in the face for posting this, but oh well. =p
What I am looking for is a _plugin_, not a macro, to output all text recieved by the EverQuest client to an IRC server, both from the normal window and the MQ window if possible. I am thinking I would need to mod MQ2IRC to do this, or something. =\
I need a plugin for this and not a macro because I am running various macros on the computer that needs the text outputted.
I guess I could add a subroutine of some sort to the macros that I am running, but then I would likely have to deal with bugs, decreased stability, or an decrease in macro/computer speed.
Does such a plugin / MQ2IRC mod exist?
Or am I being really noob and missing something that MQ2IRC already incorporates?
Posted: Fri Dec 10, 2004 6:55 pm
by A_Druid_00
Pretty sure MQ2Telnet does something real similar. Never used it though, so not 100% sure
Posted: Fri Dec 10, 2004 7:45 pm
by Zamiel
I already tried setting up a local telnet server and encountered difficulties. =\
IRC is a much cleaner way of doing this and I am not very familiar with telnet.
In addition, I want to have this going on more than one character at a time and I'm not familiar with a way to partitian off the text within telnet, whereas in IRC I could have each character on a seperate channel.
Posted: Fri Dec 10, 2004 8:49 pm
by ieatacid
OnIncomingChat
Posted: Sat Dec 11, 2004 2:09 am
by Zamiel
... Obviously OnIncomingChat is used to do this, but unfortunately, I have zero C or C++ programming experience. But if you wanted me to try and do it myself, here is my pitiful attempt. =p
Code: Select all
#include "../MQ2Plugin.h"
PreSetup("MQ2IRCOutput");
PLUGIN_API DWORD OnIncomingChat(PCHAR Line, DWORD Color)
{
if (MQ2Globals::gGameState != GAMESTATE_INGAME)
return 0;
HideDoCommand(GetCharInfo(),"/i say $Line",FromPlugin);
}
I know $Line isn't anything. That is just where I want the string output to go, obviously. Should I be using strstr? Somehow I know I'm not even close here. ><
Posted: Sat Dec 11, 2004 10:07 am
by fice
Code: Select all
#include "../MQ2Plugin.h"
PreSetup("MQ2IRCOutput");
PLUGIN_API DWORD OnIncomingChat(PCHAR Line, DWORD Color)
{
if (gGameState != GAMESTATE_INGAME) return 0;
CHAR Temp[MAX_STRING]={0};
sprintf(Temp,"/i say %s",Line);
HideDoCommand(GetCharInfo(),Temp,FromPlugin);
}
i don't know if you would have to strip any other code from the eq text, but that should work i think! also don't forget to add plugin initialization and shutdown
Posted: Sat Dec 11, 2004 5:46 pm
by Zamiel
Thanks fice, but I can't seem to compile that for some reason. =\
Code: Select all
--------------------Configuration: MQ2IRCOutput - Win32 Release--------------------
Compiling...
MQ2IRCOutput.cpp
C:\Documents and Settings\James\Desktop\MQ2-20041208a\MQ2IRCOutput\MQ2IRCOutput.cpp(21) : error C2664: 'HideDoCommand' : cannot convert parameter 1 from 'struct EQData::_CHARINFO *' to 'struct EQData::_SPAWNINFO *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Error executing cl.exe.
MQ2IRCOutput.dll - 1 error(s), 0 warning(s)
I'm using VC++ 6.0.
Posted: Sat Dec 11, 2004 6:09 pm
by fearless
Posted: Sat Dec 11, 2004 8:33 pm
by ieatacid
Code: Select all
HideDoCommand((PSPAWNINFO)pCharSpawn,Temp,FromPlugin);
Posted: Sun Dec 12, 2004 7:55 pm
by fice
actually the problem is that HideDoCommand takes a pointer to spawninfo as argument, not a pointer to charinfo =p i had never used that function ever
what i would do is
Code: Select all
HideDoCommand(GetCharInfo()->pSpawn,Temp,FromPlugin);
Posted: Sun Dec 12, 2004 8:16 pm
by ieatacid
actually the problem is that HideDoCommand takes a pointer to spawninfo as argument
Which is what I posted.
Posted: Mon Dec 20, 2004 8:57 pm
by Zamiel
Thanks fice!