View Full Version : AMS Irc client?
ShadowUK
10-25-2008, 07:45 AM
Is it possible?
RizlaUK
10-25-2008, 08:22 AM
sure is, >> http://www.softpedia.com/get/Programming/Components-Libraries/IRC-Client-Control-OCX.shtml
ShadowUK
10-25-2008, 01:00 PM
Alright, How would I go about linking this. Obviously I would need the whole Luacom approach but how would I go about linking it to AMS? I would loooooove an example.
KraMer
10-26-2008, 03:32 AM
IRC is a simple text protocol, ass you need is RFC 1459 (http://tools.ietf.org/html/rfc1459) and Luasocks, or any DLL that can handle TCP/IP. I don't know for sure how AMS handles DLLs, as I have just grabbed my trial, but as a matter of fact, I'm currently writing an IRC client (albeit in C++), which is the whole reason I'm replying.
RizlaUK
10-26-2008, 06:32 AM
AMS can only make single threaded dll calls thats why i suggest ActiveX, i could make a dll in PB for TCP/IP communication but it wouldent be much use in AMS
Luasocks would proberly be the best bet, LuaCOM + ActiveX IMO is the easy way round it
Shadow, point me to a IRC server that i can test this with and i'll try and get an example
KraMer
10-26-2008, 09:05 AM
Not much of a problem. IRC clients don't need to be multithreaded anyway, and the only reason would be to support DCC, but even that doesn't require threads. In any case, a plug-in could probably allow this, but I have no idea how the plug-in system handles passing of Lua functions as arguments to plug-ins, if it is possible.
reteset
10-26-2008, 09:52 AM
i am interested in it .
i have no idea how is an IRC server work
and which kind of protocole is it use
i would like to see a sample C++ project
if you can provide a full working C++ project (source) to me
with a test server address , channel ...
maybe i can determine whether can we create a IRC plugin or not
and if it is possible i can make a plugin with it
hope it is not a more complex thing
i hate complex programs
i am getting lost in them :D:D
RizlaUK
10-26-2008, 10:42 AM
hey reteset, hows things ?
heres a C++ IRC class and info on IRC in C++, there is a demo project on the page, hope it can help
http://www.codeguru.com/cpp/i-n/network/article.php/c5415
RizlaUK
10-26-2008, 11:01 AM
and heres some servers
http://www.efnet.org/?module=servers
KraMer
10-26-2008, 01:04 PM
i have no idea how is an IRC server work
And you don't need to if you're writing a client.
and which kind of protocole is it use
TCP/IP and a bit of text, as per RFC1459 (http://tools.ietf.org/html/rfc1459).
maybe i can determine whether can we create a IRC plugin or not
Of course it's possible!
hope it is not a more complex thing
IRC is a very simple text protocol.
reteset
10-26-2008, 01:53 PM
And you don't need to if you're writing a client.
i am writing a client application without any info about server ...?
Of course it's possible!
sure..? .. have you tried to make an AMS plugin..?
because there is a problem with incoming events from server
you should pass this events to AMS
you will need a object plugin for the handle incoming events
there is a Lua callback method also but i do not want to use this
i will keep my eyes on this.
and i will start to make something when i finished my current project
ShadowUK
10-26-2008, 04:29 PM
AMS can only make single threaded dll calls thats why i suggest ActiveX, i could make a dll in PB for TCP/IP communication but it wouldent be much use in AMS
Luasocks would proberly be the best bet, LuaCOM + ActiveX IMO is the easy way round it
Shadow, point me to a IRC server that i can test this with and i'll try and get an example
irc.partyvan.fm
RizlaUK
10-26-2008, 05:07 PM
reteset, here is a visual basic 6 irc activex control, i dont have VB6 installed (vista) so i cant look at it right now (till i install xp on a partition) but it should give you a starting block
https://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=7468&lngWId=1#zip
and for anyone else looking at that control i linkled to, heres an exported list of the functions, props and events
IRCcontrolAX Interface definition
General information
Library: IRCcontrolAX (Scotts IRC Control)
File: C:\Documents and Settings\Victoria\Desktop\IRCcontrolAX.ocx
Version: 1.0
File size (bytes): 76 KB
Date modified: 04/02/2002 17:57:44
Interfaces:
This sections lists interfaces exposed by IRCcontrolAX. For each class, the methods and events are listed.
The demo version is able to display members of only one class in component
IRCcontrol
Public Sub QueryInterface(riid, ppvObj)
Public Function AddRef() As UInt32
Public Function Release() As UInt32
Public Sub GetTypeInfoCount(pctinfo As UInt) As UInt32
Public Sub GetTypeInfo(ByVal itinfo As UInt, ByVal lcid As UInt32, pptinfo) As UInt32
Public Sub GetIDsOfNames(riid, rgszNames As Byte, ByVal cNames As UInt, ByVal lcid As UInt32, rgdispid As Long) As UInt32
Public Sub Invoke(ByVal dispidMember As Long, riid, ByVal lcid As UInt32, ByVal wFlags As UInt16, pdispparams, pvarResult As Variant, pexcepinfo, puArgErr As UInt) As UInt32
Public Sub IdentServer(SwitchOn As Boolean) As UInt32 ' Turns the Ident Server on and off
Public Sub IRCconnect(ServerName As String, Username As String, EmailAddress As String) As UInt32 ' Connect to IRC Server
Public Sub IRCdisconnect() As UInt32 ' Disconnect from IRC Server
Public Sub DCCchatSend(Message As String) As UInt32 ' Method to send data to remote DCC Chat
Public Sub DCCchatDisconect() As UInt32 ' Disconnect DCCchat
Public Sub IRCserverSend(Command As String) As UInt32
Public Property Get DCCsendSavePath() As String ' Path where Files are saved to
Public Propety Let DCCsendSavePath() As String ' Path where Files are saved to
Public Event IdentSent(ClientIP As String, IdentSent As String) As String ' Triggers when the Ident server has sent an Ident to the client
Public Event IRCServerConnected(ServerName As String) As String ' Triggers when Connection made to IRC Server
Public Event IRCServerDisconnected() As String ' Triggers when Disconnected from IRC Server
Public Event IRCServerError(ErrorDescription As String) As String ' Triggers when an error happened with the server
Public Event IRCServerLine(LineFromServer As String) As String ' A line of text has come in from the IRC Server
Public Event IRCServerPRVMSG(WhoFrom As String, WhoTo As String, Content As String) As String ' A PRIVMSG has just come in, could be a Channel wide msg or Private
Public Event IRCServerNoticeAuth(NoticeLine As String) As String ' A NOTICE AUTH line has been recieved
Public Event IRCServerActivity(OnOff As Boolean) As String ' Used to turn LEDs on and off when theres Server Activity
Public Event IRCServerUsers(NumOfUsers As Long) As String ' Triggers whenever the Global amount of Users online changes.
Public Event IRCServerChannelListStart() As String ' Start of incoming Channel List
Public Event IRCServerChannelList(ChName As String, ChTopic As String, Users As Long) As String ' incomming Channel list item from IRC Server
Public Event IRCServerChannelListEnd() As String ' End of Channel list has been reached
Public Event IRCServerJoin(Username As String, Channel As String) As String ' Someone has just joined our channel
Public Event IRCServerPartQuit(Username As String, Channel As String) As String ' A user has quit or PARTed the channel we are on
Public Event IRCServerJoinNickList(Username As String, Channel As String) As String ' When Joining a channel, a Nick List is coming in
Public Event IRCServerTopic(Channel As String, Topic As String) As String ' On Joining a Channel, the Topic of the channel is sent
Public Event IRCServerNewTrigger(Trigger As String, Sends As String, Queues As String) As String ' A new !trigger word has been found
Public Event DCCchatConnected(RemoteIP As String, RemotePort As String) As String ' a DCC Chat has just connected
Public Event DCCchatDisconnected(RemoteIP As String) As String ' A DCC chat has just disconnected
Public Event DCCchatIncoming(RemoteIP As String, RemotePort As String, Message As String) As String ' Incoming message from DCC Chat
Public Event DCCsendConnected(Channel As Integer, RemoteIP As String, RemotePort As String, Filename As String, Filesize As String) As String ' DCC Send Session has connected
Public Event DCCsendDisconnected(Channel As Integer, RemtoteIP As String) As String
Public Event DCCsendIncoming(Channel As Integer, RemoteIP As String, RemotePort As String, Filename As String, Filesize As String, Progress As Long, Speed As String) As String ' Incoming data on DCC Send Session
RizlaUK
10-26-2008, 06:14 PM
Shadow, that ocx throws an internal error as soon as it connects to a server (type mismatch!) and i cant see a way round it, i'll look for another
KraMer
10-26-2008, 11:35 PM
i am writing a client application without any info about server ...?
Yes. You don't need to know how the server does it's job, you just need to know how to tell it to do it's job. Those are simple commands like PING, PONG, JOIN, PART, etc.
sure..? .. have you tried to make an AMS plugin..?
Not yet, I will when I get the time. You can always do it with Luasocks or something similar.
because there is a problem with incoming events from server
you should pass this events to AMS
The DLL can just handle the TCP/IP connection, the application can handle everything else.
you will need a object plugin for the handle incoming events
there is a Lua callback method also but i do not want to use this
Depends on how you design it.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.