Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: Questions about making an IRC Service  (Read 13897 times)

0 Members and 1 Guest are viewing this topic.

aeon

  • Anope User
  • Offline Offline
  • Posts: 16
Questions about making an IRC Service
« on: May 01, 2013, 09:39:44 AM »

While I'm not a pro programmer, I can do C#,Java,c++. I am not an elite person for the job so please do not expect me to know everything about what your about to read below. I only learned what I know via trial and error and so much Google searching.

However Google searches on this matter turn up maybe 1 post and that really does not cover it in detail.

Anyways, I would like to create an IRC service that can connect from a link block in an IRCD
not a module for operserv to load (though I have a question on this as well!)

I've done countless IRC bots, but never anything to directly connect to the IRC server as a server. The main reason I wish to do this is because I can act on things like Connect/Joins ( I understand you can not modify the ircd from third-party applications, and only act on them) + it is giving me something to learn about and do anyway.

Yes I know I need to have the server protocols. I have a documentation on them + been reading them.

Question #1
How do I go about making it connect from the IRC servers link block as a service and not a client.

Question #2
Since this is going to be run as a service does that mean the service itself needs to be coded in C? (I think thats what anope is in right? as well as the unrealircd?) or could I do it in something like C#?

Logged

Adam

  • Team
  • *
  • Offline Offline
  • Posts: 463
Re: Questions about making an IRC Service
« Reply #1 on: May 01, 2013, 09:58:27 AM »

The easiest way to do this is to write a module for Anope. Writing something from scratch is outside of the scope of this forum.
Logged

aeon

  • Anope User
  • Offline Offline
  • Posts: 16
Re: Questions about making an IRC Service
« Reply #2 on: May 02, 2013, 07:51:03 AM »

so basically its a useless cause...
Logged

Jens Voss

  • Team
  • *
  • Offline Offline
  • Posts: 125
Re: Questions about making an IRC Service
« Reply #3 on: May 02, 2013, 08:02:24 AM »

You can just read the documentation shipped with your IRCd. It contains most of the information you need. You will find the rest by try&error or by reading the source.

Making a script or module that is able to communicate with an IRCd and support all possible messages is hell a lot of work. Trust me, I have done it two times.
Logged

Jan Milants

  • Team
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1372
Re: Questions about making an IRC Service
« Reply #4 on: May 02, 2013, 10:19:55 AM »

Quote
Question #1
How do I go about making it connect from the IRC servers link block as a service and not a client.
Your client will be considered a server once you send the IRCd the SERVER command as documented by the specific ircd protocol..

Quote
Since this is going to be run as a service does that mean the service itself needs to be coded in C? (I think thats what anope is in right? as well as the unrealircd?) or could I do it in something like C#?
Any language that will let you connect to a socket will do.. it has even been done in mIRC scripting I think, though you d have to be completely nuts to want to do that... most ircd's are C/C++ for performance reasons, Java or C# will do just fine, though they ll use more resources and be a bit slower.

and is there any particular reason why you don't want to do it as a module to an existing server like anope..?
I don't think there is much you could do with a standalone service that you couldn't do with just a module in anope at only a 10th of the effort..
it would make it wayyy easier since all of the protocol details would be handled by anopes core.
If you base it on 1.9, you could probably strip anope to the bone and leave only the very core that connects to the ircd, then it should be able to connect alongside a regular install of anope..
tricky bit here would be the fact that 1.9 is still in development and constantly changing...
Logged
If you like me donate coins to 1FBmZVT4J8WAUMHKqpWhgNVj3XXnRN1cCk :)

aeon

  • Anope User
  • Offline Offline
  • Posts: 16
Re: Questions about making an IRC Service
« Reply #5 on: May 17, 2013, 07:13:23 AM »

Ugh I now see why this is a bad idea after some research:

The service needs to memorize every mode set/unset as well as kicks, disconnects etc...

I'm not this good of a programmer, this seems a little too much for me to handle.


Okay then here is a different approach:

What about another service client (ex botserv) and have services launch it? - Im not really making a "new service package" and all the "custom commands" I need are there to be used?
Logged

Jan Milants

  • Team
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1372
Re: Questions about making an IRC Service
« Reply #6 on: May 17, 2013, 11:08:43 AM »

Okay then here is a different approach:

What about another service client (ex botserv) and have services launch it? - Im not really making a "new service package" and all the "custom commands" I need are there to be used?
can you elaborate a bit? i didn't really see a question..
a module can easily create a services client like botserv.. there s some examples to be found on the modules site I think.
Logged
If you like me donate coins to 1FBmZVT4J8WAUMHKqpWhgNVj3XXnRN1cCk :)

aeon

  • Anope User
  • Offline Offline
  • Posts: 16
Re: Questions about making an IRC Service
« Reply #7 on: May 17, 2013, 08:05:33 PM »

basically I mean creating a service client like this: http://modules.anope.org/index.php?page=view&id=191

and anope 1.9 has an "easy setup" for doing this, it seems you just define the block, and code the modules for it, if so I think I can manage
Logged
Pages: [1]   Go Up